This class represents a robot joint. More...
#include <abstract-robot-dynamics/joint.hh>
Public Member Functions | |
virtual | ~CjrlJoint () |
Destructor. | |
Joint name | |
virtual const std::string & | getName () const =0 |
Get joint name. | |
virtual void | setName (const std::string &name)=0 |
Set joint name. | |
Joint hierarchy. | |
virtual CjrlJoint * | parentJoint () const =0 |
Get a pointer to the parent joint (if any). | |
virtual bool | addChildJoint (CjrlJoint &inJoint)=0 |
Add a child joint. | |
virtual unsigned int | countChildJoints () const =0 |
Get the number of children. | |
virtual CjrlJoint * | childJoint (unsigned int inJointRank) const =0 |
Returns the child joint at the given rank. | |
virtual std::vector< CjrlJoint * > | jointsFromRootToThis () const =0 |
Get a vector containing references of the joints between the rootJoint and this joint. | |
virtual unsigned int | rankInConfiguration () const =0 |
Get the rank of this joint in the robot configuration vector. | |
Joint kinematics | |
virtual const matrix4d & | initialPosition () const =0 |
Get the initial position of the joint. | |
virtual const matrix4d & | currentTransformation () const =0 |
Get the current transformation of the joint. | |
virtual CjrlRigidVelocity | jointVelocity () const =0 |
Get the velocity ![]() | |
virtual CjrlRigidAcceleration | jointAcceleration () const =0 |
Get the acceleration of the joint. | |
virtual unsigned int | numberDof () const =0 |
Get the number of degrees of freedom of the joint. | |
Bounds of the degrees of freedom | |
virtual double | lowerBound (unsigned int inDofRank) const =0 |
Get the lower bound of a given degree of freedom of the joint. | |
virtual double | upperBound (unsigned int inDofRank) const =0 |
Get the upper bound of a given degree of freedom of the joint. | |
virtual void | lowerBound (unsigned int inDofRank, double inLowerBound)=0 |
Set the lower bound of a given degree of freedom of the joint. | |
virtual void | upperBound (unsigned int inDofRank, double inUpperBound)=0 |
Set the upper bound of a given degree of freedom of the joint. | |
virtual double | lowerVelocityBound (unsigned int inDofRank) const =0 |
Get the lower velocity bound of a given degree of freedom of the joint. | |
virtual double | upperVelocityBound (unsigned int inDofRank) const =0 |
Get the upper veocity bound of a given degree of freedom of the joint. | |
virtual void | lowerVelocityBound (unsigned int inDofRank, double inLowerBound)=0 |
Set the lower velocity bound of a given degree of freedom of the joint. | |
virtual void | upperVelocityBound (unsigned int inDofRank, double inUpperBound)=0 |
Set the upper velocity bound of a given degree of freedom of the joint. | |
virtual double | lowerTorqueBound (unsigned int inDofRank) const =0 |
Get the lower torque bound of a given degree of freedom of the joint. | |
virtual double | upperTorqueBound (unsigned int inDofRank) const =0 |
Get the upper veocity bound of a given degree of freedom of the joint. | |
virtual void | lowerTorqueBound (unsigned int inDofRank, double inLowerBound)=0 |
Set the lower torque bound of a given degree of freedom of the joint. | |
virtual void | upperTorqueBound (unsigned int inDofRank, double inUpperBound)=0 |
Set the upper torque bound of a given degree of freedom of the joint. | |
Jacobian functions wrt configuration. | |
virtual const matrixNxP & | jacobianJointWrtConfig () const =0 |
Get the Jacobian matrix of the joint position and orientation wrt the robot configuration. | |
virtual void | computeJacobianJointWrtConfig ()=0 |
Compute the joint's jacobian wrt the robot configuration. | |
virtual void | getJacobianPointWrtConfig (const vector3d &inPointJointFrame, matrixNxP &outjacobian) const =0 |
Get the jacobian of the point specified in local frame by inPointJointFrame. | |
Body linked to the joint | |
virtual CjrlBody * | linkedBody () const =0 |
Get a pointer to the linked body (if any). | |
virtual void | setLinkedBody (CjrlBody &inBody)=0 |
Link a body to the joint. |
This class represents a robot joint.
A joint may have several degrees of freedom. The position, velocity and acceleration of a joint are defined by the configuration vector and its first and second derivatives.
Several rigid-body transformations represented by matrix4d type are considered in the following functions.
Three types of joints are considered and defined as follows.
transformation of a joint."
transformation of a joint."As an example, let us denote by
The position of the point in configuration is given by
virtual CjrlJoint::~CjrlJoint | ( | ) | [inline, virtual] |
Destructor.
virtual bool CjrlJoint::addChildJoint | ( | CjrlJoint & | inJoint | ) | [pure virtual] |
Add a child joint.
virtual CjrlJoint* CjrlJoint::childJoint | ( | unsigned int | inJointRank | ) | const [pure virtual] |
Returns the child joint at the given rank.
virtual void CjrlJoint::computeJacobianJointWrtConfig | ( | ) | [pure virtual] |
Compute the joint's jacobian wrt the robot configuration.
virtual unsigned int CjrlJoint::countChildJoints | ( | ) | const [pure virtual] |
Get the number of children.
virtual const matrix4d& CjrlJoint::currentTransformation | ( | ) | const [pure virtual] |
Get the current transformation of the joint.
The current transformation of the joint is the transformation moving the joint from the position in initial configuration to the current position.
The current transformation is determined by the configuration of the robot.
virtual void CjrlJoint::getJacobianPointWrtConfig | ( | const vector3d & | inPointJointFrame, |
matrixNxP & | outjacobian | ||
) | const [pure virtual] |
Get the jacobian of the point specified in local frame by inPointJointFrame.
The output matrix outjacobian is automatically resized if necessary
virtual const std::string& CjrlJoint::getName | ( | ) | const [pure virtual] |
Get joint name.
virtual const matrix4d& CjrlJoint::initialPosition | ( | ) | const [pure virtual] |
Get the initial position of the joint.
The initial position of the joint is the position of the local frame of the joint.
virtual const matrixNxP& CjrlJoint::jacobianJointWrtConfig | ( | ) | const [pure virtual] |
Get the Jacobian matrix of the joint position and orientation wrt the robot configuration.
Kinematical constraints from interaction with the environment are not taken into account for this computation.
The corresponding computation can be done by the robot for each of its joints or by the joint.
where and
are respectively the linear and angular velocities of the joint implied by the variation of degree of freedom
. The velocity of the joint returned by CjrlJoint::jointVelocity can thus be obtained through the following formula:
virtual CjrlRigidAcceleration CjrlJoint::jointAcceleration | ( | ) | const [pure virtual] |
Get the acceleration of the joint.
The acceleration is determined by the configuration of the robot and its first and second time derivative: .
virtual std::vector<CjrlJoint*> CjrlJoint::jointsFromRootToThis | ( | ) | const [pure virtual] |
Get a vector containing references of the joints between the rootJoint and this joint.
The root Joint and this Joint are included in the vector.
virtual CjrlRigidVelocity CjrlJoint::jointVelocity | ( | ) | const [pure virtual] |
Get the velocity of the joint.
The velocity is determined by the configuration of the robot and its time derivative: .
virtual CjrlBody* CjrlJoint::linkedBody | ( | ) | const [pure virtual] |
Get a pointer to the linked body (if any).
virtual double CjrlJoint::lowerBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the lower bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::lowerBound | ( | unsigned int | inDofRank, |
double | inLowerBound | ||
) | [pure virtual] |
Set the lower bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inLowerBound | lower bound |
virtual double CjrlJoint::lowerTorqueBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the lower torque bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::lowerTorqueBound | ( | unsigned int | inDofRank, |
double | inLowerBound | ||
) | [pure virtual] |
Set the lower torque bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inLowerBound | lower bound |
virtual double CjrlJoint::lowerVelocityBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the lower velocity bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::lowerVelocityBound | ( | unsigned int | inDofRank, |
double | inLowerBound | ||
) | [pure virtual] |
Set the lower velocity bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inLowerBound | lower bound |
virtual unsigned int CjrlJoint::numberDof | ( | ) | const [pure virtual] |
Get the number of degrees of freedom of the joint.
virtual CjrlJoint* CjrlJoint::parentJoint | ( | ) | const [pure virtual] |
Get a pointer to the parent joint (if any).
virtual unsigned int CjrlJoint::rankInConfiguration | ( | ) | const [pure virtual] |
Get the rank of this joint in the robot configuration vector.
If the Joint has several degrees of freedom, it is the rank of the first degree of freedom.
virtual void CjrlJoint::setLinkedBody | ( | CjrlBody & | inBody | ) | [pure virtual] |
Link a body to the joint.
virtual void CjrlJoint::setName | ( | const std::string & | name | ) | [pure virtual] |
Set joint name.
virtual double CjrlJoint::upperBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the upper bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::upperBound | ( | unsigned int | inDofRank, |
double | inUpperBound | ||
) | [pure virtual] |
Set the upper bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inUpperBound | Upper bound. |
virtual double CjrlJoint::upperTorqueBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the upper veocity bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::upperTorqueBound | ( | unsigned int | inDofRank, |
double | inUpperBound | ||
) | [pure virtual] |
Set the upper torque bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inUpperBound | Upper bound. |
virtual double CjrlJoint::upperVelocityBound | ( | unsigned int | inDofRank | ) | const [pure virtual] |
Get the upper veocity bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
virtual void CjrlJoint::upperVelocityBound | ( | unsigned int | inDofRank, |
double | inUpperBound | ||
) | [pure virtual] |
Set the upper velocity bound of a given degree of freedom of the joint.
inDofRank | Id of the dof in the joint |
inUpperBound | Upper bound. |