hpp::manipulation::graph::StateSelector Class Reference

This class is used to get the state of a configuration. More...

#include <hpp/manipulation/graph/state-selector.hh>

Inheritance diagram for hpp::manipulation::graph::StateSelector:
[legend]
Collaboration diagram for hpp::manipulation::graph::StateSelector:
[legend]

Public Member Functions

virtual ~StateSelector ()
 
StatePtr_t createState (const std::string &name, bool waypoint=false, const int w=0)
 Create an empty state. More...
 
StatePtr_t getState (ConfigurationIn_t config) const
 Returns the state of a configuration. More...
 
StatePtr_t getState (RoadmapNodePtr_t node) const
 Returns the state of a roadmap state. More...
 
States_t getStates () const
 Returns a list of all the states. More...
 
virtual EdgePtr_t chooseEdge (RoadmapNodePtr_t from) const
 Select randomly an outgoing edge of the given state. More...
 
void addNumericalConstraint (const constraints::ImplicitPtr_t &, const segments_t &=segments_t())
 Should never be called. More...
 
void addLockedJointConstraint (const constraints::LockedJoint &)
 Should never be called. More...
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. More...
 
- Public Member Functions inherited from hpp::manipulation::graph::GraphComponent
virtual ~GraphComponent ()
 
const std::string & name () const
 Get the component name. More...
 
const std::size_t & id () const
 Return the component id. More...
 
virtual void addNumericalConstraint (const DifferentiableFunctionPtr_t &function, const ComparisonTypes_t &ineq) HPP_MANIPULATION_DEPRECATED
 Add core::DifferentiableFunction to the component. More...
 
virtual void resetNumericalConstraints ()
 Reset the numerical constraints stored in the component. More...
 
virtual void addLockedJointConstraint (const LockedJointPtr_t &constraint)
 Add core::LockedJoint constraint to the component. More...
 
virtual void resetLockedJoints ()
 Reset the locked joint in the component. More...
 
bool insertNumericalConstraints (ConfigProjectorPtr_t &proj) const
 Insert the numerical constraints in a ConfigProjector. More...
 
bool insertLockedJoints (ConfigProjectorPtr_t &cs) const
 Insert the LockedJoint constraints in a ConstraintSet. More...
 
const NumericalConstraints_tnumericalConstraints () const
 Get a reference to the NumericalConstraints_t. More...
 
const IntervalsContainer_tpassiveDofs () const
 Get a reference to the NumericalConstraints_t. More...
 
const LockedJoints_tlockedJoints () const
 Get a reference to the LockedJoints_t. More...
 
void parentGraph (const GraphWkPtr_t &parent)
 Set the parent graph. More...
 
GraphPtr_t parentGraph () const
 Set the parent graph. More...
 
void setDirty ()
 Declare a component as dirty. More...
 

Static Public Member Functions

static StateSelectorPtr_t create (const std::string &name)
 Create a new StateSelector. More...
 

Protected Types

typedef std::pair< int, StatePtr_tWeighedState_t
 List of the states of one end-effector, ordered by priority. More...
 
typedef std::list< WeighedState_tWeighedStates_t
 

Protected Member Functions

void init (const StateSelectorPtr_t &weak)
 Initialization of the object. More...
 
 StateSelector (const std::string &name)
 Constructor. More...
 
virtual std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
virtual void initialize ()
 
- Protected Member Functions inherited from hpp::manipulation::graph::GraphComponent
void init (const GraphComponentWkPtr_t &weak)
 Initialize the component. More...
 
 GraphComponent (const std::string &name)
 
void throwIfNotInitialized () const
 
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip. More...
 

Protected Attributes

WeighedStates_t orderedStates_
 
States_t waypoints_
 
- Protected Attributes inherited from hpp::manipulation::graph::GraphComponent
NumericalConstraints_t numericalConstraints_
 Stores the numerical constraints. More...
 
IntervalsContainer_t passiveDofs_
 Stores the passive dofs for each numerical constraints. More...
 
LockedJoints_t lockedJoints_
 List of LockedJoint constraints. More...
 
GraphWkPtr_t graph_
 A weak pointer to the parent graph. More...
 
bool isInit_
 

Detailed Description

This class is used to get the state of a configuration.

States have to be ordered because a configuration can be in several states.

Member Typedef Documentation

List of the states of one end-effector, ordered by priority.

Constructor & Destructor Documentation

virtual hpp::manipulation::graph::StateSelector::~StateSelector ( )
inlinevirtual

References create().

hpp::manipulation::graph::StateSelector::StateSelector ( const std::string &  name)
inlineprotected

Constructor.

References print().

Member Function Documentation

void hpp::manipulation::graph::StateSelector::addLockedJointConstraint ( const constraints::LockedJoint )
inline

Should never be called.

References init().

void hpp::manipulation::graph::StateSelector::addNumericalConstraint ( const constraints::ImplicitPtr_t ,
const segments_t = segments_t () 
)
inlinevirtual

Should never be called.

Reimplemented from hpp::manipulation::graph::GraphComponent.

virtual EdgePtr_t hpp::manipulation::graph::StateSelector::chooseEdge ( RoadmapNodePtr_t  from) const
virtual

Select randomly an outgoing edge of the given state.

Reimplemented in hpp::manipulation::graph::GuidedStateSelector.

static StateSelectorPtr_t hpp::manipulation::graph::StateSelector::create ( const std::string &  name)
static

Create a new StateSelector.

StatePtr_t hpp::manipulation::graph::StateSelector::createState ( const std::string &  name,
bool  waypoint = false,
const int  w = 0 
)

Create an empty state.

virtual std::ostream& hpp::manipulation::graph::StateSelector::dotPrint ( std::ostream &  os,
dot::DrawingAttributes  da = dot::DrawingAttributes() 
) const
virtual

Print the object in a stream.

Reimplemented from hpp::manipulation::graph::GraphComponent.

Reimplemented in hpp::manipulation::graph::GuidedStateSelector.

StatePtr_t hpp::manipulation::graph::StateSelector::getState ( ConfigurationIn_t  config) const

Returns the state of a configuration.

StatePtr_t hpp::manipulation::graph::StateSelector::getState ( RoadmapNodePtr_t  node) const

Returns the state of a roadmap state.

States_t hpp::manipulation::graph::StateSelector::getStates ( ) const

Returns a list of all the states.

void hpp::manipulation::graph::StateSelector::init ( const StateSelectorPtr_t weak)
protected

Initialization of the object.

virtual void hpp::manipulation::graph::StateSelector::initialize ( )
inlineprotectedvirtual
virtual std::ostream& hpp::manipulation::graph::StateSelector::print ( std::ostream &  os) const
protectedvirtual

Print the object in a stream.

Reimplemented from hpp::manipulation::graph::GraphComponent.

Reimplemented in hpp::manipulation::graph::GuidedStateSelector.

Member Data Documentation

WeighedStates_t hpp::manipulation::graph::StateSelector::orderedStates_
protected
States_t hpp::manipulation::graph::StateSelector::waypoints_
protected