22 #ifndef UTILS_GAZEBO_API_WRAPPERS_H_
23 #define UTILS_GAZEBO_API_WRAPPERS_H_
25 #include <gazebo/gazebo.hh>
29 #if GAZEBO_MAJOR_VERSION >= 8
31 # define GZWRAP_SIM_TIME SimTime
32 # define GZWRAP_REAL_TIME RealTime
33 # define GZWRAP_RUNNING Running
34 # define GZWRAP_MODEL_BY_NAME ModelByName
35 # define GZWRAP_MODEL_BY_INDEX ModelByIndex
36 # define GZWRAP_MODEL_COUNT ModelCount
37 # define GZWRAP_WORLD_POSE WorldPose
38 # define GZWRAP_ENTITY_BY_NAME EntityByName
39 # define GZWRAP_SIM_TIME SimTime
40 # define GZWRAP_NAME Name
41 # define GZWRAP_BOUNDING_BOX BoundingBox
42 # define GZWRAP_LENGTH Length
43 # define GZWRAP_MODELS Models
44 # define GZWRAP_PHYSICS Physics
45 # define GZWRAP_BASE_BY_NAME BaseByName
47 # define GZWRAP_POS Pos()
48 # define GZWRAP_ROT Rot()
49 # define GZWRAP_EULER Euler()
55 # define GZWRAP_ROT_ROLL Rot().Roll()
56 # define GZWRAP_ROT_PITCH Rot().Pitch()
57 # define GZWRAP_ROT_YAW Rot().Yaw()
61 # define GZWRAP_SIM_TIME GetSimTime
62 # define GZWRAP_REAL_TIME GetRealTime
63 # define GZWRAP_RUNNING GetRunning
64 # define GZWRAP_MODEL_BY_NAME GetModel
65 # define GZWRAP_MODEL_BY_INDEX GetModel
66 # define GZWRAP_MODEL_COUNT GetModelCount
67 # define GZWRAP_WORLD_POSE GetWorldPose
68 # define GZWRAP_ENTITY_BY_NAME GetEntity
69 # define GZWRAP_SIM_TIME GetSimTime
70 # define GZWRAP_NAME GetName
71 # define GZWRAP_BOUNDING_BOX GetBoundingBox
72 # define GZWRAP_LENGTH GetLength
73 # define GZWRAP_MODELS GetModels
74 # define GZWRAP_PHYSICS GetPhysicsEngine
75 # define GZWRAP_BASE_BY_NAME GetByName
77 # define GZWRAP_POS pos
78 # define GZWRAP_ROT rot
79 # define GZWRAP_EULER GetAsEuler()
85 # define GZWRAP_ROT_ROLL rot.GetRoll()
86 # define GZWRAP_ROT_PITCH rot.GetPitch()
87 # define GZWRAP_ROT_YAW rot.GetYaw()
91 #define GZWRAP_POS_X GZWRAP_POS.GZWRAP_X
92 #define GZWRAP_POS_Y GZWRAP_POS.GZWRAP_Y
93 #define GZWRAP_POS_Z GZWRAP_POS.GZWRAP_Z
95 #define GZWRAP_ROT_X GZWRAP_ROT.GZWRAP_X
96 #define GZWRAP_ROT_Y GZWRAP_ROT.GZWRAP_Y
97 #define GZWRAP_ROT_Z GZWRAP_ROT.GZWRAP_Z
98 #define GZWRAP_ROT_W GZWRAP_ROT.GZWRAP_W
100 #define GZWRAP_ROT_EULER_X GZWRAP_ROT.GZWRAP_EULER.GZWRAP_X
101 #define GZWRAP_ROT_EULER_Y GZWRAP_ROT.GZWRAP_EULER.GZWRAP_Y
102 #define GZWRAP_ROT_EULER_Z GZWRAP_ROT.GZWRAP_EULER.GZWRAP_Z
106 #if GAZEBO_MAJOR_VERSION >= 8
107 typedef ignition::math::Pose3d Pose3d;
108 typedef ignition::math::Vector3d Vector3d;
110 typedef gazebo::math::Pose Pose3d;
111 typedef gazebo::math::Vector3 Vector3d;
116 #endif // UTILS_GAZEBO_API_WRAPPERS_H_