hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
hpp::core::Constraint Class Referenceabstract

#include <hpp/core/constraint.hh>

Inheritance diagram for hpp::core::Constraint:

Public Member Functions

bool apply (ConfigurationOut_t configuration)
 
const std::string & name () const
 Get name of constraint. More...
 
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 More...
 
virtual ~Constraint ()
 

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...
 
 Constraint (const Constraint &constraint)
 
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()

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
configurationinitial 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
configthe 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
configthe configuration to check
Return values
errorerror 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.

Friends And Related Function Documentation

◆ operator<<

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

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