CARLA
LibCarla/source/carla/rpc/WalkerBoneControl.h
Go to the documentation of this file.
1 // Copyright (c) 2019 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 #pragma once
8 
9 #include "carla/MsgPack.h"
11 #include "carla/rpc/String.h"
12 #include "carla/rpc/Transform.h"
13 
14 #ifdef LIBCARLA_INCLUDED_FROM_UE4
16 #endif // LIBCARLA_INCLUDED_FROM_UE4
17 
18 #include <vector>
19 
20 namespace carla {
21 namespace rpc {
22 
24  public:
25 
26  WalkerBoneControl() = default;
27 
29  std::vector<rpc::BoneTransformData> bone_transforms)
30  : bone_transforms(bone_transforms) {}
31 
32 #ifdef LIBCARLA_INCLUDED_FROM_UE4
33 
34  operator FWalkerBoneControl() const {
35  FWalkerBoneControl Control;
36  for (auto &bone_transform : bone_transforms) {
37  Control.BoneTransforms.Add(ToFString(bone_transform.first), bone_transform.second);
38  }
39  return Control;
40  }
41 
42 #endif // LIBCARLA_INCLUDED_FROM_UE4
43 
44  std::vector<rpc::BoneTransformData> bone_transforms;
45 
46  MSGPACK_DEFINE_ARRAY(bone_transforms);
47  };
48 
49 } // namespace rpc
50 } // namespace carla
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:99
std::vector< rpc::BoneTransformData > bone_transforms
WalkerBoneControl(std::vector< rpc::BoneTransformData > bone_transforms)
MSGPACK_DEFINE_ARRAY(bone_transforms)