17#ifndef GAZEBO_PHYSICS_ODE_ODELINK_HH_
18#define GAZEBO_PHYSICS_ODE_ODELINK_HH_
20#include <ignition/math/Vector3.hh>
45 public:
virtual void Load(sdf::ElementPtr _sdf);
48 public:
virtual void Init();
51 public:
virtual void Fini();
75 public:
virtual void SetLinearVel(
const ignition::math::Vector3d &_vel);
78 public:
virtual void SetAngularVel(
const ignition::math::Vector3d &_vel);
81 public:
virtual void SetForce(
const ignition::math::Vector3d &_force);
84 public:
virtual void SetTorque(
const ignition::math::Vector3d &_torque);
87 public:
virtual void AddForce(
const ignition::math::Vector3d &_force);
91 const ignition::math::Vector3d &_force);
95 const ignition::math::Vector3d &_force,
96 const ignition::math::Vector3d &_pos);
100 const ignition::math::Vector3d &_force,
101 const ignition::math::Vector3d &_relpos);
105 const ignition::math::Vector3d &_force,
106 const ignition::math::Vector3d &_offset =
107 ignition::math::Vector3d::Zero);
110 public:
virtual void AddTorque(
const ignition::math::Vector3d &_torque);
114 const ignition::math::Vector3d &_torque);
118 const ignition::math::Vector3d &_offset)
const;
122 const ignition::math::Vector3d &_offset,
123 const ignition::math::Quaterniond &_q)
const;
186 private: dBodyID linkId;
192 private: dSpaceID spaceId;
195 private: ignition::math::Vector3d force;
198 private: ignition::math::Vector3d torque;
ODE wrapper forward declarations and typedefs.
Link class defines a rigid body entity, containing information on inertia, visual and collision prope...
Definition Link.hh:53
ODE Link class.
Definition ODELink.hh:36
static void DisabledCallback(dBodyID _id)
Callback when ODE determines a body is disabled.
void UpdateCollisionOffsets()
Update location of collisions relative to center of mass.
static void MoveCallback(dBodyID _id)
when ODE updates dynamics bodies, this callback propagates the chagnes in pose back to Gazebo
ODELink(EntityPtr _parent)
Constructor.
virtual void SetAngularVel(const ignition::math::Vector3d &_vel)
Set the angular velocity of the body.
virtual void SetKinematic(const bool &_state)
\TODO Implement this function.
virtual void UpdateMass()
Update the mass matrix.
virtual void Fini()
Finalize the body.
virtual void SetLinearDamping(double _damping)
Set the linear damping factor.
virtual void Init()
Initialize the body.
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 bool GetEnabled() const
Get whether this body is enabled in the physics engine.
virtual void SetEnabled(bool _enable) const
Set whether this body is enabled.
virtual bool GetGravityMode() const
Get the gravity mode.
virtual bool GetKinematic() const
\TODO Implement this function.
virtual void UpdateSurface()
Update surface parameters.
virtual void SetForce(const ignition::math::Vector3d &_force)
Set the force applied to the body.
virtual ignition::math::Vector3d WorldLinearVel(const ignition::math::Vector3d &_offset) const
Get the linear velocity of a point on the body in the world frame, using an offset expressed in a bod...
void SetSelfCollide(bool _collide)
Set whether this body will collide with others in the model.
virtual void SetAutoDisable(bool _disable)
Allow the link to auto disable.
virtual void SetTorque(const ignition::math::Vector3d &_torque)
Set the torque applied to the body.
virtual void SetLinkStatic(bool _static)
Freeze link to ground (inertial frame).
dBodyID GetODEId() const
Return the ID of this link.
virtual ignition::math::Vector3d WorldAngularVel() const
Get the angular velocity of the entity in the world frame.
virtual void AddTorque(const ignition::math::Vector3d &_torque)
Add a torque to the body.
void SetSpaceId(dSpaceID _spaceid)
Set the ID of the collision space this link is in.
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 void AddForceAtWorldPosition(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_pos)
Add a force to the body using a global position.
virtual ignition::math::Vector3d WorldForce() const
Get the force applied to the body in the world frame.
virtual void SetLinearVel(const ignition::math::Vector3d &_vel)
Set the linear velocity of the body.
virtual void SetGravityMode(bool _mode)
Set whether gravity affects this body.
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...
virtual ~ODELink()
Destructor.
virtual void AddForce(const ignition::math::Vector3d &_force)
Add a force to the body.
virtual ignition::math::Vector3d WorldCoGLinearVel() const
Get the linear velocity at the body's center of gravity in the world frame.
virtual void Load(sdf::ElementPtr _sdf)
Load the body based on an SDF element.
virtual ignition::math::Vector3d WorldLinearVel(const ignition::math::Vector3d &_offset, const ignition::math::Quaterniond &_q) const
Get the linear velocity of a point on the body in the world frame, using an offset expressed in an ar...
virtual ignition::math::Vector3d WorldTorque() const
Get the torque applied to the body about the center of mass in world frame coordinates.
virtual void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
virtual void SetAngularDamping(double _damping)
Set the angular damping factor.
dSpaceID GetSpaceId() const
Get the ID of the collision space this link is in.
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< ODEPhysics > ODEPhysicsPtr
Definition ODETypes.hh:59
boost::shared_ptr< Entity > EntityPtr
Definition PhysicsTypes.hh:85
Forward declarations for the common classes.
Definition Animation.hh:27