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 
21  void Walker::ApplyControl(const BoneControl &bone_control) {
22  GetEpisode().Lock()->ApplyBoneControlToWalker(*this, bone_control);
23  }
24 
26  return GetEpisode().Lock()->GetActorSnapshot(*this).state.walker_control;
27  }
28 } // namespace client
29 } // namespace carla
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:99
Control GetWalkerControl() const
Return the control last applied to this Walker.
Definition: Walker.cpp:25
Control _control
Definition: Walker.h:37
SharedPtrType Lock() const
Same as TryLock but never return nullptr.
void ApplyControl(const Control &control)
Apply control to this Walker.
Definition: Walker.cpp:14