hpp::core::Constraint Class Reference

Constraint applicable to a robot configuration. More...

#include <hpp/core/constraint.hh>

Inheritance diagram for hpp::core::Constraint:

List of all members.

Public Member Functions

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

Protected Member Functions

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

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

hpp::core::Constraint::Constraint ( const std::string &  name) [inline, protected]

Constructor.


Member Function Documentation

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.
virtual bool hpp::core::Constraint::impl_compute ( ConfigurationOut_t  configuration) [protected, pure virtual]

User defined implementation of the constraint.

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

void hpp::core::Constraint::init ( const ConstraintPtr_t self) [inline, protected]

Store shared pointer to itself.

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

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.

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

Get name of constraint.


Friends And Related Function Documentation

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