Set of constraints applicable to a robot configuration. More...
#include <hpp/core/constraint-set.hh>
Public Member Functions | |
virtual ConstraintPtr_t | copy () const |
return shared pointer to copy More... | |
void | addConstraint (const ConstraintPtr_t &constraint) |
Add a constraint to the set. More... | |
ConfigProjectorPtr_t | configProjector () const |
Return pointer to config projector if any. More... | |
Constraints_t::iterator | begin () |
Iterator over the constraints. More... | |
Constraints_t::iterator | end () |
Iterator over the constraints. More... | |
virtual bool | isSatisfied (ConfigurationIn_t config) |
Check whether a configuration statisfies the constraint. More... | |
virtual bool | isSatisfied (ConfigurationIn_t config, vector_t &error) |
Check whether a configuration satisfies the constraint. More... | |
Compression of locked degrees of freedom | |
Degrees of freedom related to locked joint are not taken into account in numerical constraint resolution. The following methods Compress or uncompress vectors or matrices by removing lines and columns corresponding to locked degrees of freedom. | |
size_type | numberNonLockedDof () const |
Get number of non-locked degrees of freedom. More... | |
void | compressVector (vectorIn_t normal, vectorOut_t small) const |
Compress Velocity vector by removing locked degrees of freedom. More... | |
void | uncompressVector (vectorIn_t small, vectorOut_t normal) const |
Expand compressed velocity vector. More... | |
void | compressMatrix (matrixIn_t normal, matrixOut_t small, bool rows=true) const |
Compress matrix. More... | |
void | uncompressMatrix (matrixIn_t small, matrixOut_t normal, bool rows=true) const |
Uncompress matrix. More... | |
![]() | |
bool | apply (ConfigurationOut_t configuration) |
Function that applies the constraint. More... | |
const std::string & | name () const |
Get name of constraint. More... | |
virtual | ~Constraint () |
Static Public Member Functions | |
static ConstraintSetPtr_t | create (const DevicePtr_t &robot, const std::string &name) |
Return shared pointer to new object. More... | |
static ConstraintSetPtr_t | createCopy (const ConstraintSetPtr_t &cs) |
Return shared pointer to new object. More... | |
Protected Member Functions | |
ConstraintSet (const DevicePtr_t &robot, const std::string &name) | |
ConstraintSet (const ConstraintSet &other) | |
Copy constructor. More... | |
void | init (const ConstraintSetPtr_t &self) |
Store weak pointer to itself. More... | |
virtual bool | impl_compute (ConfigurationOut_t configuration) |
User defined implementation of the constraint. More... | |
virtual std::ostream & | print (std::ostream &os) const |
![]() | |
Constraint (const std::string &name) | |
Constructor. More... | |
Constraint (const Constraint &constraint) | |
void | init (const ConstraintPtr_t &self) |
Store shared pointer to itself. More... | |
Set of constraints applicable to a robot configuration.
|
protected |
|
protected |
Copy constructor.
|
inline |
Add a constraint to the set.
|
inline |
Iterator over the constraints.
void hpp::core::ConstraintSet::compressMatrix | ( | matrixIn_t | normal, |
matrixOut_t | small, | ||
bool | rows = true |
||
) | const |
Compress matrix.
normal | input matrix |
small | compressed matrix |
rows | whether to compress rows and colums or only columns |
void hpp::core::ConstraintSet::compressVector | ( | vectorIn_t | normal, |
vectorOut_t | small | ||
) | const |
Compress Velocity vector by removing locked degrees of freedom.
normal | input velocity vector |
small | compressed velocity vectors |
ConfigProjectorPtr_t hpp::core::ConstraintSet::configProjector | ( | ) | const |
Return pointer to config projector if any.
|
virtual |
return shared pointer to copy
Implements hpp::core::Constraint.
|
inlinestatic |
Return shared pointer to new object.
References init().
|
inlinestatic |
Return shared pointer to new object.
References init().
|
inline |
Iterator over the constraints.
|
protectedvirtual |
User defined implementation of the constraint.
Implements hpp::core::Constraint.
|
inlineprotected |
Store weak pointer to itself.
References hpp::core::Constraint::init().
Referenced by create(), and createCopy().
|
virtual |
Check whether a configuration statisfies the constraint.
Implements hpp::core::Constraint.
|
virtual |
Check whether a configuration satisfies the constraint.
config | the configuration to check |
error | concatenation of errors of each constraint. |
Implements hpp::core::Constraint.
size_type hpp::core::ConstraintSet::numberNonLockedDof | ( | ) | const |
Get number of non-locked degrees of freedom.
|
protectedvirtual |
Implements hpp::core::Constraint.
void hpp::core::ConstraintSet::uncompressMatrix | ( | matrixIn_t | small, |
matrixOut_t | normal, | ||
bool | rows = true |
||
) | const |
Uncompress matrix.
small | input matrix |
normal | uncompressed matrix |
rows | whether to uncompress rows and colums or only columns |
void hpp::core::ConstraintSet::uncompressVector | ( | vectorIn_t | small, |
vectorOut_t | normal | ||
) | const |
Expand compressed velocity vector.
small | compressed velocity vector without locked degrees of freedom, |
normal | uncompressed velocity vector. |