22 #ifndef BULLETPHYSICS_HH 23 #define BULLETPHYSICS_HH 26 #include <boost/thread/thread.hpp> 27 #include <boost/thread/mutex.hpp> 87 public:
virtual void Load(sdf::ElementPtr _sdf);
90 public:
virtual void Init();
93 public:
virtual void Reset();
96 public:
virtual void InitForThread();
99 public:
virtual void UpdateCollision();
102 public:
virtual void UpdatePhysics();
105 public:
virtual void Fini();
115 public:
virtual CollisionPtr CreateCollision(
const std::string &_type,
119 public:
virtual JointPtr CreateJoint(
const std::string &_type,
123 public:
virtual ShapePtr CreateShape(
const std::string &_shapeType,
130 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
133 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
136 public:
virtual void ConvertMass(
InertialPtr _inertial,
140 public:
virtual void ConvertMass(
void *_engineMass,
144 public:
virtual void SetGravity(
const ignition::math::Vector3d &_gravity);
147 public:
virtual void SetWorldCFM(
double _cfm);
150 public:
virtual double GetWorldCFM();
153 public:
virtual void SetSeed(uint32_t _seed);
157 {
return this->dynamicsWorld;}
159 public:
virtual void DebugPrint()
const;
162 public:
virtual bool SetParam(
const std::string &_key,
163 const boost::any &_value);
166 public:
virtual boost::any GetParam(
const std::string &_key)
const;
169 public:
virtual bool GetParam(
const std::string &_key,
170 boost::any &_value)
const;
173 public:
virtual void SetSORPGSIters(
unsigned int iters);
175 private: btBroadphaseInterface *broadPhase;
176 private: btDefaultCollisionConfiguration *collisionConfig;
177 private: btCollisionDispatcher *dispatcher;
178 private: btSequentialImpulseConstraintSolver *solver;
179 private: btDiscreteDynamicsWorld *dynamicsWorld;
184 private: std::string solverType;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:90
BulletParam
Bullet physics parameter types.
Definition: BulletPhysics.hh:53
Forward declarations for the common classes.
Definition: Animation.hh:26
Base class for a physics engine.
Definition: PhysicsEngine.hh:42
Bullet physics engine.
Definition: BulletPhysics.hh:49
Surface layer depth.
Definition: BulletPhysics.hh:71
SOR over-relaxation parameter.
Definition: BulletPhysics.hh:68
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:118
virtual std::string GetType() const
Return the physics engine type (ode|bullet|dart|simbody).
Definition: BulletPhysics.hh:108
Number of iterations.
Definition: BulletPhysics.hh:65
Solve type.
Definition: BulletPhysics.hh:56
boost::shared_ptr< Inertial > InertialPtr
Definition: PhysicsTypes.hh:158
Maximum number of contacts.
Definition: BulletPhysics.hh:74
Constraint force mixing.
Definition: BulletPhysics.hh:59
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:142
Error reduction parameter.
Definition: BulletPhysics.hh:62
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
btDynamicsWorld * GetDynamicsWorld() const
Register a joint with the dynamics world.
Definition: BulletPhysics.hh:156
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:114
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:47