22 #ifndef BULLETPHYSICS_HH
23 #define BULLETPHYSICS_HH
26 #include <boost/thread/thread.hpp>
27 #include <boost/thread/mutex.hpp>
86 public:
virtual void Load(sdf::ElementPtr _sdf);
89 public:
virtual void Init();
92 public:
virtual void Reset();
95 public:
virtual void InitForThread();
98 public:
virtual void UpdateCollision();
101 public:
virtual void UpdatePhysics();
104 public:
virtual void Fini();
114 public:
virtual CollisionPtr CreateCollision(
const std::string &_type,
118 public:
virtual JointPtr CreateJoint(
const std::string &_type,
122 public:
virtual ShapePtr CreateShape(
const std::string &_shapeType,
129 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
132 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
135 public:
virtual void ConvertMass(
InertialPtr _inertial,
139 public:
virtual void ConvertMass(
void *_engineMass,
146 public:
virtual void SetWorldCFM(
double _cfm);
149 public:
virtual double GetWorldCFM();
152 public:
virtual void SetSeed(uint32_t _seed);
156 {
return this->dynamicsWorld;}
158 public:
virtual void DebugPrint()
const;
161 public:
virtual bool SetParam(
const std::string &_key,
162 const boost::any &_value);
165 public:
virtual boost::any GetParam(
const std::string &_key)
const;
168 public:
virtual void SetSORPGSIters(
unsigned int iters);
170 private: btBroadphaseInterface *broadPhase;
171 private: btDefaultCollisionConfiguration *collisionConfig;
172 private: btCollisionDispatcher *dispatcher;
173 private: btSequentialImpulseConstraintSolver *solver;
174 private: btDiscreteDynamicsWorld *dynamicsWorld;
179 private: std::string solverType;
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:82
Surface layer depth.
Definition: BulletPhysics.hh:70
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:110
boost::shared_ptr< Inertial > InertialPtr
Definition: PhysicsTypes.hh:126
Base class for a physics engine.
Definition: PhysicsEngine.hh:40
virtual std::string GetType() const
Return the physics engine type (ode|bullet|dart|simbody).
Definition: BulletPhysics.hh:107
Bullet physics engine.
Definition: BulletPhysics.hh:48
Solve type.
Definition: BulletPhysics.hh:55
Maximum number of contacts.
Definition: BulletPhysics.hh:73
btDynamicsWorld * GetDynamicsWorld() const
Register a joint with the dynamics world.
Definition: BulletPhysics.hh:155
BulletParam
Bullet physics parameter types.
Definition: BulletPhysics.hh:52
Error reduction parameter.
Definition: BulletPhysics.hh:61
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:94
Number of iterations.
Definition: BulletPhysics.hh:64
Constraint force mixing.
Definition: BulletPhysics.hh:58
SOR over-relaxation parameter.
Definition: BulletPhysics.hh:67
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:78
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:98
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:90
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:43