Public Types | Public Member Functions | Protected Member Functions | List of all members
gazebo::physics::BulletPhysics Class Reference

Bullet physics engine. More...

#include <BulletPhysics.hh>

Inheritance diagram for gazebo::physics::BulletPhysics:
Inheritance graph
[legend]

Public Types

enum  BulletParam {
  SOLVER_TYPE, GLOBAL_CFM, GLOBAL_ERP, PGS_ITERS,
  SOR, CONTACT_SURFACE_LAYER, MAX_CONTACTS, MIN_STEP_SIZE
}
 Bullet physics parameter types. More...
 

Public Member Functions

 BulletPhysics (WorldPtr _world)
 Constructor. More...
 
virtual ~BulletPhysics ()
 Destructor. More...
 
virtual void ConvertMass (InertialPtr _inertial, void *_engineMass)
 Convert a bullet mass to a gazebo Mass. More...
 
virtual void ConvertMass (void *_engineMass, InertialPtr _inertial)
 Convert a gazebo Mass to a bullet Mass. More...
 
virtual CollisionPtr CreateCollision (const std::string &_type, LinkPtr _body)
 Create a collision. More...
 
virtual JointPtr CreateJoint (const std::string &_type, ModelPtr _parent)
 Create a new joint. More...
 
virtual LinkPtr CreateLink (ModelPtr _parent)
 Create a new body. More...
 
virtual ShapePtr CreateShape (const std::string &_shapeType, CollisionPtr _collision)
 Create a physics::Shape object. More...
 
virtual void DebugPrint () const
 Debug print out of the physic engine state. More...
 
virtual void Fini ()
 Finilize the physics engine. More...
 
btDynamicsWorld * GetDynamicsWorld () const
 Register a joint with the dynamics world. More...
 
virtual boost::any GetParam (const std::string &_key) const
 Documentation inherited. More...
 
virtual bool GetParam (const std::string &_key, boost::any &_value) const
 Documentation inherited. More...
 
virtual std::string GetType () const
 Return the physics engine type (ode|bullet|dart|simbody). More...
 
virtual double GetWorldCFM ()
 : Remove this function, and replace it with a more generic property map More...
 
virtual void Init ()
 Initialize the physics engine. More...
 
virtual void InitForThread ()
 Init the engine for threads. More...
 
virtual void Load (sdf::ElementPtr _sdf)
 Load the physics engine. More...
 
virtual void Reset ()
 Rest the physics engine. More...
 
virtual void SetGravity (const gazebo::math::Vector3 &_gravity)
 Set the gravity vector. More...
 
virtual bool SetParam (const std::string &_key, const boost::any &_value)
 Documentation inherited. More...
 
virtual void SetSeed (uint32_t _seed)
 Set the random number seed for the physics engine. More...
 
virtual void SetSORPGSIters (unsigned int iters)
 
virtual void SetWorldCFM (double _cfm)
 : Remove this function, and replace it with a more generic property map More...
 
virtual void UpdateCollision ()
 Update the physics engine collision. More...
 
virtual void UpdatePhysics ()
 Update the physics engine. More...
 
- Public Member Functions inherited from gazebo::physics::PhysicsEngine
 PhysicsEngine (WorldPtr _world)
 Default constructor. More...
 
virtual ~PhysicsEngine ()
 Destructor. More...
 
CollisionPtr CreateCollision (const std::string &_shapeType, const std::string &_linkName)
 Create a collision. More...
 
virtual ModelPtr CreateModel (BasePtr _base)
 Create a new model. More...
 
virtual bool GetAutoDisableFlag ()
 : Remove this function, and replace it with a more generic property map More...
 
ContactManagerGetContactManager () const
 Get a pointer to the contact manger. More...
 
virtual double GetContactMaxCorrectingVel () GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map. More...
 
virtual double GetContactSurfaceLayer () GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map. More...
 
virtual math::Vector3 GetGravity () const
 Return the gravity vector. More...
 
virtual unsigned int GetMaxContacts ()
 : Remove this function, and replace it with a more generic property map. More...
 
double GetMaxStepSize () const
 Get max step size. More...
 
boost::recursive_mutex * GetPhysicsUpdateMutex () const
 returns a pointer to the PhysicsEngine::physicsUpdateMutex. More...
 
double GetRealTimeUpdateRate () const
 Get real time update rate. More...
 
sdf::ElementPtr GetSDF () const
 Get a pointer to the SDF element for this physics engine. More...
 
double GetTargetRealTimeFactor () const
 Get target real time factor. More...
 
double GetUpdatePeriod ()
 Get the simulation update period. More...
 
virtual double GetWorldERP () GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map More...
 
virtual ignition::math::Vector3d MagneticField () const
 Return the magnetic field vector. More...
 
virtual void SetAutoDisableFlag (bool _autoDisable)
 : Remove this function, and replace it with a more generic property map More...
 
virtual void SetContactMaxCorrectingVel (double) GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map More...
 
virtual void SetContactSurfaceLayer (double) GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map More...
 
virtual void SetMaxContacts (unsigned int _maxContacts)
 : Remove this function, and replace it with a more generic property map More...
 
void SetMaxStepSize (double _stepSize)
 Set max step size. More...
 
void SetRealTimeUpdateRate (double _rate)
 Set real time update rate. More...
 
void SetTargetRealTimeFactor (double _factor)
 Set target real time factor. More...
 
virtual void SetWorldERP (double) GAZEBO_DEPRECATED(6.0)
 : Remove this function, and replace it with a more generic property map More...
 

Protected Member Functions

virtual void OnPhysicsMsg (ConstPhysicsPtr &_msg)
 virtual callback for gztopic "~/physics". More...
 
virtual void OnRequest (ConstRequestPtr &_msg)
 Create a physics based ray sensor. More...
 

Additional Inherited Members

- Protected Attributes inherited from gazebo::physics::PhysicsEngine
ContactManagercontactManager
 Class that handles all contacts generated by the physics engine. More...
 
double maxStepSize
 Real time update rate. More...
 
transport::NodePtr node
 Node for communication. More...
 
transport::SubscriberPtr physicsSub
 Subscribe to the physics topic. More...
 
boost::recursive_mutex * physicsUpdateMutex
 Mutex to protect the update cycle. More...
 
double realTimeUpdateRate
 Real time update rate. More...
 
transport::SubscriberPtr requestSub
 Subscribe to the request topic. More...
 
transport::PublisherPtr responsePub
 Response publisher. More...
 
sdf::ElementPtr sdf
 Our SDF values. More...
 
double targetRealTimeFactor
 Target real time factor. More...
 
WorldPtr world
 Pointer to the world. More...
 

Detailed Description

Bullet physics engine.

Member Enumeration Documentation

Bullet physics parameter types.

Enumerator
SOLVER_TYPE 

Solve type.

GLOBAL_CFM 

Constraint force mixing.

GLOBAL_ERP 

Error reduction parameter.

PGS_ITERS 

Number of iterations.

SOR 

SOR over-relaxation parameter.

CONTACT_SURFACE_LAYER 

Surface layer depth.

MAX_CONTACTS 

Maximum number of contacts.

MIN_STEP_SIZE 

Minimum step size.

Constructor & Destructor Documentation

gazebo::physics::BulletPhysics::BulletPhysics ( WorldPtr  _world)

Constructor.

virtual gazebo::physics::BulletPhysics::~BulletPhysics ( )
virtual

Destructor.

Member Function Documentation

virtual void gazebo::physics::BulletPhysics::ConvertMass ( InertialPtr  _inertial,
void *  _engineMass 
)
virtual

Convert a bullet mass to a gazebo Mass.

virtual void gazebo::physics::BulletPhysics::ConvertMass ( void *  _engineMass,
InertialPtr  _inertial 
)
virtual

Convert a gazebo Mass to a bullet Mass.

virtual CollisionPtr gazebo::physics::BulletPhysics::CreateCollision ( const std::string &  _shapeType,
LinkPtr  _link 
)
virtual

Create a collision.

Parameters
[in]_shapeTypeType of collision to create.
[in]_linkParent link.

Implements gazebo::physics::PhysicsEngine.

virtual JointPtr gazebo::physics::BulletPhysics::CreateJoint ( const std::string &  _type,
ModelPtr  _parent 
)
virtual

Create a new joint.

Parameters
[in]_typeType of joint to create.
[in]_parentModel parent.

Implements gazebo::physics::PhysicsEngine.

virtual LinkPtr gazebo::physics::BulletPhysics::CreateLink ( ModelPtr  _parent)
virtual

Create a new body.

Parameters
[in]_parentParent model for the link.

Implements gazebo::physics::PhysicsEngine.

virtual ShapePtr gazebo::physics::BulletPhysics::CreateShape ( const std::string &  _shapeType,
CollisionPtr  _collision 
)
virtual

Create a physics::Shape object.

Parameters
[in]_shapeTypeType of shape to create.
[in]_collisionCollision parent.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::DebugPrint ( ) const
virtual

Debug print out of the physic engine state.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::Fini ( )
virtual

Finilize the physics engine.

Reimplemented from gazebo::physics::PhysicsEngine.

btDynamicsWorld* gazebo::physics::BulletPhysics::GetDynamicsWorld ( ) const
inline

Register a joint with the dynamics world.

virtual boost::any gazebo::physics::BulletPhysics::GetParam ( const std::string &  _key) const
virtual

Documentation inherited.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual bool gazebo::physics::BulletPhysics::GetParam ( const std::string &  _key,
boost::any &  _value 
) const
virtual

Documentation inherited.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual std::string gazebo::physics::BulletPhysics::GetType ( ) const
inlinevirtual

Return the physics engine type (ode|bullet|dart|simbody).

Returns
Type of the physics engine.

Implements gazebo::physics::PhysicsEngine.

virtual double gazebo::physics::BulletPhysics::GetWorldCFM ( )
virtual

: Remove this function, and replace it with a more generic property map

Get World CFM.

Returns
World CFM.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::Init ( )
virtual

Initialize the physics engine.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::InitForThread ( )
virtual

Init the engine for threads.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::Load ( sdf::ElementPtr  _sdf)
virtual

Load the physics engine.

Parameters
[in]_sdfPointer to the SDF parameters.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::OnPhysicsMsg ( ConstPhysicsPtr &  _msg)
protectedvirtual

virtual callback for gztopic "~/physics".

Parameters
[in]_msgPhysics message.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::OnRequest ( ConstRequestPtr &  _msg)
protectedvirtual

Create a physics based ray sensor.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::Reset ( )
virtual

Rest the physics engine.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::SetGravity ( const gazebo::math::Vector3 _gravity)
virtual

Set the gravity vector.

Parameters
[in]_gravityNew gravity vector.

Implements gazebo::physics::PhysicsEngine.

virtual bool gazebo::physics::BulletPhysics::SetParam ( const std::string &  _key,
const boost::any &  _value 
)
virtual

Documentation inherited.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::SetSeed ( uint32_t  _seed)
virtual

Set the random number seed for the physics engine.

Parameters
[in]_seedThe random number seed.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::SetSORPGSIters ( unsigned int  iters)
virtual
virtual void gazebo::physics::BulletPhysics::SetWorldCFM ( double  )
virtual

: Remove this function, and replace it with a more generic property map

Access functions to set ODE parameters.

Parameters
[in]_cfmConstraint force mixing.

Reimplemented from gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::UpdateCollision ( )
virtual

Update the physics engine collision.

Implements gazebo::physics::PhysicsEngine.

virtual void gazebo::physics::BulletPhysics::UpdatePhysics ( )
virtual

Update the physics engine.

Reimplemented from gazebo::physics::PhysicsEngine.


The documentation for this class was generated from the following file: