Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hpp::core::LockedJoint Class Reference

Implementation of Equation specific to locked joint. More...

#include <hpp/core/locked-joint.hh>

Inheritance diagram for hpp::core::LockedJoint:
[legend]
Collaboration diagram for hpp::core::LockedJoint:
[legend]

Public Member Functions

virtual EquationPtr_t copy () const
 Copy object and return shared pointer to copy. More...
 
size_type rankInConfiguration () const
 Get index of locked degree of freedom in robot configuration vector. More...
 
size_type rankInVelocity () const
 Get index of locked degree of freedom in robot velocity vector. More...
 
size_type configSize () const
 Get the configuration size of the joint. More...
 
size_type numberDof () const
 Get number of degrees of freedom of the joint. More...
 
segments_t outputConf () const
 Get output configuration variables. More...
 
segments_t outputVelocity () const
 Get output degrees of freedom. More...
 
segments_t inputConf () const
 Get input configuration variables. More...
 
segments_t inputVelocity () const
 Get input degrees of freedom. More...
 
const LiegroupSpacePtr_tconfigSpace () const
 Get configuration space of locked joint. More...
 
vectorIn_t value () const
 Get the value of the locked joint. More...
 
void value (vectorIn_t value)
 Set the value of the locked joint. More...
 
void rightHandSideFromConfig (ConfigurationIn_t config)
 Set the value of the locked joint from a configuration. More...
 
bool isSatisfied (ConfigurationIn_t config)
 Check whether a configuration statisfies the constraint. More...
 
bool isSatisfied (ConfigurationIn_t config, vector_t &error)
 Check whether a configuration statisfies the constraint. More...
 
const JointPtr_tjoint ()
 Return shared pointer to joint. More...
 
const std::string & jointName () const
 Return the joint name. More...
 
std::ostream & print (std::ostream &os) const
 Print object in a stream. More...
 
- Public Member Functions inherited from hpp::core::ExplicitNumericalConstraint
virtual DifferentiableFunctionPtr_t explicitFunction () const
 
DifferentiableFunctionPtr_t outputFunction () const
 
DifferentiableFunctionPtr_t outputFunctionInverse () const
 
const segments_toutputConf () const
 Get output configuration variables. More...
 
const segments_toutputVelocity () const
 Get output degrees of freedom. More...
 
const segments_tinputConf () const
 Get input configuration variables. More...
 
const segments_tinputVelocity () const
 Get input degrees of freedom. More...
 
- Public Member Functions inherited from hpp::core::NumericalConstraint
virtual ~NumericalConstraint ()
 
void rightHandSideFromConfig (ConfigurationIn_t config)
 
DifferentiableFunctionfunction () const
 Return a reference to the inner function. More...
 
const DifferentiableFunctionPtr_tfunctionPtr () const
 Return a reference to the inner function. More...
 
vector_tvalue ()
 Return a reference to the value. More...
 
matrix_tjacobian ()
 Return a reference to the jacobian. More...
 
- Public Member Functions inherited from hpp::core::Equation
bool operator== (const Equation &other) const
 Operator equality. More...
 
void rightHandSide (vectorIn_t rhs)
 Set the right hand side of the equation. More...
 
vectorIn_t rightHandSide () const
 Return the right hand side of the equation. More...
 
size_type rhsSize () const
 Return the size of the right hand side constraint. More...
 
const ComparisonTypes_tcomparisonType () const
 Return the ComparisonType. More...
 
void comparisonType (const ComparisonTypes_t &comp)
 Set the comparison type. More...
 
bool constantRightHandSide () const
 
vectorOut_t nonConstRightHandSide ()
 Return the right hand side of the equation. More...
 
virtual ~Equation ()
 

Static Public Member Functions

static LockedJointPtr_t create (const JointPtr_t &joint, const LiegroupElement &value)
 Create locked joint and return shared pointer. More...
 
static LockedJointPtr_t create (const JointPtr_t &joint, const size_type index, vectorIn_t value)
 Create partial locked joint (only some degrees of freedom) More...
 
static LockedJointPtr_t create (const DevicePtr_t &dev, const size_type index, vectorIn_t value)
 Create locked degrees of freedom of extra config space. More...
 
static LockedJointPtr_t createCopy (LockedJointConstPtr_t other)
 Return shared pointer to copy. More...
 
- Static Public Member Functions inherited from hpp::core::ExplicitNumericalConstraint
static ExplicitNumericalConstraintPtr_t create (const DevicePtr_t &robot, const DifferentiableFunctionPtr_t &function, const segments_t &inputConf, const segments_t &inputVelocity, const segments_t &outputConf, const segments_t &outputVelocity, const ComparisonTypes_t &comp=ComparisonTypes_t())
 Create instance and return shared pointer. More...
 
static ExplicitNumericalConstraintPtr_t create (const DevicePtr_t &robot, const DifferentiableFunctionPtr_t &function, const DifferentiableFunctionPtr_t &g, const DifferentiableFunctionPtr_t &ginv, const segments_t &inputConf, const segments_t &inputVelocity, const segments_t &outputConf, const segments_t &outputVelocity, const ComparisonTypes_t &comp=ComparisonTypes_t())
 Create instance and return shared pointer. More...
 
static ExplicitNumericalConstraintPtr_t createCopy (const ExplicitNumericalConstraintPtr_t &other)
 Create a copy and return shared pointer. More...
 
- Static Public Member Functions inherited from hpp::core::NumericalConstraint
static NumericalConstraintPtr_t create (const DifferentiableFunctionPtr_t &function)
 Create a shared pointer to a new instance. More...
 
static NumericalConstraintPtr_t create (const DifferentiableFunctionPtr_t &function, ComparisonTypes_t comp)
 Create a shared pointer to a new instance. More...
 
static NumericalConstraintPtr_t create (const DifferentiableFunctionPtr_t &function, ComparisonTypes_t comp, vectorIn_t rhs)
 Create a shared pointer to a new instance. More...
 
static NumericalConstraintPtr_t createCopy (const NumericalConstraintPtr_t &other)
 Create a copy and return shared pointer. More...
 

Protected Member Functions

 LockedJoint (const JointPtr_t &joint, const LiegroupElement &value)
 Constructor. More...
 
 LockedJoint (const JointPtr_t &joint, const size_type index, vectorIn_t value)
 Constructor of partial locked joint. More...
 
 LockedJoint (const DevicePtr_t &robot, const size_type index, vectorIn_t value)
 Constructor of locked degrees of freedom of extra config space. More...
 
 LockedJoint (const LockedJoint &other)
 Copy constructor. More...
 
virtual bool isEqual (const Equation &other, bool swapAndTest) const
 Test equality with other instance. More...
 
void init (const LockedJointPtr_t &self)
 
- Protected Member Functions inherited from hpp::core::ExplicitNumericalConstraint
 ExplicitNumericalConstraint (const DevicePtr_t &robot, const DifferentiableFunctionPtr_t &function, const segments_t &inputConf, const segments_t &inputVelocity, const segments_t &outputConf, const segments_t &outputVelocity, const ComparisonTypes_t &comp)
 Constructor. More...
 
 ExplicitNumericalConstraint (const DevicePtr_t &robot, const DifferentiableFunctionPtr_t &function, const DifferentiableFunctionPtr_t &g, const DifferentiableFunctionPtr_t &ginv, const segments_t &inputConf, const segments_t &inputVelocity, const segments_t &outputConf, const segments_t &outputVelocity, const ComparisonTypes_t &comp)
 Constructor. More...
 
 ExplicitNumericalConstraint (const ExplicitNumericalConstraint &other)
 Constructor. More...
 
void init (const ExplicitNumericalConstraintWkPtr_t &weak)
 
- Protected Member Functions inherited from hpp::core::NumericalConstraint
 NumericalConstraint (const DifferentiableFunctionPtr_t &function, ComparisonTypes_t comp)
 Constructor. More...
 
 NumericalConstraint (const DifferentiableFunctionPtr_t &function, ComparisonTypes_t comp, vectorIn_t rhs)
 Constructor. More...
 
 NumericalConstraint (const NumericalConstraint &other)
 Copy constructor. More...
 
void init (const NumericalConstraintWkPtr_t &weak)
 
- Protected Member Functions inherited from hpp::core::Equation
 Equation (const ComparisonTypes_t &comp, vectorIn_t rhs)
 
 Equation (const Equation &other)
 
void init (const EquationWkPtr_t &weak)
 

Additional Inherited Members

- Protected Attributes inherited from hpp::core::ExplicitNumericalConstraint
DifferentiableFunctionPtr_t inputToOutput_
 
DifferentiableFunctionPtr_t g_
 
DifferentiableFunctionPtr_t ginv_
 
segments_t inputConf_
 
segments_t inputVelocity_
 
segments_t outputConf_
 
segments_t outputVelocity_
 
ExplicitNumericalConstraintWkPtr_t weak_
 

Detailed Description

Implementation of Equation specific to locked joint.

The underlying equation is \( q_i (q) = rhs \). The right hand side of the equation is also called value.

Constructor & Destructor Documentation

◆ LockedJoint() [1/4]

hpp::core::LockedJoint::LockedJoint ( const JointPtr_t joint,
const LiegroupElement value 
)
protected

Constructor.

Parameters
jointjoint that is locked,
valueof the constant joint config,

◆ LockedJoint() [2/4]

hpp::core::LockedJoint::LockedJoint ( const JointPtr_t joint,
const size_type  index,
vectorIn_t  value 
)
protected

Constructor of partial locked joint.

Parameters
jointjoint that is locked,
indexfirst locked degree of freedom in the joint,
valueof the constant joint partial config, size of value determines the number of degrees of freedom locked.
Note
valid only for translation joints.

◆ LockedJoint() [3/4]

hpp::core::LockedJoint::LockedJoint ( const DevicePtr_t robot,
const size_type  index,
vectorIn_t  value 
)
protected

Constructor of locked degrees of freedom of extra config space.

Parameters
robotrobot
indexindex of the first locked extra degree of freedom,
valueof the locked degrees of freedom, size of value determines the number of degrees of freedom locked.

◆ LockedJoint() [4/4]

hpp::core::LockedJoint::LockedJoint ( const LockedJoint other)
protected

Copy constructor.

Member Function Documentation

◆ configSize()

size_type hpp::core::LockedJoint::configSize ( ) const

Get the configuration size of the joint.

◆ configSpace()

const LiegroupSpacePtr_t& hpp::core::LockedJoint::configSpace ( ) const

Get configuration space of locked joint.

◆ copy()

virtual EquationPtr_t hpp::core::LockedJoint::copy ( ) const
virtual

Copy object and return shared pointer to copy.

Reimplemented from hpp::core::ExplicitNumericalConstraint.

◆ create() [1/3]

static LockedJointPtr_t hpp::core::LockedJoint::create ( const JointPtr_t joint,
const LiegroupElement value 
)
static

Create locked joint and return shared pointer.

Parameters
jointjoint that is locked,
valueof the constant joint config,

◆ create() [2/3]

static LockedJointPtr_t hpp::core::LockedJoint::create ( const JointPtr_t joint,
const size_type  index,
vectorIn_t  value 
)
static

Create partial locked joint (only some degrees of freedom)

Parameters
jointjoint that is locked,
indexfirst locked degree of freedom in the joint,
valueof the constant joint partial config, size of value determines the number of degrees of freedom locked.
Note
valid only for translation joints.

◆ create() [3/3]

static LockedJointPtr_t hpp::core::LockedJoint::create ( const DevicePtr_t dev,
const size_type  index,
vectorIn_t  value 
)
static

Create locked degrees of freedom of extra config space.

Parameters
robotrobot
indexindex of the first locked extra degree of freedom,
valueof the locked degrees of freedom, size of value determines the number of degrees of freedom locked.

◆ createCopy()

static LockedJointPtr_t hpp::core::LockedJoint::createCopy ( LockedJointConstPtr_t  other)
static

Return shared pointer to copy.

Parameters
otherinstance to copy.

◆ init()

void hpp::core::LockedJoint::init ( const LockedJointPtr_t self)
protected

◆ inputConf()

segments_t hpp::core::LockedJoint::inputConf ( ) const
inline

Get input configuration variables.

◆ inputVelocity()

segments_t hpp::core::LockedJoint::inputVelocity ( ) const
inline

Get input degrees of freedom.

◆ isEqual()

virtual bool hpp::core::LockedJoint::isEqual ( const Equation other,
bool  swapAndTest 
) const
protectedvirtual

Test equality with other instance.

Parameters
otherobject to copy
swapAndTestwhether we should also check other == this

Reimplemented from hpp::core::NumericalConstraint.

◆ isSatisfied() [1/2]

bool hpp::core::LockedJoint::isSatisfied ( ConfigurationIn_t  config)

Check whether a configuration statisfies the constraint.

◆ isSatisfied() [2/2]

bool hpp::core::LockedJoint::isSatisfied ( ConfigurationIn_t  config,
vector_t error 
)

Check whether a configuration statisfies the constraint.

Parameters
configinput configuration
Return values
errordifference between configuration of joint read in input configuration and locked value.

◆ joint()

const JointPtr_t& hpp::core::LockedJoint::joint ( )
inline

Return shared pointer to joint.

◆ jointName()

const std::string& hpp::core::LockedJoint::jointName ( ) const
inline

Return the joint name.

◆ numberDof()

size_type hpp::core::LockedJoint::numberDof ( ) const

Get number of degrees of freedom of the joint.

◆ outputConf()

segments_t hpp::core::LockedJoint::outputConf ( ) const
inline

Get output configuration variables.

◆ outputVelocity()

segments_t hpp::core::LockedJoint::outputVelocity ( ) const
inline

Get output degrees of freedom.

◆ print()

std::ostream& hpp::core::LockedJoint::print ( std::ostream &  os) const

Print object in a stream.

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

◆ rankInConfiguration()

size_type hpp::core::LockedJoint::rankInConfiguration ( ) const

Get index of locked degree of freedom in robot configuration vector.

◆ rankInVelocity()

size_type hpp::core::LockedJoint::rankInVelocity ( ) const

Get index of locked degree of freedom in robot velocity vector.

◆ rightHandSideFromConfig()

void hpp::core::LockedJoint::rightHandSideFromConfig ( ConfigurationIn_t  config)
virtual

Set the value of the locked joint from a configuration.

Implements hpp::core::Equation.

◆ value() [1/2]

vectorIn_t hpp::core::LockedJoint::value ( ) const

Get the value of the locked joint.

◆ value() [2/2]

void hpp::core::LockedJoint::value ( vectorIn_t  value)

Set the value of the locked joint.