hpp::pinocchio::Joint Class Reference

Robot joint. More...

#include <hpp/pinocchio/joint.hh>

Collaboration diagram for hpp::pinocchio::Joint:
[legend]

Public Member Functions

DeviceConstPtr_t robot () const
 Access robot owning the object. More...
 
DevicePtr_t robot ()
 Access robot owning the object. More...
 
virtual std::ostream & display (std::ostream &os) const
 Display joint. More...
 
LiegroupSpacePtr_t configurationSpace () const
 Get configuration space of joint. More...
 
LiegroupSpacePtr_t RnxSOnConfigurationSpace () const
 Get configuration space of joint. More...
 
Name
const std::string & name () const
 Get name. More...
 
Position
const Transform3fcurrentTransformation () const
 Joint transformation. More...
 
const Transform3fcurrentTransformation (const DeviceData &data) const
 Joint transformation. More...
 
Size and rank
size_type numberDof () const
 Return number of degrees of freedom. More...
 
size_type configSize () const
 Return number of degrees of freedom. More...
 
size_type rankInConfiguration () const
 Return rank of the joint in the configuration vector. More...
 
size_type rankInVelocity () const
 Return rank of the joint in the velocity vector. More...
 
Kinematic chain
JointPtr_t parentJoint () const
 Get a pointer to the parent joint (if any). More...
 
std::size_t numberChildJoints () const
 Number of child joints. More...
 
JointPtr_t childJoint (std::size_t rank) const
 Get child joint. More...
 
const Transform3fpositionInParentFrame () const
 Get (constant) placement of joint in parent frame, i.e. model.jointPlacement[idx]. More...
 
Bounds
void isBounded (size_type rank, bool bounded)
 Set whether given degree of freedom is bounded. More...
 
bool isBounded (size_type rank) const
 Get whether given degree of freedom is bounded. More...
 
value_type lowerBound (size_type rank) const
 Get lower bound of given degree of freedom. More...
 
value_type upperBound (size_type rank) const
 Get upper bound of given degree of freedom. More...
 
void lowerBound (size_type rank, value_type lowerBound)
 Set lower bound of given degree of freedom. More...
 
void upperBound (size_type rank, value_type upperBound)
 Set upper bound of given degree of freedom. More...
 
void lowerBounds (vectorIn_t lowerBounds)
 Set lower bounds. More...
 
void upperBounds (vectorIn_t upperBounds)
 Set upper bounds. More...
 
value_type upperBoundLinearVelocity () const
 Get upper bound on linear velocity of the joint frame. More...
 
value_type upperBoundAngularVelocity () const
 Get upper bound on angular velocity of the joint frame. More...
 
const value_typemaximalDistanceToParent () const
 Maximal distance of joint origin to parent origin. More...
 
Jacobian
JointJacobian_tjacobian (const bool localFrame=true) const
 Get non const reference to Jacobian. More...
 
JointJacobian_tjacobian (DeviceData &data, const bool localFrame=true) const
 Get reference to Jacobian. More...
 
Body linked to the joint
BodyPtr_t linkedBody () const
 Get linked body. More...
 
Pinocchio API
const JointIndexindex () const
 
const JointModeljointModel () const
 

Protected Member Functions

void computeMaximalDistanceToParent ()
 Compute the maximal distance. More...
 
void setChildList ()
 Store list of childrens. More...
 
Modelmodel ()
 
const Modelmodel () const
 
DeviceDatadata () const
 
void selfAssert () const
 Assert that the members of the struct are valid (no null pointer, etc). More...
 

Protected Attributes

value_type maximalDistanceToParent_
 
DeviceWkPtr_t devicePtr
 
JointIndex jointIndex
 
std::vector< JointIndexchildren
 

Friends

class Device
 

Construction and copy and destruction

static JointPtr_t create (DeviceWkPtr_t device, JointIndex indexInJointList)
 Create a new joint Returns a null pointer if indexInJointList is 0. More...
 
 Joint (DeviceWkPtr_t device, JointIndex indexInJointList)
 Constructor. More...
 
 ~Joint ()
 

Detailed Description

Robot joint.

A joint maps an input vector to a transformation of SE(3) from the parent frame to the joint frame.

The input vector is provided through the configuration vector of the robot the joint belongs to. The joint input vector is composed of the components of the robot configuration starting at Joint::rankInConfiguration.

The joint input vector represents a element of a Lie group, either

  • a vector space for JointTranslation, and bounded JointRotation,
  • the unit circle for non-bounded JointRotation joints,
  • an element of SO(3) for JointSO3, represented by a unit quaternion.

Operations specific to joints (uniform sampling of input space, straight interpolation, distance, ...) are performed by a JointConfiguration instance that has the same class hierarchy as Joint.

Constructor & Destructor Documentation

hpp::pinocchio::Joint::Joint ( DeviceWkPtr_t  device,
JointIndex  indexInJointList 
)

Constructor.

Parameters
devicepointer on the device the joint is belonging to.
indexInJointListindex of the joint, i.e. joint = device.model.joints[index]
hpp::pinocchio::Joint::~Joint ( )
inline

Member Function Documentation

JointPtr_t hpp::pinocchio::Joint::childJoint ( std::size_t  rank) const

Get child joint.

void hpp::pinocchio::Joint::computeMaximalDistanceToParent ( )
protected

Compute the maximal distance.

See also
maximalDistanceToParent
size_type hpp::pinocchio::Joint::configSize ( ) const

Return number of degrees of freedom.

LiegroupSpacePtr_t hpp::pinocchio::Joint::configurationSpace ( ) const

Get configuration space of joint.

static JointPtr_t hpp::pinocchio::Joint::create ( DeviceWkPtr_t  device,
JointIndex  indexInJointList 
)
static

Create a new joint Returns a null pointer if indexInJointList is 0.

const Transform3f& hpp::pinocchio::Joint::currentTransformation ( ) const
inline

Joint transformation.

References currentTransformation().

Referenced by currentTransformation().

const Transform3f& hpp::pinocchio::Joint::currentTransformation ( const DeviceData data) const

Joint transformation.

DeviceData& hpp::pinocchio::Joint::data ( ) const
protected
virtual std::ostream& hpp::pinocchio::Joint::display ( std::ostream &  os) const
virtual

Display joint.

Referenced by hpp::pinocchio::operator<<().

const JointIndex& hpp::pinocchio::Joint::index ( ) const
inline
void hpp::pinocchio::Joint::isBounded ( size_type  rank,
bool  bounded 
)

Set whether given degree of freedom is bounded.

Warning
Joint always has bounds. When bounded == false, the bounds are -infinity and infinity.
bool hpp::pinocchio::Joint::isBounded ( size_type  rank) const

Get whether given degree of freedom is bounded.

JointJacobian_t& hpp::pinocchio::Joint::jacobian ( const bool  localFrame = true) const
inline

Get non const reference to Jacobian.

Parameters
localFrameif true, compute the jacobian (6d) in the local frame, whose linear part corresponds to the velocity of the center of the frame. If false, the jacobian is expressed in the global frame and its linear part corresponds to the value of the velocity vector field at the center of the world.

References jacobian().

Referenced by jacobian().

JointJacobian_t& hpp::pinocchio::Joint::jacobian ( DeviceData data,
const bool  localFrame = true 
) const

Get reference to Jacobian.

Parameters
localFrameif true, compute the jacobian (6d) in the local frame, whose linear part corresponds to the velocity of the center of the frame. If false, the jacobian is expressed in the global frame and its linear part corresponds to the value of the velocity vector field at the center of the world.
const JointModel& hpp::pinocchio::Joint::jointModel ( ) const
BodyPtr_t hpp::pinocchio::Joint::linkedBody ( ) const

Get linked body.

value_type hpp::pinocchio::Joint::lowerBound ( size_type  rank) const

Get lower bound of given degree of freedom.

void hpp::pinocchio::Joint::lowerBound ( size_type  rank,
value_type  lowerBound 
)

Set lower bound of given degree of freedom.

void hpp::pinocchio::Joint::lowerBounds ( vectorIn_t  lowerBounds)

Set lower bounds.

const value_type& hpp::pinocchio::Joint::maximalDistanceToParent ( ) const
inline

Maximal distance of joint origin to parent origin.

Model& hpp::pinocchio::Joint::model ( )
protected
const Model& hpp::pinocchio::Joint::model ( ) const
protected
const std::string& hpp::pinocchio::Joint::name ( ) const

Get name.

std::size_t hpp::pinocchio::Joint::numberChildJoints ( ) const

Number of child joints.

size_type hpp::pinocchio::Joint::numberDof ( ) const

Return number of degrees of freedom.

JointPtr_t hpp::pinocchio::Joint::parentJoint ( ) const

Get a pointer to the parent joint (if any).

const Transform3f& hpp::pinocchio::Joint::positionInParentFrame ( ) const

Get (constant) placement of joint in parent frame, i.e. model.jointPlacement[idx].

size_type hpp::pinocchio::Joint::rankInConfiguration ( ) const

Return rank of the joint in the configuration vector.

size_type hpp::pinocchio::Joint::rankInVelocity ( ) const

Return rank of the joint in the velocity vector.

LiegroupSpacePtr_t hpp::pinocchio::Joint::RnxSOnConfigurationSpace ( ) const

Get configuration space of joint.

Use R^n x SO(n) instead of SE(n).

DeviceConstPtr_t hpp::pinocchio::Joint::robot ( ) const
inline

Access robot owning the object.

DevicePtr_t hpp::pinocchio::Joint::robot ( )
inline

Access robot owning the object.

References hpp::pinocchio::display().

void hpp::pinocchio::Joint::selfAssert ( ) const
protected

Assert that the members of the struct are valid (no null pointer, etc).

void hpp::pinocchio::Joint::setChildList ( )
protected

Store list of childrens.

value_type hpp::pinocchio::Joint::upperBound ( size_type  rank) const

Get upper bound of given degree of freedom.

void hpp::pinocchio::Joint::upperBound ( size_type  rank,
value_type  upperBound 
)

Set upper bound of given degree of freedom.

value_type hpp::pinocchio::Joint::upperBoundAngularVelocity ( ) const

Get upper bound on angular velocity of the joint frame.

Returns
coefficient $\lambda$ such that

\begin{equation*} \forall \mathbf{q}_{joint}\ \ \ \ \ \ \|\omega\| \leq \lambda \|\mathbf{\dot{q}}_{joint}\| \end{equation*}

where
  • $\mathbf{q}_{joint}$ is any joint configuration,
  • $\mathbf{\dot{q}}_{joint}$ is the joint velocity, and
  • $\omega = J(\mathbf{q})*\mathbf{\dot{q}}$ is the angular velocity of the joint frame.
value_type hpp::pinocchio::Joint::upperBoundLinearVelocity ( ) const

Get upper bound on linear velocity of the joint frame.

Returns
coefficient $\lambda$ such that

\begin{equation*} \forall \mathbf{q}_{joint}\ \ \ \ \ \ \|\mathbf {v}\| \leq \lambda \|\mathbf{\dot{q}}_{joint}\| \end{equation*}

where
  • $\mathbf{q}_{joint}$ is any joint configuration,
  • $\mathbf{\dot{q}}_{joint}$ is the joint velocity, and
  • $\mathbf{v} = J(\mathbf{q})*\mathbf{\dot{q}} $ is the linear velocity of the joint frame.
void hpp::pinocchio::Joint::upperBounds ( vectorIn_t  upperBounds)

Set upper bounds.

Friends And Related Function Documentation

friend class Device
friend

Member Data Documentation

std::vector<JointIndex> hpp::pinocchio::Joint::children
protected
DeviceWkPtr_t hpp::pinocchio::Joint::devicePtr
protected
JointIndex hpp::pinocchio::Joint::jointIndex
protected
value_type hpp::pinocchio::Joint::maximalDistanceToParent_
protected