Base class for all joints. More...
#include <Joint.hh>

Public Types | |
| enum | Attribute { FUDGE_FACTOR, SUSPENSION_ERP, SUSPENSION_CFM, STOP_ERP, STOP_CFM, ERP, CFM, FMAX, VEL, HI_STOP, LO_STOP } |
| Type of joint. | |
Public Member Functions | |
| Joint () | |
| Constructor. | |
| virtual | ~Joint () |
| Destructor. | |
| virtual void | Load (sdf::ElementPtr &_sdf) |
| Load a joint. | |
| virtual void | Init () |
| Initialize a joint. | |
| void | Update () |
| Update the joint. | |
| virtual void | UpdateParameters (sdf::ElementPtr &_sdf) |
| update the parameters using new sdf values | |
| void | ShowJoints (const bool &s) |
| Set the joint to show visuals. | |
| virtual void | Reset () |
| Reset the joint. | |
| void | SetModel (ModelPtr model) |
| Set the model this joint belongs too. | |
| virtual LinkPtr | GetJointLink (int index) const =0 |
| Get the link to which the joint is attached according the _index. | |
| virtual bool | AreConnected (LinkPtr one, LinkPtr two) const =0 |
| 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 ()=0 |
| Detach this joint from all bodies. | |
| virtual void | SetAxis (int index, const math::Vector3 &axis)=0 |
| Set the axis of rotation. | |
| virtual void | SetDamping (int index, const double damping)=0 |
| Set the joint damping. | |
| template<typename T > | |
| event::ConnectionPtr | ConnectJointUpdate (T subscriber) |
| Connect a boost::slot the the joint update signal. | |
| void | DisconnectJointUpdate (event::ConnectionPtr &c) |
| Disconnect a boost::slot the the joint update signal. | |
| math::Vector3 | GetLocalAxis (int _index) const |
| Get the axis of rotation. | |
| virtual math::Vector3 | GetGlobalAxis (int _index) const =0 |
| virtual void | SetAnchor (int index, const math::Vector3 &anchor)=0 |
| Set the anchor point. | |
| virtual math::Vector3 | GetAnchor (int index) const =0 |
| Get the anchor point. | |
| virtual void | SetHighStop (int index, math::Angle angle)=0 |
| Set the high stop of an axis(index). | |
| virtual void | SetLowStop (int index, math::Angle angle)=0 |
| Set the low stop of an axis(index). | |
| virtual math::Angle | GetHighStop (int index)=0 |
| Get the high stop of an axis(index). | |
| virtual math::Angle | GetLowStop (int index)=0 |
| Get the low stop of an axis(index). | |
| virtual void | SetVelocity (int index, double v)=0 |
| Set the velocity of an axis(index). | |
| virtual double | GetVelocity (int index) const =0 |
| Get the rotation rate of an axis(index) | |
| virtual void | SetForce (int, double) |
| Set the force applied to an axis. | |
| virtual double | GetForce (int) |
| Get the force applied to an axis. | |
| virtual void | SetMaxForce (int index, double t)=0 |
| Set the max allowed force of an axis(index). | |
| virtual double | GetMaxForce (int index)=0 |
| Get the max allowed force of an axis(index). | |
| math::Angle | GetAngle (int index) const |
| Get the angle of rotation of an axis(index) | |
| void | SetAngle (int _index, math::Angle _angle) |
| Set the angle of rotation. | |
| virtual math::Vector3 | GetLinkForce (unsigned int index) const =0 |
| Get the force the joint applies to the first link. | |
| virtual math::Vector3 | GetLinkTorque (unsigned int index) const =0 |
| Get the torque the joint applies to the first link. | |
| virtual void | SetAttribute (Attribute, int index, double value)=0 |
| Set a parameter for the joint. | |
| LinkPtr | GetChild () const |
| Get the child link. | |
| LinkPtr | GetParent () const |
| Get the child link. | |
| void | FillJointMsg (msgs::Joint &_msg) |
| Fill a joint message. | |
Protected Member Functions | |
| virtual math::Angle | GetAngleImpl (int _index) const =0 |
Protected Attributes | |
| LinkPtr | childLink |
| The first link this joint connects to. | |
| LinkPtr | parentLink |
| The second link this joint connects to. | |
| std::string | visual |
| std::string | line1 |
| std::string | line2 |
| bool | showJoints |
| ModelPtr | model |
| math::Vector3 | anchorPos |
| LinkPtr | anchorLink |
| double | damping_coefficient |
| transport::PublisherPtr | vis_pub |
Base class for all joints.
| virtual math::Vector3 GetLinkForce | ( | unsigned int | index | ) | const [pure virtual] |
Get the force the joint applies to the first link.
| index | The index of the link( 0 or 1 ) |
Implemented in ODEJoint.
| virtual math::Vector3 GetLinkTorque | ( | unsigned int | index | ) | const [pure virtual] |
Get the torque the joint applies to the first link.
| index | The index of the link( 0 or 1 ) |
Implemented in ODEJoint.
| void SetAngle | ( | int | _index, |
| math::Angle | _angle | ||
| ) |
Set the angle of rotation.
This will not move the joint. The purpose of this function is purely to support animation of static models.
1.7.5.1