All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
gazebo::physics::ODEJoint Class Reference

ODE joint interface. More...

#include <ODEJoint.hh>

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

Public Member Functions

 ODEJoint (BasePtr _parent)
 Constructor.
 
virtual ~ODEJoint ()
 Destructor.
 
virtual bool AreConnected (LinkPtr _one, LinkPtr _two) const
 Determines of the two bodies are connected by a joint.
 
virtual void Attach (LinkPtr parent, LinkPtr child)
 Attach the two bodies with this joint.
 
virtual void Detach ()
 Detach this joint from all bodies.
 
double GetCFM ()
 Get the ERP of this joint.
 
double GetERP ()
 Get the ERP of this joint.
 
dJointFeedback * GetFeedback ()
 Get the feedback data structure for this joint, if set.
 
virtual math::Angle GetHighStop (int index)
 Get the high stop of an axis(index).
 
virtual LinkPtr GetJointLink (int _index) const
 Get the link to which the joint is attached according the _index.
 
virtual math::Vector3 GetLinkForce (unsigned int index) const
 Get the force the joint applies to the first link.
 
virtual math::Vector3 GetLinkTorque (unsigned int index) const
 Get the torque the joint applies to the first link.
 
virtual math::Angle GetLowStop (int index)
 Get the low stop of an axis(index).
 
virtual double GetParam (int _parameter) const
 The default function does nothing.
 
virtual void Load (sdf::ElementPtr _sdf)
 Load ODEJoint.
 
virtual void Reset ()
 Reset the joint.
 
virtual void SetAttribute (Attribute, int index, double value)
 Set a parameter for the joint.
 
void SetCFM (double newCFM)
 Set the CFM of this joint.
 
void SetERP (double newERP)
 Set the ERP of this joint.
 
virtual void SetHighStop (int _index, const math::Angle &_angle)
 Set the high stop of an axis(index).
 
virtual void SetLowStop (int _index, const math::Angle &_angle)
 Set the low stop of an axis(index).
 
virtual void SetParam (int _parameter, double _value)
 By default this does nothing.
 
- Public Member Functions inherited from gazebo::physics::Joint
 Joint (BasePtr _parent)
 Constructor.
 
virtual ~Joint ()
 Destructor.
 
template<typename T >
event::ConnectionPtr ConnectJointUpdate (T _subscriber)
 Connect a boost::slot the the joint update signal.
 
void DisconnectJointUpdate (event::ConnectionPtr &_conn)
 Disconnect a boost::slot the the joint update signal.
 
void FillJointMsg (msgs::Joint &_msg) GAZEBO_DEPRECATED
 DEPRECATED.
 
void FillMsg (msgs::Joint &_msg)
 Fill a joint message.
 
virtual math::Vector3 GetAnchor (int _index) const =0
 Get the anchor point.
 
math::Angle GetAngle (int _index) const
 Get the angle of rotation of an axis(index)
 
LinkPtr GetChild () const
 Get the child link.
 
virtual double GetForce (int _index)
 
virtual math::Vector3 GetGlobalAxis (int _index) const =0
 Get the axis of rotation in global cooridnate frame.
 
math::Vector3 GetLocalAxis (int _index) const
 Get the axis of rotation.
 
virtual double GetMaxForce (int _index)=0
 Get the max allowed force of an axis(index).
 
LinkPtr GetParent () const
 Get the parent link.
 
JointState GetState ()
 Get the joint state.
 
virtual double GetVelocity (int _index) const =0
 Get the rotation rate of an axis(index)
 
virtual void Init ()
 Initialize a joint.
 
void Load (LinkPtr _parent, LinkPtr _child, const math::Pose &_pose)
 Set pose, parent and child links of a physics::Joint.
 
virtual void SetAnchor (int _index, const math::Vector3 &_anchor)=0
 Set the anchor point.
 
void SetAngle (int _index, math::Angle _angle)
 If the Joint is static, Gazebo stores the state of this Joint as a scalar inside the Joint class, so this call will NOT move the joint dynamically for a static Model.
 
virtual void SetAxis (int _index, const math::Vector3 &_axis)=0
 Set the axis of rotation.
 
virtual void SetDamping (int _index, double _damping)=0
 Set the joint damping.
 
virtual void SetForce (int _index, double _force)
 Set the force applied to this physics::Joint.
 
virtual void SetMaxForce (int _index, double _force)=0
 Set the max allowed force of an axis(index).
 
void SetModel (ModelPtr _model)
 Set the model this joint belongs too.
 
void SetState (const JointState &_state)
 Set the joint state.
 
virtual void SetVelocity (int _index, double _vel)=0
 Set the velocity of an axis(index).
 
void Update ()
 Update the joint.
 
virtual void UpdateParameters (sdf::ElementPtr _sdf)
 Update the parameters using new sdf values.
 
- Public Member Functions inherited from gazebo::physics::Base
 Base (BasePtr parent)
 Constructor.
 
virtual ~Base ()
 Destructor.
 
void AddChild (BasePtr _child)
 Add a child to this entity.
 
void AddType (EntityType _type)
 Add a type specifier.
 
virtual void Fini ()
 Finialize the object.
 
BasePtr GetById (unsigned int _id) const
 Get a child or self by id.
 
BasePtr GetByName (const std::string &_name)
 Get by name.
 
BasePtr GetChild (unsigned int _i) const
 Get a child by index.
 
BasePtr GetChild (const std::string &_name)
 Get a child by name.
 
unsigned int GetChildCount () const
 Get the number of children.
 
unsigned int GetId () const
 Return the ID of this entity.
 
std::string GetName () const
 Return the name of the entity.
 
BasePtr GetParent () const
 Get the parent.
 
int GetParentId () const
 Return the ID of the parent.
 
bool GetSaveable () const
 Get whether the object should be "saved", when the user selects to save the world to xml.
 
std::string GetScopedName () const
 Return the name of this entity with the model scope world::model1::...::modelN::entityName.
 
virtual const sdf::ElementPtr GetSDF ()
 Get the SDF values for the object.
 
unsigned int GetType () const
 Get the full type definition.
 
const WorldPtrGetWorld () const
 Get the World this object is in.
 
bool HasType (const EntityType &_t) const
 Returns true if this object's type definition has the given type.
 
bool IsSelected () const
 True if the entity is selected by the user.
 
bool operator== (const Base &_ent) const
 Returns true if the entities are the same.
 
void Print (const std::string &_prefix)
 Print this object to screen via gzmsg.
 
virtual void RemoveChild (unsigned int _id)
 Remove a child from this entity.
 
void RemoveChild (const std::string &_name)
 Remove a child by name.
 
void RemoveChildren ()
 Remove all children.
 
virtual void Reset (Base::EntityType _resetType)
 Calls recursive Reset on one of the Base::EntityType's.
 
virtual void SetName (const std::string &_name)
 Set the name of the entity.
 
void SetParent (BasePtr _parent)
 Set the parent.
 
void SetSaveable (bool _v)
 Set whether the object should be "saved", when the user selects to save the world to xml.
 
virtual bool SetSelected (bool _show)
 Set whether this entity has been selected by the user through the gui.
 
void SetWorld (const WorldPtr &_newWorld)
 Set the world this object belongs to.
 

Protected Attributes

dJointID jointId
 This is our id.
 
- Protected Attributes inherited from gazebo::physics::Joint
LinkPtr anchorLink
 Anchor link.
 
math::Vector3 anchorPos
 Anchor pose.
 
LinkPtr childLink
 The first link this joint connects to.
 
double damping_coefficient
 joint damping_coefficient
 
ModelPtr model
 Pointer to the parent model.
 
LinkPtr parentLink
 The second link this joint connects to.
 
- Protected Attributes inherited from gazebo::physics::Base
Base_V children
 Children of this entity.
 
Base_V::iterator childrenEnd
 End of the children vector.
 
BasePtr parent
 Parent of this entity.
 
sdf::ElementPtr sdf
 The SDF values for this object.
 
WorldPtr world
 Pointer to the world.
 

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from gazebo::physics::Joint
virtual math::Angle GetAngleImpl (int _index) const =0
 Get the angle of an axis helper function.
 

Detailed Description

ODE joint interface.

Constructor & Destructor Documentation

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

Constructor.

virtual gazebo::physics::ODEJoint::~ODEJoint ( )
virtual

Destructor.

Member Function Documentation

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

Determines of the two bodies 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.

Reimplemented from gazebo::physics::Joint.

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

Detach this joint from all bodies.

Reimplemented from gazebo::physics::Joint.

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

Get the ERP of this joint.

double gazebo::physics::ODEJoint::GetERP ( )

Get the ERP of this joint.

dJointFeedback* gazebo::physics::ODEJoint::GetFeedback ( )

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

virtual math::Angle gazebo::physics::ODEJoint::GetHighStop ( int  index)
virtual

Get the high stop of an axis(index).

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::BallJoint< ODEJoint >.

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

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

Implements gazebo::physics::Joint.

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

Get the force the joint applies to the first link.

Parameters
indexThe index of the link(0 or 1)

Implements gazebo::physics::Joint.

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

Get the torque the joint applies to the first link.

Parameters
indexThe index of the link(0 or 1)

Implements gazebo::physics::Joint.

virtual math::Angle gazebo::physics::ODEJoint::GetLowStop ( int  index)
virtual

Get the low stop of an axis(index).

Implements gazebo::physics::Joint.

Reimplemented in gazebo::physics::BallJoint< ODEJoint >.

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

The default function does nothing.

This should be overriden in the child classes where appropriate

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

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::SetAttribute ( Attribute  ,
int  index,
double  value 
)
virtual

Set a parameter for the joint.

Implements gazebo::physics::Joint.

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

Set the CFM of this joint.

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

Set the ERP of this joint.

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

Set the high stop of an axis(index).

Implements gazebo::physics::Joint.

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

Set the low stop of an axis(index).

Implements gazebo::physics::Joint.

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

By default this does nothing.

It should be overridden in child classes where appropriate

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

Member Data Documentation

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

This is our id.


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