18#ifndef _GAZEBO_DARTPHYSICS_HH_
19#define _GAZEBO_DARTPHYSICS_HH_
23#include <boost/thread/thread.hpp>
24#include <boost/thread/mutex.hpp>
39 class DARTPhysicsPrivate;
85 public:
virtual void Load(sdf::ElementPtr _sdf);
88 public:
virtual void Init();
91 public:
virtual void Fini();
137 public:
virtual void SetGravity(
const ignition::math::Vector3d &_gravity);
143 public:
virtual boost::any
GetParam(
const std::string &_key)
const;
146 public:
virtual bool GetParam(
const std::string &_key,
147 boost::any &_value)
const;
150 public:
virtual bool SetParam(
const std::string &_key,
151 const boost::any &_value);
163 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
172 const dart::dynamics::BodyNode *_dtBodyNode);
176 private: DARTPhysicsPrivate *dataPtr =
nullptr;
DART wrapper forward declarations and typedefs.
DART physics engine.
Definition DARTPhysics.hh:48
virtual bool GetParam(const std::string &_key, boost::any &_value) const
Get a parameter from the physics engine with a boolean to indicate success or failure.
virtual LinkPtr CreateLink(ModelPtr _parent)
Create a new body.
std::string GetSolverType() const
Get the constraint LCP solver type.
std::string CollisionDetectorInUse() const
Returns a string with the name of the used collision detector.
virtual void Fini()
Finilize the physics engine.
virtual ~DARTPhysics()
Destructor.
virtual void Init()
Initialize the physics engine.
DARTParam
DART physics parameter types.
Definition DARTPhysics.hh:52
@ MIN_STEP_SIZE
Minimum step size.
Definition DARTPhysics.hh:75
@ MAX_CONTACTS
Maximum number of contacts.
Definition DARTPhysics.hh:72
virtual void Reset()
Rest the physics engine.
virtual void UpdateCollision()
Update the physics engine collision.
virtual void UpdatePhysics()
Update the physics engine.
virtual void OnRequest(ConstRequestPtr &_msg)
virtual callback for gztopic "~/request".
virtual ShapePtr CreateShape(const std::string &_shapeType, CollisionPtr _collision)
Create a physics::Shape object.
virtual void InitForThread()
Init the engine for threads.
dart::simulation::WorldPtr DARTWorld() const
Get pointer to DART World associated with this DART Physics.
DARTPhysics(WorldPtr _world)
Constructor.
virtual std::string GetType() const
Return the physics engine type (ode|bullet|dart|simbody).
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg)
virtual callback for gztopic "~/physics".
virtual boost::any GetParam(const std::string &_key) const
Get an parameter of the physics engine.
virtual void SetGravity(const ignition::math::Vector3d &_gravity)
Set the gravity vector.
virtual CollisionPtr CreateCollision(const std::string &_type, LinkPtr _body)
Create a collision.
void SetSolverType(const std::string &_type)
Set the constraint LCP solver type.
virtual void DebugPrint() const
Debug print out of the physic engine state.
virtual void Load(sdf::ElementPtr _sdf)
Load the physics engine.
virtual bool SetParam(const std::string &_key, const boost::any &_value)
Set a parameter of the physics engine.
virtual void SetSeed(uint32_t _seed)
Set the random number seed for the physics engine.
virtual JointPtr CreateJoint(const std::string &_type, ModelPtr _parent)
Create a new joint.
virtual ModelPtr CreateModel(BasePtr _parent)
Create a new model.
Base class for a physics engine.
Definition PhysicsEngine.hh:42
boost::shared_ptr< Link > LinkPtr
Definition PhysicsTypes.hh:109
boost::shared_ptr< DARTLink > DARTLinkPtr
Definition DARTTypes.hh:47
boost::shared_ptr< Collision > CollisionPtr
Definition PhysicsTypes.hh:113
boost::shared_ptr< Base > BasePtr
Definition PhysicsTypes.hh:77
boost::shared_ptr< Shape > ShapePtr
Definition PhysicsTypes.hh:141
boost::shared_ptr< World > WorldPtr
Definition PhysicsTypes.hh:89
boost::shared_ptr< Model > ModelPtr
Definition PhysicsTypes.hh:93
boost::shared_ptr< Joint > JointPtr
Definition PhysicsTypes.hh:117
Forward declarations for the common classes.
Definition Animation.hh:27