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 bool GetParam(
const std::string &_key,
169 boost::any &_value)
const;
172 public:
virtual void SetSORPGSIters(
unsigned int iters);
174 private: btBroadphaseInterface *broadPhase;
175 private: btDefaultCollisionConfiguration *collisionConfig;
176 private: btCollisionDispatcher *dispatcher;
177 private: btSequentialImpulseConstraintSolver *solver;
178 private: btDiscreteDynamicsWorld *dynamicsWorld;
183 private: std::string solverType;
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:84
#define GZ_PHYSICS_VISIBLE
Definition: system.hh:318
Surface layer depth.
Definition: BulletPhysics.hh:70
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:116
boost::shared_ptr< Inertial > InertialPtr
Definition: PhysicsTypes.hh:132
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:96
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:80
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:100
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:92
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:39