Base class for a physics engine. More...
#include <physics/physics.hh>
Public Member Functions | |
PhysicsEngine (WorldPtr _world) | |
Default constructor. | |
virtual | ~PhysicsEngine () |
Destructor. | |
virtual CollisionPtr | CreateCollision (const std::string &_shapeType, LinkPtr _link)=0 |
Create a collision. | |
CollisionPtr | CreateCollision (const std::string &_shapeType, const std::string &_linkName) |
Create a collision. | |
virtual JointPtr | CreateJoint (const std::string &_type, ModelPtr _parent)=0 |
Create a new joint. | |
virtual LinkPtr | CreateLink (ModelPtr _parent)=0 |
Create a new body. | |
virtual ShapePtr | CreateShape (const std::string &_shapeType, CollisionPtr _collision)=0 |
Create a physics::Shape object. | |
virtual void | DebugPrint () const =0 |
Debug print out of the physic engine state. | |
virtual void | Fini () |
Finilize the physics engine. | |
virtual bool | GetAutoDisableFlag () |
: Remove this function, and replace it with a more generic property map | |
ContactManager * | GetContactManager () const |
Get a pointer to the contact manger. | |
virtual double | GetContactMaxCorrectingVel () |
: Remove this function, and replace it with a more generic property map. | |
virtual double | GetContactSurfaceLayer () |
: Remove this function, and replace it with a more generic property map. | |
virtual math::Vector3 | GetGravity () const |
Return the gavity vector. | |
virtual int | GetMaxContacts () |
: Remove this function, and replace it with a more generic property map. | |
boost::recursive_mutex * | GetPhysicsUpdateMutex () const |
returns a pointer to the PhysicsEngine::physicsUpdateMutex. | |
virtual int | GetSORPGSIters () |
: Remove this function, and replace it with a more generic property map | |
virtual int | GetSORPGSPreconIters () |
: Remove this function, and replace it with a more generic property map | |
virtual double | GetSORPGSW () |
: Remove this function, and replace it with a more generic property map. | |
virtual double | GetStepTime ()=0 |
Get the simulation step time. | |
double | GetUpdatePeriod () |
Get the simulation update period. | |
double | GetUpdateRate () |
Get the simulation update rate. | |
virtual double | GetWorldCFM () |
: Remove this function, and replace it with a more generic property map | |
virtual double | GetWorldERP () |
: Remove this function, and replace it with a more generic property map | |
virtual void | Init ()=0 |
Initialize the physics engine. | |
virtual void | InitForThread ()=0 |
Init the engine for threads. | |
virtual void | Load (sdf::ElementPtr _sdf) |
Load the physics engine. | |
virtual void | Reset () |
Rest the physics engine. | |
virtual void | SetAutoDisableFlag (bool _autoDisable) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetContactMaxCorrectingVel (double _vel) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetContactSurfaceLayer (double _layerDepth) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetGravity (const gazebo::math::Vector3 &_gravity)=0 |
Set the gavity vector. | |
virtual void | SetMaxContacts (double _maxContacts) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetSeed (uint32_t _seed) |
Set the random number seed for the physics engine. | |
virtual void | SetSORPGSIters (unsigned int _iters) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetSORPGSPreconIters (unsigned int _iters) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetSORPGSW (double _w) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetStepTime (double _value)=0 |
Set the simulation step time. | |
void | SetUpdateRate (double _value) |
Set the simulation update rate. | |
virtual void | SetWorldCFM (double _cfm) |
: Remove this function, and replace it with a more generic property map | |
virtual void | SetWorldERP (double _erp) |
: Remove this function, and replace it with a more generic property map | |
virtual void | UpdateCollision ()=0 |
Update the physics engine collision. | |
virtual void | UpdatePhysics () |
Update the physics engine. | |
Protected Member Functions | |
virtual void | OnPhysicsMsg (ConstPhysicsPtr &_msg) |
virtual callback for gztopic "~/physics". | |
virtual void | OnRequest (ConstRequestPtr &_msg) |
virtual callback for gztopic "~/request". | |
Protected Attributes | |
ContactManager * | contactManager |
Class that handles all contacts generated by the physics engine. | |
transport::NodePtr | node |
Node for communication. | |
transport::SubscriberPtr | physicsSub |
Subscribe to the physics topic. | |
boost::recursive_mutex * | physicsUpdateMutex |
Mutex to protect the update cycle. | |
transport::SubscriberPtr | requestSub |
Subscribe to the request topic. | |
transport::PublisherPtr | responsePub |
Response publisher. | |
sdf::ElementPtr | sdf |
Our SDF values. | |
WorldPtr | world |
Pointer to the world. | |
Base class for a physics engine.
|
explicit |
Default constructor.
[in] | _world | Pointer to the world. |
|
virtual |
Destructor.
|
pure virtual |
Create a collision.
[in] | _shapeType | Type of collision to create. |
[in] | _link | Parent link. |
CollisionPtr gazebo::physics::PhysicsEngine::CreateCollision | ( | const std::string & | _shapeType, |
const std::string & | _linkName | ||
) |
Create a collision.
[in] | _shapeType | Type of collision to create. |
[in] | _linkName | Name of the parent link. |
|
pure virtual |
Create a new joint.
[in] | _type | Type of joint to create. |
[in] | _parent | Model parent. |
Create a new body.
[in] | _parent | Parent model for the link. |
|
pure virtual |
Create a physics::Shape object.
[in] | _shapeType | Type of shape to create. |
[in] | _collision | Collision parent. |
|
pure virtual |
Debug print out of the physic engine state.
|
virtual |
Finilize the physics engine.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map
access functions to set ODE parameters..
ContactManager* gazebo::physics::PhysicsEngine::GetContactManager | ( | ) | const |
Get a pointer to the contact manger.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map.
access functions to set ODE parameters.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map.
access functions to set ODE parameters.
|
virtual |
Return the gavity vector.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map.
access functions to set ODE parameters.
|
inline |
returns a pointer to the PhysicsEngine::physicsUpdateMutex.
References physicsUpdateMutex.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map
access functions to set ODE parameters.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map
access functions to set ODE parameters.
|
inlinevirtual |
: Remove this function, and replace it with a more generic property map.
access functions to set ODE parameters
|
pure virtual |
Get the simulation step time.
double gazebo::physics::PhysicsEngine::GetUpdatePeriod | ( | ) |
Get the simulation update period.
double gazebo::physics::PhysicsEngine::GetUpdateRate | ( | ) |
Get the simulation update rate.
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Initialize the physics engine.
|
pure virtual |
Init the engine for threads.
|
virtual |
Load the physics engine.
[in] | _sdf | Pointer to the SDF parameters. |
|
protectedvirtual |
virtual callback for gztopic "~/physics".
[in] | _msg | Physics message. |
|
protectedvirtual |
virtual callback for gztopic "~/request".
[in] | _msg | Request message. |
|
inlinevirtual |
Rest the physics engine.
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _autoDisable | True to enable auto disabling of bodies. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _vel | Max correcting velocity. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _layerDepth | Surface layer depth |
|
pure virtual |
Set the gavity vector.
[in] | _gravity | New gravity vector. |
|
virtual |
: Remove this function, and replace it with a more generic property map
access functions to set ODE parameters
[in] | _maxContacts | Maximum number of contacts. |
|
virtual |
Set the random number seed for the physics engine.
[in] | _seed | The random number seed. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _iter | Number of iterations. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _iter | Number of iterations. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _w | SORPGSW value. |
|
pure virtual |
Set the simulation step time.
[in] | _value | Value of the step time. |
void gazebo::physics::PhysicsEngine::SetUpdateRate | ( | double | _value | ) |
Set the simulation update rate.
[in] | _value | Value of the update rate. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _cfm | Constraint force mixing. |
|
virtual |
: Remove this function, and replace it with a more generic property map
Access functions to set ODE parameters.
[in] | _erp | Error reduction parameter. |
|
pure virtual |
Update the physics engine collision.
|
inlinevirtual |
Update the physics engine.
|
protected |
Class that handles all contacts generated by the physics engine.
|
protected |
Node for communication.
|
protected |
Subscribe to the physics topic.
|
protected |
Mutex to protect the update cycle.
Referenced by GetPhysicsUpdateMutex().
|
protected |
Subscribe to the request topic.
|
protected |
Response publisher.
|
protected |
Our SDF values.
|
protected |
Pointer to the world.