Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gazebo::physics::ODEJoint Class Referenceabstract

ODE joint interface. More...

#include <ODEJoint.hh>

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

Public Types

enum  CFMMode { NONE = 0x00000000, DAMPING_ACTIVE = 0x00000001, JOINT_LIMIT = 0x00000002 }
 internal variables used for implicit damping More...
 
- Public Types inherited from gazebo::physics::Joint
enum  Attribute {
  FUDGE_FACTOR, SUSPENSION_ERP, SUSPENSION_CFM, STOP_ERP,
  STOP_CFM, ERP, CFM, FMAX,
  VEL, HI_STOP, LO_STOP
}
 Joint attribute types. More...
 
- Public Types inherited from gazebo::physics::Base
enum  EntityType {
  BASE = 0x00000000, ENTITY = 0x00000001, MODEL = 0x00000002, LINK = 0x00000004,
  COLLISION = 0x00000008, ACTOR = 0x00000016, LIGHT = 0x00000010, VISUAL = 0x00000020,
  JOINT = 0x00000040, BALL_JOINT = 0x00000080, HINGE2_JOINT = 0x00000100, HINGE_JOINT = 0x00000200,
  SLIDER_JOINT = 0x00000400, SCREW_JOINT = 0x00000800, UNIVERSAL_JOINT = 0x00001000, GEARBOX_JOINT = 0x00002000,
  FIXED_JOINT = 0x00004000, SHAPE = 0x00010000, BOX_SHAPE = 0x00020000, CYLINDER_SHAPE = 0x00040000,
  HEIGHTMAP_SHAPE = 0x00080000, MAP_SHAPE = 0x00100000, MULTIRAY_SHAPE = 0x00200000, RAY_SHAPE = 0x00400000,
  PLANE_SHAPE = 0x00800000, SPHERE_SHAPE = 0x01000000, MESH_SHAPE = 0x02000000, POLYLINE_SHAPE = 0x04000000,
  SENSOR_COLLISION = 0x10000000
}
 Unique identifiers for all entity types. More...
 

Public Member Functions

 ODEJoint (BasePtr _parent)
 Constructor. More...
 
virtual ~ODEJoint ()
 Destructor. More...
 
void ApplyExplicitStiffnessDamping ()
 simulating a joint spring and damper explicitly. More...
 
void ApplyImplicitStiffnessDamping ()
 simulate implicit spring and damper with CFM/ERP and meddling with Joint limits. More...
 
virtual void ApplyStiffnessDamping ()
 Callback to apply spring stiffness and viscous damping effects to joint. More...
 
virtual bool AreConnected (LinkPtr _one, LinkPtr _two) const
 Determines of the two bodies are connected by a joint. More...
 
virtual void Attach (LinkPtr _parent, LinkPtr _child)
 Attach the two bodies with this joint. More...
 
virtual void CacheForceTorque ()
 Cache Joint Force Torque Values if necessary for physics engine. More...
 
virtual void Detach ()
 Detach this joint from all links. More...
 
double GetCFM ()
 Get the CFM of this joint. More...
 
double GetERP ()
 Get the ERP of this joint. More...
 
dJointFeedback * GetFeedback ()
 Get the feedback data structure for this joint, if set. More...
 
virtual double GetForce (unsigned int _index)
 
virtual JointWrench GetForceTorque (unsigned int _index)
 get internal force and torque values at a joint. More...
 
virtual math::Angle GetHighStop (unsigned int _index)
 Get the high stop of an axis(index). More...
 
virtual LinkPtr GetJointLink (unsigned int _index) const
 Get the link to which the joint is attached according the _index. More...
 
virtual math::Vector3 GetLinkForce (unsigned int _index) const
 Get the forces applied to the center of mass of a physics::Link due to the existence of this Joint. More...
 
virtual math::Vector3 GetLinkTorque (unsigned int _index) const
 Get the torque applied to the center of mass of a physics::Link due to the existence of this Joint. More...
 
virtual math::Angle GetLowStop (unsigned int _index)
 Get the low stop of an axis(index). More...
 
virtual double GetParam (unsigned int _parameter) const
 Get an ODE joint parameter. More...
 
virtual double GetParam (const std::string &_key, unsigned int _index)
 Get a non-generic parameter for the joint. More...
 
double GetStopCFM ()
 Get access to stopCFM. More...
 
double GetStopERP ()
 Get access to stopERP. More...
 
virtual void Load (sdf::ElementPtr _sdf)
 Load physics::Joint from a SDF sdf::Element. More...
 
virtual void Reset ()
 Reset the joint. More...
 
virtual void SetAxis (unsigned int _index, const math::Vector3 &_axis)
 Set the axis of rotation where axis is specified in local joint frame. More...
 
void SetCFM (double _cfm)
 Set the CFM of this joint. More...
 
virtual void SetDamping (unsigned int _index, double _damping)
 Set the joint damping. More...
 
void SetERP (double _erp)
 Set the ERP of this joint. More...
 
virtual void SetForce (unsigned int _index, double _force)
 Set the force applied to this physics::Joint. More...
 
virtual bool SetHighStop (unsigned int _index, const math::Angle &_angle)
 Set the high stop of an axis(index). More...
 
virtual bool SetLowStop (unsigned int _index, const math::Angle &_angle)
 Set the low stop of an axis(index). More...
 
virtual void SetParam (unsigned int _parameter, double _value)
 Set an ODE joint paramter. More...
 
virtual bool SetParam (const std::string &_key, unsigned int _index, const boost::any &_value)
 Set a non-generic parameter for the joint. More...
 
virtual bool SetPosition (unsigned int _index, double _position)
 The child links of this joint are updated based on desired position. More...
 
virtual void SetProvideFeedback (bool _enable)
 Set whether the joint should generate feedback. More...
 
virtual void SetStiffness (unsigned int _index, const double _stiffness)
 Set the joint spring stiffness. More...
 
virtual void SetStiffnessDamping (unsigned int _index, double _stiffness, double _damping, double _reference=0)
 Set the joint spring stiffness. More...
 
void UseImplicitSpringDamper (const bool _implicit)
 Set flag indicating whether implicit spring damper is enabled. More...
 
bool UsesImplicitSpringDamper ()
 Get flag indicating whether implicit spring damper is enabled. More...
 
- Public Member Functions inherited from gazebo::physics::Joint
 Joint (BasePtr _parent)
 Constructor. More...
 
virtual ~Joint ()
 Destructor. More...
 
double CheckAndTruncateForce (unsigned int _index, double _effort)
 check if the force against velocityLimit and effortLimit, truncate if necessary. More...
 
template<typename T >
event::ConnectionPtr ConnectJointUpdate (T _subscriber)
 Connect a boost::slot the the joint update signal. More...
 
void DisconnectJointUpdate (event::ConnectionPtr &_conn)
 Disconnect a boost::slot the the joint update signal. More...
 
virtual void FillMsg (msgs::Joint &_msg)
 Fill a joint message. More...
 
virtual void Fini ()
 Finialize the object. More...
 
virtual math::Vector3 GetAnchor (unsigned int _index) const =0
 Get the anchor point. More...
 
math::Pose GetAnchorErrorPose () const
 Get pose offset between anchor pose on child and parent, expressed in the parent link frame. More...
 
math::Angle GetAngle (unsigned int _index) const
 Get the angle of rotation of an axis(index) More...
 
virtual unsigned int GetAngleCount () const =0
 Get the angle count. More...
 
math::Quaternion GetAxisFrame (unsigned int _index) const
 Get orientation of reference frame for specified axis, relative to world frame. More...
 
math::Quaternion GetAxisFrameOffset (unsigned int _index) const
 Get orientation of joint axis reference frame relative to joint frame. More...
 
LinkPtr GetChild () const
 Get the child link. More...
 
double GetDamping (unsigned int _index)
 Returns the current joint damping coefficient. More...
 
virtual double GetEffortLimit (unsigned int _index)
 Get the effort limit on axis(index). More...
 
virtual math::Vector3 GetGlobalAxis (unsigned int _index) const =0
 Get the axis of rotation in global cooridnate frame. More...
 
double GetInertiaRatio (const unsigned int _index) const
 Computes moment of inertia (MOI) across a specified joint axis. More...
 
double GetInertiaRatio (const math::Vector3 &_axis) const
 Computes moment of inertia (MOI) across an arbitrary axis specified in the world frame. More...
 
math::Pose GetInitialAnchorPose () const
 Get initial Anchor Pose specified by model <joint><pose>...</pose></joint> More...
 
math::Vector3 GetLocalAxis (unsigned int _index) const
 Get the axis of rotation. More...
 
math::Angle GetLowerLimit (unsigned int _index) const
 : get the joint upper limit (replaces GetLowStop and GetHighStop) More...
 
msgs::Joint::Type GetMsgType () const
 Get the joint type as msgs::Joint::Type. More...
 
LinkPtr GetParent () const
 Get the parent link. More...
 
math::Pose GetParentWorldPose () const
 Get anchor pose on parent link relative to world frame. More...
 
double GetSpringReferencePosition (unsigned int _index) const
 Get joint spring reference position. More...
 
double GetStiffness (unsigned int _index)
 Returns the current joint spring stiffness coefficient. More...
 
double GetStopDissipation (unsigned int _index) const
 Get joint stop dissipation. More...
 
double GetStopStiffness (unsigned int _index) const
 Get joint stop stiffness. More...
 
math::Angle GetUpperLimit (unsigned int _index) const
 : get the joint lower limit (replacee GetLowStop and GetHighStop) More...
 
virtual double GetVelocity (unsigned int _index) const =0
 Get the rotation rate of an axis(index) More...
 
virtual double GetVelocityLimit (unsigned int _index)
 Get the velocity limit on axis(index). More...
 
double GetWorldEnergyPotentialSpring (unsigned int _index) const
 Returns this joint's spring potential energy, based on the reference position of the spring. More...
 
math::Pose GetWorldPose () const
 Get pose of joint frame relative to world frame. More...
 
virtual void Init ()
 Initialize a joint. More...
 
void Load (LinkPtr _parent, LinkPtr _child, const math::Pose &_pose)
 Set pose, parent and child links of a physics::Joint. More...
 
virtual void SetAnchor (unsigned int _index, const math::Vector3 &_anchor)=0
 Set the anchor point. More...
 
virtual void SetEffortLimit (unsigned int _index, double _effort)
 Set the effort limit on a joint axis. More...
 
void SetLowerLimit (unsigned int _index, math::Angle _limit)
 : set the joint upper limit (replaces SetLowStop and SetHighStop) More...
 
void SetModel (ModelPtr _model)
 Set the model this joint belongs too. More...
 
void SetState (const JointState &_state)
 Set the joint state. More...
 
void SetStopDissipation (unsigned int _index, double _dissipation)
 Set joint stop dissipation. More...
 
void SetStopStiffness (unsigned int _index, double _stiffness)
 Set joint stop stiffness. More...
 
void SetUpperLimit (unsigned int _index, math::Angle _limit)
 : set the joint lower limit (replacee GetLowStop and GetHighStop) More...
 
virtual void SetVelocity (unsigned int _index, double _vel)=0
 Set the velocity of an axis(index). More...
 
virtual void SetVelocityLimit (unsigned int _index, double _velocity)
 Set the velocity limit on a joint axis. More...
 
void Update ()
 Update the joint. More...
 
virtual void UpdateParameters (sdf::ElementPtr _sdf)
 Update the parameters using new sdf values. More...
 
- Public Member Functions inherited from gazebo::physics::Base
 Base (BasePtr _parent)
 Constructor. More...
 
virtual ~Base ()
 Destructor. More...
 
void AddChild (BasePtr _child)
 Add a child to this entity. More...
 
void AddType (EntityType _type)
 Add a type specifier. More...
 
BasePtr GetByName (const std::string &_name)
 Get by name. More...
 
BasePtr GetChild (unsigned int _i) const
 Get a child by index. More...
 
BasePtr GetChild (const std::string &_name)
 Get a child by name. More...
 
unsigned int GetChildCount () const
 Get the number of children. More...
 
uint32_t GetId () const
 Return the ID of this entity. More...
 
std::string GetName () const
 Return the name of the entity. More...
 
BasePtr GetParent () const
 Get the parent. More...
 
int GetParentId () const
 Return the ID of the parent. More...
 
bool GetSaveable () const
 Get whether the object should be "saved", when the user selects to save the world to xml. More...
 
std::string GetScopedName (bool _prependWorldName=false) const
 Return the name of this entity with the model scope model1::...::modelN::entityName. More...
 
virtual const sdf::ElementPtr GetSDF ()
 Get the SDF values for the object. More...
 
unsigned int GetType () const
 Get the full type definition. More...
 
const WorldPtrGetWorld () const
 Get the World this object is in. More...
 
bool HasType (const EntityType &_t) const
 Returns true if this object's type definition has the given type. More...
 
bool IsSelected () const
 True if the entity is selected by the user. More...
 
bool operator== (const Base &_ent) const
 Returns true if the entities are the same. More...
 
void Print (const std::string &_prefix)
 Print this object to screen via gzmsg. More...
 
virtual void RemoveChild (unsigned int _id)
 Remove a child from this entity. More...
 
void RemoveChild (const std::string &_name)
 Remove a child by name. More...
 
void RemoveChildren ()
 Remove all children. More...
 
virtual void Reset (Base::EntityType _resetType)
 Calls recursive Reset on one of the Base::EntityType's. More...
 
virtual void SetName (const std::string &_name)
 Set the name of the entity. More...
 
void SetParent (BasePtr _parent)
 Set the parent. More...
 
void SetSaveable (bool _v)
 Set whether the object should be "saved", when the user selects to save the world to xml. More...
 
virtual bool SetSelected (bool _show)
 Set whether this entity has been selected by the user through the gui. More...
 
void SetWorld (const WorldPtr &_newWorld)
 Set the world this object belongs to. More...
 

Protected Member Functions

virtual void SetForceImpl (unsigned int _index, double _force)=0
 Set the force applied to this physics::Joint. More...
 
- Protected Member Functions inherited from gazebo::physics::Joint
math::Pose ComputeChildLinkPose (unsigned int _index, double _position)
 internal function to help us compute child link pose if a joint position change is applied. More...
 
bool FindAllConnectedLinks (const LinkPtr &_originalParentLink, Link_V &_connectedLinks)
 internal helper to find all links connected to the child link branching out from the children of the child link and any parent of the child link other than the parent link through this joint. More...
 
virtual math::Angle GetAngleImpl (unsigned int _index) const =0
 Get the angle of an axis helper function. More...
 
bool SetPositionMaximal (unsigned int _index, double _position)
 Helper function for maximal coordinate solver SetPosition. More...
 
bool SetVelocityMaximal (unsigned int _index, double _velocity)
 Helper function for maximal coordinate solver SetVelocity. More...
 
- Protected Member Functions inherited from gazebo::physics::Base
void ComputeScopedName ()
 Compute the scoped name of this object based on its parents. More...
 

Protected Attributes

dJointID jointId
 This is our ODE ID. More...
 
- Protected Attributes inherited from gazebo::physics::Joint
LinkPtr anchorLink
 Anchor link. More...
 
math::Vector3 anchorPos
 Anchor pose. More...
 
math::Pose anchorPose
 Anchor pose specified in SDF <joint><pose> tag. More...
 
gazebo::event::ConnectionPtr applyDamping
 apply damping for adding viscous damping forces on updates More...
 
bool axisParentModelFrame [2]
 Flags that are set to true if an axis value is expressed in the parent model frame. More...
 
LinkPtr childLink
 The first link this joint connects to. More...
 
double dissipationCoefficient [2]
 joint viscous damping coefficient More...
 
double effortLimit [2]
 Store Joint effort limit as specified in SDF. More...
 
math::Angle lowerLimit [2]
 Store Joint position lower limit as specified in SDF. More...
 
ModelPtr model
 Pointer to the parent model. More...
 
math::Pose parentAnchorPose
 Anchor pose relative to parent link frame. More...
 
LinkPtr parentLink
 The second link this joint connects to. More...
 
bool provideFeedback
 Provide Feedback data for contact forces. More...
 
double springReferencePosition [2]
 joint spring reference (zero load) position More...
 
double stiffnessCoefficient [2]
 joint stiffnessCoefficient More...
 
math::Angle upperLimit [2]
 Store Joint position upper limit as specified in SDF. More...
 
double velocityLimit [2]
 Store Joint velocity limit as specified in SDF. More...
 
JointWrench wrench
 Cache Joint force torque values in case physics engine clears them at the end of update step. More...
 
- Protected Attributes inherited from gazebo::physics::Base
Base_V children
 Children of this entity. More...
 
BasePtr parent
 Parent of this entity. More...
 
sdf::ElementPtr sdf
 The SDF values for this object. More...
 
WorldPtr world
 Pointer to the world. More...
 

Detailed Description

ODE joint interface.

Member Enumeration Documentation

internal variables used for implicit damping

Enumerator
NONE 

implicit damping not active

DAMPING_ACTIVE 

implicit damping active, joints within limits

JOINT_LIMIT 

implicit damping not active, enforcing joints limits

Constructor & Destructor Documentation

gazebo::physics::ODEJoint::ODEJoint ( BasePtr  _parent)

Constructor.

Parameters
[in]_parentParent of the Joint.
virtual gazebo::physics::ODEJoint::~ODEJoint ( )
virtual

Destructor.

Member Function Documentation

void gazebo::physics::ODEJoint::ApplyExplicitStiffnessDamping ( )

simulating a joint spring and damper explicitly.

void gazebo::physics::ODEJoint::ApplyImplicitStiffnessDamping ( )

simulate implicit spring and damper with CFM/ERP and meddling with Joint limits.

virtual void gazebo::physics::ODEJoint::ApplyStiffnessDamping ( )
virtual

Callback to apply spring stiffness and viscous damping effects to joint.

: rename to ApplySpringStiffnessDamping()

Reimplemented from gazebo::physics::Joint.

virtual bool gazebo::physics::ODEJoint::AreConnected ( LinkPtr  _one,
LinkPtr  _two 
) const
virtual

Determines of the two bodies are connected by a joint.

Parameters
[in]_oneFirst link.
[in]_twoSecond link.
Returns
True if the two links are connected by a joint.

Implements gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::Attach ( LinkPtr  _parent,
LinkPtr  _child 
)
virtual

Attach the two bodies with this joint.

Parameters
[in]_parentParent link.
[in]_childChild link.

Reimplemented from gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEFixedJoint.

virtual void gazebo::physics::ODEJoint::CacheForceTorque ( )
virtual

Cache Joint Force Torque Values if necessary for physics engine.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::Detach ( )
virtual

Detach this joint from all links.

Reimplemented from gazebo::physics::Joint.

double gazebo::physics::ODEJoint::GetCFM ( )

Get the CFM of this joint.

Returns
The Constraint Force Mixing value
double gazebo::physics::ODEJoint::GetERP ( )

Get the ERP of this joint.

Returns
The Error Reduction Parameter of this joint
dJointFeedback* gazebo::physics::ODEJoint::GetFeedback ( )

Get the feedback data structure for this joint, if set.

Returns
Pointer to the joint feedback.
virtual double gazebo::physics::ODEJoint::GetForce ( unsigned int  _index)
virtual
Todo:
: not yet implemented. Get external forces applied at this Joint. Note that the unit of force should be consistent with the rest of the simulation scales.
Parameters
[in]_indexIndex of the axis.
Returns
The force applied to an axis.

Reimplemented from gazebo::physics::Joint.

virtual JointWrench gazebo::physics::ODEJoint::GetForceTorque ( unsigned int  _index)
virtual

get internal force and torque values at a joint.

The force and torque values are returned in a JointWrench data structure. Where JointWrench.body1Force contains the force applied by the parent Link on the Joint specified in the parent Link frame, and JointWrench.body2Force contains the force applied by the child Link on the Joint specified in the child Link frame. Note that this sign convention is opposite of the reaction forces of the Joint on the Links.

FIXME TODO: change name of this function to something like: GetNegatedForceTorqueInLinkFrame and make GetForceTorque call return non-negated reaction forces in perspective Link frames.

Note that for ODE you must set <provide_feedback>true<provide_feedback> in the joint sdf to use this.

Parameters
[in]_indexNot used right now
Returns
The force and torque at the joint, see above for details on conventions.

Implements gazebo::physics::Joint.

virtual math::Angle gazebo::physics::ODEJoint::GetHighStop ( unsigned int  _index)
virtual

Get the high stop of an axis(index).

This function is replaced by GetUpperLimit(unsigned int). If you are interested in getting the value of dParamHiStop*, use GetAttribute(hi_stop, _index)

Parameters
[in]_indexIndex of the axis.
Returns
Angle of the high stop value.

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEBallJoint.

virtual LinkPtr gazebo::physics::ODEJoint::GetJointLink ( unsigned int  _index) const
virtual

Get the link to which the joint is attached according the _index.

Parameters
[in]_indexIndex of the link to retreive.
Returns
Pointer to the request link. NULL if the index was invalid.

Implements gazebo::physics::Joint.

virtual math::Vector3 gazebo::physics::ODEJoint::GetLinkForce ( unsigned int  _index) const
virtual

Get the forces applied to the center of mass of a physics::Link due to the existence of this Joint.

Note that the unit of force should be consistent with the rest of the simulation scales.

Parameters
[in]indexThe index of the link(0 or 1).
Returns
Force applied to the link.

Implements gazebo::physics::Joint.

virtual math::Vector3 gazebo::physics::ODEJoint::GetLinkTorque ( unsigned int  _index) const
virtual

Get the torque applied to the center of mass of a physics::Link due to the existence of this Joint.

Note that the unit of torque should be consistent with the rest of the simulation scales.

Parameters
[in]indexThe index of the link(0 or 1)
Returns
Torque applied to the link.

Implements gazebo::physics::Joint.

virtual math::Angle gazebo::physics::ODEJoint::GetLowStop ( unsigned int  _index)
virtual

Get the low stop of an axis(index).

This function is replaced by GetLowerLimit(unsigned int). If you are interested in getting the value of dParamHiStop*, use GetAttribute(hi_stop, _index)

Parameters
[in]_indexIndex of the axis.
Returns
Angle of the low stop value.

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEBallJoint.

virtual double gazebo::physics::ODEJoint::GetParam ( unsigned int  _parameter) const
virtual

Get an ODE joint parameter.

The default function does nothing. This should be overriden in the child classes where appropriate.

Parameters
[in]_parameterID of the parameter to get.
Returns
Value of the parameter.

Reimplemented in gazebo::physics::ODEUniversalJoint, gazebo::physics::ODEScrewJoint, gazebo::physics::ODEGearboxJoint, gazebo::physics::ODEHinge2Joint, gazebo::physics::ODEHingeJoint, and gazebo::physics::ODESliderJoint.

virtual double gazebo::physics::ODEJoint::GetParam ( const std::string &  _key,
unsigned int  _index 
)
virtual

Get a non-generic parameter for the joint.

See Also
SetParam(const std::string &, unsigned int, const boost::any)
Parameters
[in]_keyString key.
[in]_indexIndex of the axis.

Reimplemented from gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEScrewJoint, and gazebo::physics::ODEUniversalJoint.

double gazebo::physics::ODEJoint::GetStopCFM ( )
inline

Get access to stopCFM.

Returns
Returns joint's cfm for end stops
double gazebo::physics::ODEJoint::GetStopERP ( )
inline

Get access to stopERP.

Returns
Returns joint's erp for end stops
virtual void gazebo::physics::ODEJoint::Load ( sdf::ElementPtr  _sdf)
virtual
virtual void gazebo::physics::ODEJoint::Reset ( )
virtual

Reset the joint.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::SetAxis ( unsigned int  _index,
const math::Vector3 _axis 
)
virtual

Set the axis of rotation where axis is specified in local joint frame.

Parameters
[in]_indexIndex of the axis to set.
[in]_axisVector in local joint frame of axis direction (must have length greater than zero).

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEBallJoint, gazebo::physics::ODEGearboxJoint, gazebo::physics::ODEHingeJoint, gazebo::physics::ODESliderJoint, gazebo::physics::ODEFixedJoint, gazebo::physics::ODEHinge2Joint, gazebo::physics::ODEUniversalJoint, and gazebo::physics::ODEScrewJoint.

void gazebo::physics::ODEJoint::SetCFM ( double  _cfm)

Set the CFM of this joint.

Parameters
[in]_cfmThe Constraint Force Mixing value
virtual void gazebo::physics::ODEJoint::SetDamping ( unsigned int  _index,
double  _damping 
)
virtual

Set the joint damping.

Parameters
[in]_indexIndex of the axis to set, currently ignored, to be implemented.
[in]_dampingDamping value for the axis.

Implements gazebo::physics::Joint.

void gazebo::physics::ODEJoint::SetERP ( double  _erp)

Set the ERP of this joint.

Parameters
[in]_erpError Reduction Parameter value.
virtual void gazebo::physics::ODEJoint::SetForce ( unsigned int  _index,
double  _effort 
)
virtual

Set the force applied to this physics::Joint.

Note that the unit of force should be consistent with the rest of the simulation scales. Force is additive (multiple calls to SetForce to the same joint in the same time step will accumulate forces on that Joint). Forces are truncated by effortLimit before applied.

Parameters
[in]_indexIndex of the axis.
[in]_effortForce value.

Implements gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::SetForceImpl ( unsigned int  _index,
double  _force 
)
protectedpure virtual

Set the force applied to this physics::Joint.

Note that the unit of force should be consistent with the rest of the simulation scales. Force is additive (multiple calls to SetForceImpl to the same joint in the same time step will accumulate forces on that Joint).

Parameters
[in]_indexIndex of the axis.
[in]_forceForce value.

Implemented in gazebo::physics::ODEScrewJoint, gazebo::physics::ODEUniversalJoint, gazebo::physics::ODEGearboxJoint, gazebo::physics::ODEBallJoint, gazebo::physics::ODEHingeJoint, gazebo::physics::ODEHinge2Joint, gazebo::physics::ODESliderJoint, and gazebo::physics::ODEFixedJoint.

virtual bool gazebo::physics::ODEJoint::SetHighStop ( unsigned int  _index,
const math::Angle _angle 
)
virtual

Set the high stop of an axis(index).

Parameters
[in]_indexIndex of the axis.
[in]_angleHigh stop angle.

Reimplemented from gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEBallJoint, and gazebo::physics::ODEUniversalJoint.

virtual bool gazebo::physics::ODEJoint::SetLowStop ( unsigned int  _index,
const math::Angle _angle 
)
virtual

Set the low stop of an axis(index).

Parameters
[in]_indexIndex of the axis.
[in]_angleLow stop angle.

Reimplemented from gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEBallJoint, and gazebo::physics::ODEUniversalJoint.

virtual void gazebo::physics::ODEJoint::SetParam ( unsigned int  _parameter,
double  _value 
)
virtual

Set an ODE joint paramter.

By default this does nothing. It should be overridden in child classes where appropriate

Parameters
[in]_parameterID of the parameter to set.
[in]_valueValue to set.

Reimplemented in gazebo::physics::ODEScrewJoint, gazebo::physics::ODEGearboxJoint, gazebo::physics::ODEHingeJoint, gazebo::physics::ODEHinge2Joint, gazebo::physics::ODESliderJoint, and gazebo::physics::ODEUniversalJoint.

virtual bool gazebo::physics::ODEJoint::SetParam ( const std::string &  _key,
unsigned int  _index,
const boost::any &  _value 
)
virtual

Set a non-generic parameter for the joint.

replaces SetAttribute(Attribute, int, double) List of parameters: "friction" Axis Coulomb joint friction coefficient. "hi_stop" Axis upper limit. "lo_stop" Axis lower limit.

Parameters
[in]_keyString key.
[in]_indexIndex of the axis.
[in]_valueValue of the attribute.

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::ODEScrewJoint, and gazebo::physics::ODEUniversalJoint.

virtual bool gazebo::physics::ODEJoint::SetPosition ( unsigned int  _index,
double  _position 
)
virtual

The child links of this joint are updated based on desired position.

And all the links connected to the child link of this joint except through the parent link of this joint moves with the child link.

Parameters
[in]_indexIndex of the joint axis (degree of freedom).
[in]_positionPosition to set the joint to. unspecified, pure kinematic teleportation.
Returns
returns true if operation succeeds, false if it fails.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::SetProvideFeedback ( bool  _enable)
virtual

Set whether the joint should generate feedback.

Parameters
[in]_enableTrue to enable joint feedback.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::SetStiffness ( unsigned int  _index,
const double  _stiffness 
)
virtual

Set the joint spring stiffness.

Parameters
[in]_indexIndex of the axis to set, currently ignored, to be implemented.
[in]_stiffnessSpring stiffness value for the axis. : rename to SetSpringStiffness()

Implements gazebo::physics::Joint.

virtual void gazebo::physics::ODEJoint::SetStiffnessDamping ( unsigned int  _index,
double  _stiffness,
double  _damping,
double  _reference = 0 
)
virtual

Set the joint spring stiffness.

Parameters
[in]_indexIndex of the axis to set, currently ignored, to be implemented.
[in]_stiffnessStiffness value for the axis.
[in]_referenceSpring zero load reference position. : rename to SetSpringStiffnessDamping()

Implements gazebo::physics::Joint.

void gazebo::physics::ODEJoint::UseImplicitSpringDamper ( const bool  _implicit)

Set flag indicating whether implicit spring damper is enabled.

Parameters
[in]_implicitTrue if implicit spring damper is used.
bool gazebo::physics::ODEJoint::UsesImplicitSpringDamper ( )

Get flag indicating whether implicit spring damper is enabled.

Returns
True if implicit spring damper is used.

Member Data Documentation

dJointID gazebo::physics::ODEJoint::jointId
protected

This is our ODE ID.


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