Go to the documentation of this file.
17 #ifndef GAZEBO_PHYSICS_DART_DARTLINK_HH_
18 #define GAZEBO_PHYSICS_DART_DARTLINK_HH_
33 class DARTLinkPrivate;
48 public:
virtual void Load(sdf::ElementPtr _ptr);
51 public:
virtual void Init();
54 public:
virtual void Fini();
57 public:
virtual void OnPoseChange();
60 public:
virtual void SetEnabled(
bool _enable)
const;
63 public:
virtual bool GetEnabled()
const;
66 public:
virtual void SetLinearVel(
const ignition::math::Vector3d &_vel);
69 public:
virtual void SetAngularVel(
const ignition::math::Vector3d &_vel);
72 public:
virtual void SetForce(
const ignition::math::Vector3d &_force);
75 public:
virtual void SetTorque(
const ignition::math::Vector3d &_torque);
78 public:
virtual void AddForce(
const ignition::math::Vector3d &_force);
81 public:
virtual void AddRelativeForce(
82 const ignition::math::Vector3d &_force);
85 public:
virtual void AddForceAtWorldPosition(
86 const ignition::math::Vector3d &_force,
87 const ignition::math::Vector3d &_pos);
90 public:
virtual void AddForceAtRelativePosition(
91 const ignition::math::Vector3d &_force,
92 const ignition::math::Vector3d &_relpos);
95 public:
virtual void AddLinkForce(
96 const ignition::math::Vector3d &_force,
97 const ignition::math::Vector3d &_offset =
98 ignition::math::Vector3d::Zero);
101 public:
virtual void AddTorque(
const ignition::math::Vector3d &_torque);
104 public:
virtual void AddRelativeTorque(
105 const ignition::math::Vector3d &_torque);
108 public:
virtual ignition::math::Vector3d WorldLinearVel(
109 const ignition::math::Vector3d &_offset =
110 ignition::math::Vector3d::Zero)
const;
113 public:
virtual ignition::math::Vector3d WorldLinearVel(
114 const ignition::math::Vector3d &_offset,
115 const ignition::math::Quaterniond &_q)
const;
118 public:
virtual ignition::math::Vector3d WorldCoGLinearVel()
const;
121 public:
virtual ignition::math::Vector3d WorldAngularVel()
const;
124 public:
virtual ignition::math::Vector3d WorldForce()
const;
127 public:
virtual ignition::math::Vector3d WorldTorque()
const;
130 public:
virtual void SetGravityMode(
bool _mode);
133 public:
virtual bool GetGravityMode()
const;
136 public:
virtual void SetSelfCollide(
bool _collide);
139 public:
virtual void SetLinearDamping(
double _damping);
142 public:
virtual void SetAngularDamping(
double _damping);
145 public:
virtual void SetKinematic(
const bool &_state);
148 public:
virtual bool GetKinematic()
const;
151 public:
virtual void SetAutoDisable(
bool _disable);
154 public:
virtual void SetLinkStatic(
bool _static);
157 public:
virtual void UpdateMass();
162 public:
void updateDirtyPoseFromDARTTransformation();
181 public:
void SetDARTBodyNode(dart::dynamics::BodyNode *_dtBodyNode);
185 public:
void AddSlaveBodyNode(dart::dynamics::BodyNode *_dtBodyNode);
189 public: dart::dynamics::BodyNode *DARTBodyNode()
const;
193 public:
void SetDARTParentJoint(
DARTJointPtr _dartParentJoint);
197 public:
void AddDARTChildJoint(
DARTJointPtr _dartChildJoint);
201 public:
bool IsSoftBody()
const;
205 private: DARTLinkPrivate *dataPtr;
virtual ignition::math::Vector3d WorldAngularVel() const
Get the angular velocity of the entity in the world frame.
void SetDARTBodyNode(dart::dynamics::BodyNode *_dtBodyNode)
Set pointer to DART BodyNode associated with this link.
DART wrapper forward declarations and typedefs.
virtual void SetGravityMode(bool _mode)
Set whether gravity affects this body.
boost::shared_ptr< DARTJoint > DARTJointPtr
Definition: DARTTypes.hh:48
virtual ignition::math::Vector3d WorldLinearVel() const
Get the linear velocity of the origin of the link frame, expressed in the world frame.
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual void SetAutoDisable(bool _disable)
Allow the link to auto disable.
DARTLink(EntityPtr _parent)
Constructor.
DARTPhysicsPtr GetDARTPhysics(void) const
Get pointer to DART Physics engine associated with this link.
virtual void SetForce(const ignition::math::Vector3d &_force)
Set the force applied to the body.
void SetDARTParentJoint(DARTJointPtr _dartParentJoint)
Set parent joint of this link.
virtual void SetKinematic(const bool &_state)
\TODO Implement this function.
virtual void UpdateMass()
Update the mass matrix.
virtual void SetAngularDamping(double _damping)
Set the angular damping factor.
virtual void Load(sdf::ElementPtr _ptr)
Load the body based on an SDF element.
DARTBodyNodePropPtr DARTProperties() const
Get DART BodyNode properties.
virtual void SetTorque(const ignition::math::Vector3d &_torque)
Set the torque applied to the body.
virtual void AddRelativeTorque(const ignition::math::Vector3d &_torque)
Add a torque to the body, components are relative to the body's own frame of reference.
boost::shared_ptr< DARTPhysics > DARTPhysicsPtr
Definition: DARTTypes.hh:43
virtual ignition::math::Vector3d WorldTorque() const
Get the torque applied to the body about the center of mass in world frame coordinates.
Link class defines a rigid body entity, containing information on inertia, visual and collision prope...
Definition: Link.hh:58
virtual ignition::math::Vector3d WorldCoGLinearVel() const
Get the linear velocity at the body's center of gravity in the world frame.
virtual void SetLinearDamping(double _damping)
Set the linear damping factor.
dart::dynamics::BodyNode * DARTBodyNode() const
Get pointer to DART BodyNode associated with this link.
bool IsSoftBody() const
Get whether this link is soft body.
dart::simulation::WorldPtr DARTWorld(void) const
Get pointer to DART World associated with this link.
void AddSlaveBodyNode(dart::dynamics::BodyNode *_dtBodyNode)
Add pointer to a BodyNode representing a fragment of this link.
void updateDirtyPoseFromDARTTransformation()
Store DART Transformation to Entity::dirtyPose and add this link to World::dirtyPoses so that World::...
virtual void AddRelativeForce(const ignition::math::Vector3d &_force)
Add a force to the body, components are relative to the body's own frame of reference.
virtual void AddForceAtWorldPosition(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_pos)
Add a force to the body using a global position.
virtual void AddForceAtRelativePosition(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_relpos)
Add a force (in world frame coordinates) to the body at a position relative to the center of mass whi...
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
virtual void Init()
Initialize the body.
boost::shared_ptr< DARTModel > DARTModelPtr
Definition: DARTTypes.hh:46
virtual bool GetGravityMode() const
Get the gravity mode.
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:85
virtual void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
virtual void SetLinkStatic(bool _static)
Freeze link to ground (inertial frame).
virtual void AddForce(const ignition::math::Vector3d &_force)
Add a force to the body.
virtual void AddTorque(const ignition::math::Vector3d &_torque)
Add a torque to the body.
void AddDARTChildJoint(DARTJointPtr _dartChildJoint)
Set child joint of this link.
DARTModelPtr GetDARTModel() const
Get pointer to DART Model associated with this link.
virtual void Fini()
Finalize the entity.
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
virtual bool GetEnabled() const
Get whether this body is enabled in the physics engine.
virtual void SetSelfCollide(bool _collide)
Set whether this body will collide with others in the model.
virtual void AddLinkForce(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_offset=ignition::math::Vector3d::Zero)
Add a force expressed in the link frame.
virtual ignition::math::Vector3d WorldForce() const
Get the force applied to the body in the world frame.
virtual ~DARTLink()
Destructor.
virtual void SetAngularVel(const ignition::math::Vector3d &_vel)
Set the angular velocity of the body.
std::shared_ptr< dart::dynamics::BodyNode::Properties > DARTBodyNodePropPtr
Definition: DARTTypes.hh:54
DART Link class.
Definition: DARTLink.hh:39
virtual void SetLinearVel(const ignition::math::Vector3d &_vel)
Set the linear velocity of the body.
virtual void SetEnabled(bool _enable) const
Set whether this body is enabled.
virtual bool GetKinematic() const
\TODO Implement this function.