CARLA
Walker.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #include "carla/client/Walker.h"
8 
10 
11 namespace carla {
12 namespace client {
13 
14  void Walker::ApplyControl(const Control &control) {
15  if (control != _control) {
16  GetEpisode().Lock()->ApplyControlToWalker(*this, control);
17  _control = control;
18  }
19  }
20 
22  return GetEpisode().Lock()->GetActorSnapshot(*this).state.walker_control;
23  }
24 
26  return GetEpisode().Lock()->GetBonesTransform(*this);
27  }
28 
30  return GetEpisode().Lock()->SetBonesTransform(*this, bones);
31  }
32 
33  void Walker::BlendPose(float blend) {
34  return GetEpisode().Lock()->BlendPose(*this, blend);
35  }
36 
38  return GetEpisode().Lock()->GetPoseFromAnimation(*this);
39  }
40 
41 } // namespace client
42 } // namespace carla
void SetBonesTransform(const BoneControlIn &bones)
Definition: Walker.cpp:29
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
void GetPoseFromAnimation()
Definition: Walker.cpp:37
void BlendPose(float blend)
Definition: Walker.cpp:33
BoneControlOut GetBonesTransform()
Definition: Walker.cpp:25
Control GetWalkerControl() const
Return the control last applied to this Walker.
Definition: Walker.cpp:21
Control _control
Definition: Walker.h:44
SharedPtrType Lock() const
Same as TryLock but never return nullptr.
void ApplyControl(const Control &control)
Apply control to this Walker.
Definition: Walker.cpp:14