hpp-core: hpp::core::Constraint Class Reference

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

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
hpp::core::Constraint Class Referenceabstract
Constraints

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

Inheritance diagram for hpp::core::Constraint:
[legend]

## Public Member Functions
bool | apply (ConfigurationOut_t configuration)
const std::string & | name () const
| Get name of constraint.
virtual bool | isSatisfied (ConfigurationIn_t config)=0
virtual bool | isSatisfied (ConfigurationIn_t config, vector_t &error)=0
virtual ConstraintPtr_t | copy () const =0
| return shared pointer to copy
virtual | ~Constraint ()

## Protected Member Functions
virtual bool | impl_compute (ConfigurationOut_t configuration)=0
| User defined implementation of the constraint.
| Constraint (const std::string &name)
| Constructor.
| Constraint (const Constraint &constraint)
void | init (const ConstraintPtr_t &self)
| Store shared pointer to itself.

## Detailed Description

Constraint applicable to a robot configuration

Constraint::apply takes as input a configuration and changes it into a configuration satisfying the constraint.

User should define impl_compute in derived classes.

## Constructor & Destructor Documentation

## ◆ ~Constraint()

virtual hpp::core::Constraint::~Constraint | ( |  | ) |
| inlinevirtual

## ◆ Constraint() [1/2]

hpp::core::Constraint::Constraint | ( | const std::string & | name | ) |
| inlineprotected

Constructor.

## ◆ Constraint() [2/2]

hpp::core::Constraint::Constraint | ( | const Constraint & | constraint | ) |
| inlineprotected

## Member Function Documentation

## ◆ apply()

bool hpp::core::Constraint::apply | ( | ConfigurationOut_t | configuration | ) |

Function that applies the constraint

Parameters

  configuration | initial configuration and result

Returns
  true if constraint applied successfully, false if failure.

## ◆ copy()

virtual ConstraintPtr_t hpp::core::Constraint::copy | ( |  | ) | const
| pure virtual

return shared pointer to copy

Implemented in hpp::core::ConfigProjector, and hpp::core::ConstraintSet.

## ◆ impl_compute()

virtual bool hpp::core::Constraint::impl_compute | ( | ConfigurationOut_t | configuration | ) |
| protectedpure virtual

User defined implementation of the constraint.

Implemented in hpp::core::ConfigProjector, and hpp::core::ConstraintSet.

## ◆ init()

void hpp::core::Constraint::init | ( | const ConstraintPtr_t & | self | ) |
| inlineprotected

Store shared pointer to itself.

## ◆ isSatisfied() [1/2]

virtual bool hpp::core::Constraint::isSatisfied | ( | ConfigurationIn_t | config | ) |
| pure virtual

Check whether a configuration statisfies the constraint.

Parameters

  config | the configuration to check

Implemented in hpp::core::ConfigProjector, and hpp::core::ConstraintSet.

## ◆ isSatisfied() [2/2]

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

Check whether a configuration statisfies the constraint.

Parameters

  config | the configuration to check

Return values

  error | error expressed as a vector. Size and content depends on implementations

Implemented in hpp::core::ConfigProjector, and hpp::core::ConstraintSet.

## ◆ name()

const std::string & hpp::core::Constraint::name | ( |  | ) | const
| inline

Get name of constraint.

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

- include/hpp/core/constraint.hh