hpp-core: hpp::core::ConstraintSet Class Reference

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hpp::core::ConstraintSet Class Reference
Constraints

`#include <hpp/core/constraint-set.hh>`

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

## Public Member Functions
virtual ConstraintPtr_t | copy () const
| return shared pointer to copy
void | addConstraint (const ConstraintPtr_t &constraint)
| Add a constraint to the set.
ConfigProjectorPtr_t | configProjector () const
| Return pointer to config projector if any.
Constraints_t::iterator | begin ()
| Iterator over the constraints.
Constraints_t::iterator | end ()
| Iterator over the constraints.
virtual bool | isSatisfied (ConfigurationIn_t config)
| Check whether a configuration statisfies the constraint.
virtual bool | isSatisfied (ConfigurationIn_t config, vector_t &error)
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.
void | compressVector (vectorIn_t normal, vectorOut_t small) const
void | uncompressVector (vectorIn_t small, vectorOut_t normal) const
void | compressMatrix (matrixIn_t normal, matrixOut_t small, bool rows=true) const
void | uncompressMatrix (matrixIn_t small, matrixOut_t normal, bool rows=true) const
Public Member Functions inherited from hpp::core::Constraint
bool | apply (ConfigurationOut_t configuration)
const std::string & | name () const
| Get name of constraint.
virtual | ~Constraint ()

## Static Public Member Functions
static ConstraintSetPtr_t | create (const DevicePtr_t &robot, const std::string &name)
| Return shared pointer to new object.
static ConstraintSetPtr_t | createCopy (const ConstraintSetPtr_t &cs)
| Return shared pointer to new object.

## Protected Member Functions
| ConstraintSet (const DevicePtr_t &robot, const std::string &name)
| ConstraintSet (const ConstraintSet &other)
| Copy constructor.
void | init (const ConstraintSetPtr_t &self)
| Store weak pointer to itself.
virtual bool | impl_compute (ConfigurationOut_t configuration)
| User defined implementation of the constraint.
virtual std::ostream & | print (std::ostream &os) const
| ConstraintSet ()
| Constructor for serialization only.
Protected Member Functions inherited from hpp::core::Constraint
| Constraint (const std::string &name)
| Constructor.
| Constraint (const Constraint &constraint)
void | init (const ConstraintPtr_t &self)
| Store shared pointer to itself.

## Detailed Description

Set of constraints applicable to a robot configuration

Warning
  If the set is to contain a ConfigProjector and several LockedJoint instances, the configProjector should be inserted first since following numerical projections might affect locked degrees of freedom.

## Constructor & Destructor Documentation

## ◆ ConstraintSet() [1/3]

hpp::core::ConstraintSet::ConstraintSet | ( | const DevicePtr_t & | robot,
|  | const std::string & | name
| ) |  |
| protected

## ◆ ConstraintSet() [2/3]

hpp::core::ConstraintSet::ConstraintSet | ( | const ConstraintSet & | other | ) |
| protected

Copy constructor.

## ◆ ConstraintSet() [3/3]

hpp::core::ConstraintSet::ConstraintSet | ( |  | ) |
| inlineprotected

Constructor for serialization only.

## Member Function Documentation

## ◆ addConstraint()

void hpp::core::ConstraintSet::addConstraint | ( | const ConstraintPtr_t & | constraint | ) |

Add a constraint to the set.

## ◆ begin()

Constraints_t::iterator hpp::core::ConstraintSet::begin | ( |  | ) |
| inline

Iterator over the constraints.

## ◆ compressMatrix()

void hpp::core::ConstraintSet::compressMatrix | ( | matrixIn_t | normal,
|  | matrixOut_t | small,
|  | bool | rows = `true`
| ) |  | const

Compress matrix

Parameters

  normal | input matrix

Return values

  small | compressed matrix

Parameters

  rows | whether to compress rows and colums or only columns

## ◆ compressVector()

void hpp::core::ConstraintSet::compressVector | ( | vectorIn_t | normal,
|  | vectorOut_t | small
| ) |  | const

Compress Velocity vector by removing locked degrees of freedom

Parameters

  normal | input velocity vector

Return values

  small | compressed velocity vectors

## ◆ configProjector()

ConfigProjectorPtr_t hpp::core::ConstraintSet::configProjector | ( |  | ) | const

Return pointer to config projector if any.

## ◆ copy()

virtual ConstraintPtr_t hpp::core::ConstraintSet::copy | ( |  | ) | const
| virtual

return shared pointer to copy

Implements hpp::core::Constraint.

## ◆ create()

static ConstraintSetPtr_t hpp::core::ConstraintSet::create | ( | const DevicePtr_t & | robot,
|  | const std::string & | name
| ) |  |
| inlinestatic

Return shared pointer to new object.

## ◆ createCopy()

static ConstraintSetPtr_t hpp::core::ConstraintSet::createCopy | ( | const ConstraintSetPtr_t & | cs | ) |
| inlinestatic

Return shared pointer to new object.

## ◆ end()

Constraints_t::iterator hpp::core::ConstraintSet::end | ( |  | ) |
| inline

Iterator over the constraints.

## ◆ impl_compute()

virtual bool hpp::core::ConstraintSet::impl_compute | ( | ConfigurationOut_t | configuration | ) |
| protectedvirtual

User defined implementation of the constraint.

Implements hpp::core::Constraint.

## ◆ init()

void hpp::core::ConstraintSet::init | ( | const ConstraintSetPtr_t & | self | ) |
| inlineprotected

Store weak pointer to itself.

## ◆ isSatisfied() [1/2]

virtual bool hpp::core::ConstraintSet::isSatisfied | ( | ConfigurationIn_t | config | ) |
| virtual

Check whether a configuration statisfies the constraint.

Implements hpp::core::Constraint.

## ◆ isSatisfied() [2/2]

virtual bool hpp::core::ConstraintSet::isSatisfied | ( | ConfigurationIn_t | config,
|  | vector_t & | error
| ) |  |
| virtual

Check whether a configuration satisfies the constraint.

Parameters

  config | the configuration to check

Return values

  error | concatenation of errors of each constraint.

Implements hpp::core::Constraint.

## ◆ numberNonLockedDof()

size_type hpp::core::ConstraintSet::numberNonLockedDof | ( |  | ) | const

Get number of non-locked degrees of freedom.

## ◆ print()

virtual std::ostream & hpp::core::ConstraintSet::print | ( | std::ostream & | os | ) | const
| protectedvirtual

Implements hpp::core::Constraint.

## ◆ uncompressMatrix()

void hpp::core::ConstraintSet::uncompressMatrix | ( | matrixIn_t | small,
|  | matrixOut_t | normal,
|  | bool | rows = `true`
| ) |  | const

Uncompress matrix

Parameters

  small | input matrix

Return values

  normal | uncompressed matrix

Parameters

  rows | whether to uncompress rows and colums or only columns

## ◆ uncompressVector()

void hpp::core::ConstraintSet::uncompressVector | ( | vectorIn_t | small,
|  | vectorOut_t | normal
| ) |  | const

Expand compressed velocity vector

Parameters

  small | compressed velocity vector without locked degrees of freedom,

Return values

  normal | uncompressed velocity vector.

Note
  locked degree of freedom are not set. They should be initialized to zero.

The documentation for this class was generated from the following file:

- include/hpp/core/constraint-set.hh