hpp::core::Constraint Class Referenceabstract

Constraint applicable to a robot configuration. More...

#include <hpp/core/constraint.hh>

Inheritance diagram for hpp::core::Constraint:

Public Member Functions

bool apply (ConfigurationOut_t configuration)
 Function that applies the constraint. More...
 
const std::string & name () const
 Get name of constraint. More...
 
virtual bool isSatisfied (ConfigurationIn_t config)=0
 Check whether a configuration statisfies the constraint. More...
 

Protected Member Functions

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

Friends

std::ostream & operator<< (std::ostream &os, const Constraint &)
 

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()

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

Constructor.

Member Function Documentation

◆ apply()

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

Function that applies the constraint.

Parameters
configurationinitial configuration and result
Returns
true if constraint applied successfully, false if failure.

◆ 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.

Referenced by hpp::core::ConstraintSet::init(), and hpp::core::ConfigProjector::init().

◆ isSatisfied()

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

Check whether a configuration statisfies the constraint.

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

◆ name()

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

Get name of constraint.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Constraint constraint 
)
friend