PhysicsTypes.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GAZEBO_PHYSICS_PHYSICSTYPES_HH_
18 #define GAZEBO_PHYSICS_PHYSICSTYPES_HH_
19 
20 #include <map>
21 #include <memory>
22 #include <string>
23 #include <vector>
24 #include <boost/shared_ptr.hpp>
25 
26 #include "gazebo/msgs/poses_stamped.pb.h"
27 #include "gazebo/util/system.hh"
28 
32 namespace gazebo
33 {
35  namespace physics
36  {
37  class Base;
38  class Entity;
39  class World;
40  class Model;
41  class Actor;
42  class Light;
43  class Link;
44  class Collision;
45  class FrictionPyramid;
46  class Gripper;
47  class Joint;
48  class JointController;
49  class Contact;
50  class PresetManager;
51  class UserCmd;
52  class UserCmdManager;
53  class PhysicsEngine;
54  class Wind;
55  class Atmosphere;
56  class Mass;
57  class Road;
58  class Shape;
59  class RayShape;
60  class MultiRayShape;
61  class Inertial;
62  class SurfaceParams;
63  class BoxShape;
64  class CylinderShape;
65  class MeshShape;
66  class SphereShape;
67  class PlaneShape;
68  class HeightmapShape;
69  class PolylineShape;
70  class ModelState;
71  class LightState;
72  class LinkState;
73  class JointState;
74  class TrajectoryInfo;
75 
78  typedef boost::shared_ptr<Base> BasePtr;
79 
82  typedef boost::shared_ptr<Contact> ContactPtr;
83 
86  typedef boost::shared_ptr<Entity> EntityPtr;
87 
90  typedef boost::shared_ptr<World> WorldPtr;
91 
94  typedef boost::shared_ptr<Model> ModelPtr;
95 
98  typedef boost::shared_ptr<Actor> ActorPtr;
99 
102  typedef std::shared_ptr<TrajectoryInfo> TrajectoryInfoPtr;
103 
106  typedef boost::shared_ptr<Light> LightPtr;
107 
110  typedef boost::shared_ptr<Link> LinkPtr;
111 
114  typedef boost::shared_ptr<Collision> CollisionPtr;
115 
118  typedef boost::shared_ptr<Joint> JointPtr;
119 
122  typedef boost::shared_ptr<JointController> JointControllerPtr;
123 
126  typedef boost::shared_ptr<PhysicsEngine> PhysicsEnginePtr;
127 
130  typedef boost::shared_ptr<PresetManager> PresetManagerPtr;
131 
134  typedef std::shared_ptr<UserCmd> UserCmdPtr;
135 
138  typedef std::shared_ptr<UserCmdManager> UserCmdManagerPtr;
139 
142  typedef boost::shared_ptr<Shape> ShapePtr;
143 
146  typedef boost::shared_ptr<RayShape> RayShapePtr;
147 
150  typedef boost::shared_ptr<HeightmapShape> HeightmapShapePtr;
151 
154  typedef boost::shared_ptr<MultiRayShape> MultiRayShapePtr;
155 
158  typedef boost::shared_ptr<Inertial> InertialPtr;
159 
162  typedef boost::shared_ptr<Road> RoadPtr;
163 
166  typedef boost::shared_ptr<FrictionPyramid> FrictionPyramidPtr;
167 
170  typedef boost::shared_ptr<SurfaceParams> SurfaceParamsPtr;
171 
174  typedef boost::shared_ptr<BoxShape> BoxShapePtr;
175 
178  typedef boost::shared_ptr<CylinderShape> CylinderShapePtr;
179 
182  typedef boost::shared_ptr<PlaneShape> PlaneShapePtr;
183 
186  typedef boost::shared_ptr<MeshShape> MeshShapePtr;
187 
190  typedef boost::shared_ptr<PolylineShape> PolylineShapePtr;
191 
194  typedef boost::shared_ptr<SphereShape> SphereShapePtr;
195 
198  typedef boost::shared_ptr<Gripper> GripperPtr;
199 
202  typedef std::vector<BasePtr> Base_V;
203 
206  typedef std::vector<ModelPtr> Model_V;
207 
210  typedef std::vector<ActorPtr> Actor_V;
211 
214  typedef std::vector<JointPtr> Joint_V;
215 
218  typedef std::vector<JointControllerPtr> JointController_V;
219 
222  typedef std::vector<LightPtr> Light_V;
223 
226  typedef std::vector<LinkPtr> Link_V;
227 
230  typedef std::vector<CollisionPtr> Collision_V;
231 
234  typedef std::map<std::string, ModelState> ModelState_M;
235 
238  typedef std::map<std::string, LightState> LightState_M;
239 
242  typedef std::map<std::string, LinkState> LinkState_M;
243 
246  typedef std::map<std::string, JointState> JointState_M;
247 
251  using UpdateScenePosesFunc =
252  std::function<void(const std::string &, const msgs::PosesStamped &)>;
253 
254  #ifndef GZ_COLLIDE_BITS
255 
259  #define GZ_ALL_COLLIDE 0x0FFFFFFF
260 
263  #define GZ_NONE_COLLIDE 0x00000000
264 
267  #define GZ_FIXED_COLLIDE 0x00000001
268 
271  #define GZ_SENSOR_COLLIDE 0x00000002
272 
275  #define GZ_GHOST_COLLIDE 0x10000000
276 
277  #endif
278  }
279 }
280 #endif
boost::shared_ptr< Actor > ActorPtr
Definition: PhysicsTypes.hh:98
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
std::shared_ptr< UserCmd > UserCmdPtr
Definition: PhysicsTypes.hh:134
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:90
boost::shared_ptr< PresetManager > PresetManagerPtr
Definition: PhysicsTypes.hh:130
boost::shared_ptr< FrictionPyramid > FrictionPyramidPtr
Definition: PhysicsTypes.hh:166
Forward declarations for the common classes.
Definition: Animation.hh:26
std::map< std::string, ModelState > ModelState_M
Definition: PhysicsTypes.hh:234
std::vector< ModelPtr > Model_V
Definition: PhysicsTypes.hh:206
std::function< void(const std::string &, const msgs::PosesStamped &)> UpdateScenePosesFunc
Function signature for API that updates scene poses.
Definition: PhysicsTypes.hh:252
boost::shared_ptr< SphereShape > SphereShapePtr
Definition: PhysicsTypes.hh:194
boost::shared_ptr< PolylineShape > PolylineShapePtr
Definition: PhysicsTypes.hh:190
std::vector< LightPtr > Light_V
Definition: PhysicsTypes.hh:222
std::map< std::string, JointState > JointState_M
Definition: PhysicsTypes.hh:246
std::shared_ptr< TrajectoryInfo > TrajectoryInfoPtr
Definition: PhysicsTypes.hh:102
std::shared_ptr< UserCmdManager > UserCmdManagerPtr
Definition: PhysicsTypes.hh:138
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:118
std::vector< JointControllerPtr > JointController_V
Definition: PhysicsTypes.hh:218
boost::shared_ptr< SurfaceParams > SurfaceParamsPtr
Definition: PhysicsTypes.hh:170
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:126
std::map< std::string, LightState > LightState_M
Definition: PhysicsTypes.hh:238
boost::shared_ptr< PlaneShape > PlaneShapePtr
Definition: PhysicsTypes.hh:182
boost::shared_ptr< CylinderShape > CylinderShapePtr
Definition: PhysicsTypes.hh:178
boost::shared_ptr< MultiRayShape > MultiRayShapePtr
Definition: PhysicsTypes.hh:154
boost::shared_ptr< Gripper > GripperPtr
Definition: PhysicsTypes.hh:198
Used to render a strip of road.
std::vector< JointPtr > Joint_V
Definition: PhysicsTypes.hh:214
boost::shared_ptr< HeightmapShape > HeightmapShapePtr
Definition: PhysicsTypes.hh:150
std::vector< CollisionPtr > Collision_V
Definition: PhysicsTypes.hh:230
boost::shared_ptr< Contact > ContactPtr
Definition: PhysicsTypes.hh:82
boost::shared_ptr< Inertial > InertialPtr
Definition: PhysicsTypes.hh:158
std::vector< BasePtr > Base_V
Definition: PhysicsTypes.hh:202
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:86
boost::shared_ptr< Road > RoadPtr
Definition: PhysicsTypes.hh:162
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:142
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:146
boost::shared_ptr< JointController > JointControllerPtr
Definition: PhysicsTypes.hh:122
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
std::map< std::string, LinkState > LinkState_M
Definition: PhysicsTypes.hh:242
std::vector< ActorPtr > Actor_V
Definition: PhysicsTypes.hh:210
boost::shared_ptr< BoxShape > BoxShapePtr
Definition: PhysicsTypes.hh:174
boost::shared_ptr< Light > LightPtr
Definition: PhysicsTypes.hh:106
std::vector< LinkPtr > Link_V
Definition: PhysicsTypes.hh:226
boost::shared_ptr< MeshShape > MeshShapePtr
Definition: PhysicsTypes.hh:186
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:114
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:78