hpp-constraints: hpp::constraints::Implicit Class Reference

hpp-constraints 9.0.2 Definition of basic geometric constraints for motion planning

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

`#include <hpp/constraints/implicit.hh>`

Inheritance diagram for hpp::constraints::Implicit:
[legend]

## Public Member Functions
bool | operator== (const Implicit &other) const
| Operator equality.
Implicit & | operator= (const Implicit &other)
| Operator assignation.
virtual ImplicitPtr_t | copy () const
| Copy object and return shared pointer to copy.
virtual | ~Implicit ()
const ComparisonTypes_t & | comparisonType () const
| Return the ComparisonType.
void | comparisonType (const ComparisonTypes_t &comp)
| Set the comparison type.
const segments_t & | activeRows () const
bool | checkAllRowsActive () const
| Check if all rows are active (no inactive rows)
const Eigen::RowBlockIndices & | equalityIndices () const
| Get indices of constraint coordinates that are equality.
void | setInactiveRowsToZero (vectorOut_t error) const
DifferentiableFunction & | function () const
| Return a reference to function .
const DifferentiableFunctionPtr_t & | functionPtr () const
| Return a reference to function .
virtual std::pair< JointConstPtr_t, JointConstPtr_t > | doesConstrainRelPoseBetween (DeviceConstPtr_t robot) const
Right hand side
void | rightHandSideFromConfig (ConfigurationIn_t config, LiegroupElementRef rhs)
bool | checkRightHandSide (LiegroupElementConstRef rhs) const
size_type | parameterSize () const
size_type | rightHandSideSize () const
void | rightHandSideFunction (const DifferentiableFunctionPtr_t &rhsF)
const DifferentiableFunctionPtr_t & | rightHandSideFunction () const
vectorIn_t | rightHandSideAt (const value_type &s)

## Static Public Member Functions
static ImplicitPtr_t | create (const DifferentiableFunctionPtr_t &func, ComparisonTypes_t comp, std::vector< bool > mask=std::vector< bool >())
static ImplicitPtr_t | createCopy (const ImplicitPtr_t &other)
| Create a copy and return shared pointer.

## Protected Member Functions
| Implicit (const DifferentiableFunctionPtr_t &function, ComparisonTypes_t comp, std::vector< bool > mask)
| Implicit (const Implicit &other)
| Copy constructor.
virtual bool | isEqual (const Implicit &other, bool swapAndTest) const
void | init (const ImplicitWkPtr_t &weak)
| Implicit ()

## Friends
class | ImplicitConstraintSet

## Detailed Description

This class represents a parameterizable numerical constraint that compares the output of a function to a right hand side Lie group element.

Definition

- The function takes input in a configuration space and output in a Lie group ,
- the dimensions of and of its tangent space are respectively .
- The comparison is represented by a vector of dimension with values in enum hpp::constraints::ComparisonType = { , , , }.
- The right hand side is Lie group element of dimension .

Error

A configuration is said to satisfy the constraint for a given right hand side if and only if the error as computed below is smaller in norm than a given threshold.

Let

for each component ,

- if is , ,
- if is , ,
- if is , ,
- if is , .

Mask

A mask is a vector of Boolean values of size . Values set to false means that the corresponding component of the error defined above is not taken into account to determine whether the constraint is satisfied. The active rows of the constraint may be accessed via method activeRows.

Parameterizable right hand side

Lines with comparator in the above definition of the error need a parameter, while lines with comparators , , or do not. As a consequence, the right hand side of the constraint is defined by a vector of parameters of size the number of occurences in vector . The right hand side is then defined as in the following example:

To retrieve the size of vector , call method Implicit::parameterSize (). To set and get the right hand side value, use method Implicit::rightHandSide.

Time varying right hand side

The right hand side of the constraint may depend on time, for instance if the constraint is associated to a trajectory following task. In this case, the right hand side is a function from to .

## Constructor & Destructor Documentation

## ◆ ~Implicit()

virtual hpp::constraints::Implicit::~Implicit | ( |  | ) |
| inline virtual

## ◆ Implicit() [1/3]

hpp::constraints::Implicit::Implicit | ( | const DifferentiableFunctionPtr_t & | function,
|  | ComparisonTypes_t | comp,
|  | std::vector< bool > | mask )
| protected

Constructor

Parameters

  function | the differentiable function
  comp | vector of comparison .
  mask | mask defining which components of the error are taken into account to determine whether the constraint is satisfied. \precond sizes of comp and of mask should be equal to size of tangent space to function output space .

## ◆ Implicit() [2/3]

hpp::constraints::Implicit::Implicit | ( | const Implicit & | other | ) |
| protected

Copy constructor.

## ◆ Implicit() [3/3]

hpp::constraints::Implicit::Implicit | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ activeRows()

const segments_t & hpp::constraints::Implicit::activeRows | ( |  | ) | const
| inline

Return the active rows taken into account to determine whether the constraint is satisfied

## ◆ checkAllRowsActive()

bool hpp::constraints::Implicit::checkAllRowsActive | ( |  | ) | const
| inline

Check if all rows are active (no inactive rows)

## ◆ checkRightHandSide()

bool hpp::constraints::Implicit::checkRightHandSide | ( | LiegroupElementConstRef | rhs | ) | const

Check right hand side with regard to comparison types

Parameters

  rhs | right hand side,

Returns
  true if right hand side is correct

This method checks that elements of the right hand side log corresponding to comparison types different from Equality are equal to 0.

## ◆ comparisonType() [1/2]

const ComparisonTypes_t & hpp::constraints::Implicit::comparisonType | ( |  | ) | const

Return the ComparisonType.

## ◆ comparisonType() [2/2]

void hpp::constraints::Implicit::comparisonType | ( | const ComparisonTypes_t & | comp | ) |

Set the comparison type.

## ◆ copy()

virtual ImplicitPtr_t hpp::constraints::Implicit::copy | ( |  | ) | const
| virtual

Copy object and return shared pointer to copy.

Reimplemented in hpp::constraints::Explicit, hpp::constraints::explicit_::ConvexShapeContact, hpp::constraints::explicit_::RelativePose, and hpp::constraints::LockedJoint.

## ◆ create()

static ImplicitPtr_t hpp::constraints::Implicit::create | ( | const DifferentiableFunctionPtr_t & | func,
|  | ComparisonTypes_t | comp,
|  | std::vector< bool > | mask = std::vector< bool >() )
| static

Create a shared pointer to a new instance.

See also
  constructors

## ◆ createCopy()

static ImplicitPtr_t hpp::constraints::Implicit::createCopy | ( | const ImplicitPtr_t & | other | ) |
| static

Create a copy and return shared pointer.

## ◆ doesConstrainRelPoseBetween()

virtual std::pair< JointConstPtr_t, JointConstPtr_t > hpp::constraints::Implicit::doesConstrainRelPoseBetween | ( | DeviceConstPtr_t | robot | ) | const
| virtual

Get pair of joints whose relative pose is fully constrained

If the function value depends on the relative pose between j1 and j2 and if the relative pose between j1 and j2 is fully constrained because of Implicit constraint (relative transformation may still differ from one path to another), return these two joints.

Parameters

  robot | the device that this constraint is applied to

Returns
  the pair of joints constrained, in order of increasing joint index, or a pair of empty shared pointers

Note
  absolute pose is considered relative pose with respect to "universe". "universe" is returned as a nullpointer as the first element of the pair, if applicable.

Reimplemented in hpp::constraints::LockedJoint.

## ◆ equalityIndices()

const Eigen::RowBlockIndices & hpp::constraints::Implicit::equalityIndices | ( |  | ) | const
| inline

Get indices of constraint coordinates that are equality.

## ◆ function()

DifferentiableFunction & hpp::constraints::Implicit::function | ( |  | ) | const
| inline

Return a reference to function .

## ◆ functionPtr()

const DifferentiableFunctionPtr_t & hpp::constraints::Implicit::functionPtr | ( |  | ) | const
| inline

Return a reference to function .

## ◆ init()

void hpp::constraints::Implicit::init | ( | const ImplicitWkPtr_t & | weak | ) |
| inline protected

## ◆ isEqual()

virtual bool hpp::constraints::Implicit::isEqual | ( | const Implicit & | other,
|  | bool | swapAndTest ) const
| protected virtual

Test equality with other instance

Parameters

  other | object to copy
  swapAndTest | whether we should also check other == this

Reimplemented in hpp::constraints::Explicit, and hpp::constraints::LockedJoint.

## ◆ operator=()

Implicit & hpp::constraints::Implicit::operator= | ( | const Implicit & | other | ) |
| inline

Operator assignation.

## ◆ operator==()

bool hpp::constraints::Implicit::operator== | ( | const Implicit & | other | ) | const

Operator equality.

## ◆ parameterSize()

size_type hpp::constraints::Implicit::parameterSize | ( |  | ) | const

Get size of parameter defining the right hand side of the constraint

See class documentation for details.

## ◆ rightHandSideAt()

vectorIn_t hpp::constraints::Implicit::rightHandSideAt | ( | const value_type & | s | ) |

Evaluate and set right hand side at given time

Parameters

  s | time

## ◆ rightHandSideFromConfig()

void hpp::constraints::Implicit::rightHandSideFromConfig | ( | ConfigurationIn_t | config,
|  | LiegroupElementRef | rhs )

Computes the right hand side from a configuration

in such a way that the configuration satisfies the numerical constraints

Parameters

  config | the input configuration.

Return values

  rhs | right hand side as a Lie group element. \precond rhs should be initialized with the right LiegroupSpace (ie the output space of the function).

Warning
  Only values of the right hand side corresponding to "equality constraints" are set. As a result, the input configuration may not satisfy the other constraints.

## ◆ rightHandSideFunction() [1/2]

const DifferentiableFunctionPtr_t & hpp::constraints::Implicit::rightHandSideFunction | ( |  | ) | const
| inline

Get time-varying right hand side

Returns
  the mapping from to output space of defining the variation along time of the right hand side.

## ◆ rightHandSideFunction() [2/2]

void hpp::constraints::Implicit::rightHandSideFunction | ( | const DifferentiableFunctionPtr_t & | rhsF | ) |

Set time-varying right hand side

Parameters

  rhsF | Mapping from to output space of defining the variation along time of the right hand side.

## ◆ rightHandSideSize()

size_type hpp::constraints::Implicit::rightHandSideSize | ( |  | ) | const

Get size of right hand side of the constraint

This is the dimension (nq) of the output space of the function

## ◆ setInactiveRowsToZero()

void hpp::constraints::Implicit::setInactiveRowsToZero | ( | vectorOut_t | error | ) | const

Set inactive components of error to 0

Return values

  error | error vector computed by substracting a right hand side to the output to the value of the function.

## Friends And Related Symbol Documentation

## ◆ ImplicitConstraintSet

friend class ImplicitConstraintSet
| friend

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

- include/hpp/constraints/implicit.hh