hpp::model::JointConfiguration Class Referenceabstract

Configuration of a Joint. More...

#include <hpp/model/joint-configuration.hh>

Inheritance diagram for hpp::model::JointConfiguration:

Public Member Functions

 JointConfiguration (size_type configSize)
 Constructor. More...
 
virtual ~JointConfiguration ()
 Destructor. More...
 
virtual void interpolate (ConfigurationIn_t q1, ConfigurationIn_t q2, const value_type &u, const size_type &index, ConfigurationOut_t result)=0
 Interpolate two configurations of the joint. More...
 
virtual value_type distance (ConfigurationIn_t q1, ConfigurationIn_t q2, const size_type &index) const =0
 Distance between two configurations of the joint. More...
 
virtual void integrate (ConfigurationIn_t q, vectorIn_t v, const size_type &indexConfig, const size_type &indexVelocity, ConfigurationOut_t result) const =0
 Integrate constant derivative during unit time. More...
 
virtual void difference (ConfigurationIn_t q1, ConfigurationIn_t q2, const size_type &indexConfig, const size_type &indexVelocity, vectorOut_t result) const =0
 Difference between two configurations. More...
 
virtual void uniformlySample (const size_type &index, ConfigurationOut_t result) const =0
 Uniformly sample the configuration space of the joint. More...
 
Bounds

Set whether given degree of freedom is bounded

void isBounded (size_type rank, bool bounded)
 
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...
 

Detailed Description

Configuration of a Joint.

Depending on joint type, the configuration of the joint belongs to Lie groups with different structures. This abstract class sspecifies some methods that are specific to the joint configuration space, mainly

  • straight interpolation
  • distance between configurations
  • sampling methods

Constructor & Destructor Documentation

◆ JointConfiguration()

hpp::model::JointConfiguration::JointConfiguration ( size_type  configSize)

Constructor.

Parameters
configSizedimension of the joint configuration size: used to resize the vector of bounds.

◆ ~JointConfiguration()

virtual hpp::model::JointConfiguration::~JointConfiguration ( )
virtual

Destructor.

Member Function Documentation

◆ difference()

virtual void hpp::model::JointConfiguration::difference ( ConfigurationIn_t  q1,
ConfigurationIn_t  q2,
const size_type indexConfig,
const size_type indexVelocity,
vectorOut_t  result 
) const
pure virtual

Difference between two configurations.

Parameters
q1configuration,
q2configuration,
indexConfigindex of first component of q corresponding to the joint.
indexVelocityindex of first component of v corresponding to the joint
Return values
result[indexVelocity:indexVelocity+nbdofs]part of vector representing the difference between q1 and q2.

See derived classes for details

Implemented in hpp::model::TranslationJointConfig< dimension >, hpp::model::rotationJointConfig::Bounded, hpp::model::rotationJointConfig::UnBounded, hpp::model::RotationJointConfig, hpp::model::SO3JointConfig, and hpp::model::AnchorJointConfig.

◆ distance()

virtual value_type hpp::model::JointConfiguration::distance ( ConfigurationIn_t  q1,
ConfigurationIn_t  q2,
const size_type index 
) const
pure virtual

Distance between two configurations of the joint.

Parameters
q1,q2two configurations of the robot
indexindex of first component of q1 and q2 corresponding to the joint.

Implemented in hpp::model::TranslationJointConfig< dimension >, hpp::model::rotationJointConfig::Bounded, hpp::model::rotationJointConfig::UnBounded, hpp::model::RotationJointConfig, hpp::model::SO3JointConfig, and hpp::model::AnchorJointConfig.

◆ integrate()

virtual void hpp::model::JointConfiguration::integrate ( ConfigurationIn_t  q,
vectorIn_t  v,
const size_type indexConfig,
const size_type indexVelocity,
ConfigurationOut_t  result 
) const
pure virtual

Integrate constant derivative during unit time.

Parameters
qinitial configuration
vjoint velocity
indexConfigindex of first component of q corresponding to the joint.
indexVelocityindex of first component of v corresponding to the joint
Return values
resultwrite joint configuration in result [indexConfig:indexConfig + joint config size]
Note
if result is beying bounds, return active bound.

Implemented in hpp::model::TranslationJointConfig< dimension >, hpp::model::rotationJointConfig::Bounded, hpp::model::rotationJointConfig::UnBounded, hpp::model::RotationJointConfig, hpp::model::SO3JointConfig, and hpp::model::AnchorJointConfig.

◆ interpolate()

virtual void hpp::model::JointConfiguration::interpolate ( ConfigurationIn_t  q1,
ConfigurationIn_t  q2,
const value_type u,
const size_type index,
ConfigurationOut_t  result 
)
pure virtual

Interpolate two configurations of the joint.

Parameters
q1,q2,twoconfigurations to interpolate
uin [0,1] position along the interpolation: q1 for u=0, q2 for u=1
indexindex of first component of q1 and q2 corresponding to the joint.
Return values
resultwrite joint configuration in result [index:index+nb dofs]

q1 and q2 are configurations of the robot where coordinates between index and index + number of dofs - 1 correspond to the configuration of the joint:

  • a real value for translation joint and bounded rotation joints,
  • an angle for unbounded rotation joints,
  • x, y, z, roll, pitch, yaw for freeflyer joints.

Implemented in hpp::model::TranslationJointConfig< dimension >, hpp::model::rotationJointConfig::Bounded, hpp::model::rotationJointConfig::UnBounded, hpp::model::RotationJointConfig, hpp::model::SO3JointConfig, and hpp::model::AnchorJointConfig.

◆ isBounded() [1/2]

void hpp::model::JointConfiguration::isBounded ( size_type  rank,
bool  bounded 
)

◆ isBounded() [2/2]

bool hpp::model::JointConfiguration::isBounded ( size_type  rank) const

Get whether given degree of freedom is bounded.

◆ lowerBound() [1/2]

value_type hpp::model::JointConfiguration::lowerBound ( size_type  rank) const

Get lower bound of given degree of freedom.

◆ lowerBound() [2/2]

void hpp::model::JointConfiguration::lowerBound ( size_type  rank,
value_type  lowerBound 
)

Set lower bound of given degree of freedom.

◆ uniformlySample()

virtual void hpp::model::JointConfiguration::uniformlySample ( const size_type index,
ConfigurationOut_t  result 
) const
pure virtual

Uniformly sample the configuration space of the joint.

Parameters
indexindex of first component of q corresponding to the joint.
Return values
resultwrite joint configuration in result [index:index+nb dofs]

Implemented in hpp::model::TranslationJointConfig< dimension >, hpp::model::rotationJointConfig::Bounded, hpp::model::rotationJointConfig::UnBounded, hpp::model::RotationJointConfig, hpp::model::SO3JointConfig, and hpp::model::AnchorJointConfig.

◆ upperBound() [1/2]

value_type hpp::model::JointConfiguration::upperBound ( size_type  rank) const

Get upper bound of given degree of freedom.

◆ upperBound() [2/2]

void hpp::model::JointConfiguration::upperBound ( size_type  rank,
value_type  upperBound 
)

Set upper bound of given degree of freedom.