hpp-manipulation  4.9.0
Classes for manipulation planning.
hpp::manipulation::graph::State Class Reference

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

Inheritance diagram for hpp::manipulation::graph::State:
Collaboration diagram for hpp::manipulation::graph::State:

Public Types

typedef boost::function< EdgePtr_t(const std::string &, const GraphWkPtr_t &, const StateWkPtr_t &, const StateWkPtr_t &) > EdgeFactory
 

Public Member Functions

 ~State ()
 Destructor. More...
 
EdgePtr_t linkTo (const std::string &name, const StatePtr_t &to, const size_type &w=1, EdgeFactory create=Edge::create)
 
virtual bool contains (ConfigurationIn_t config) const
 
bool isWaypoint () const
 
void isWaypoint (bool isWaypoint)
 
StateSelectorWkPtr_t stateSelector () const
 Get the parent StateSelector. More...
 
void stateSelector (const StateSelectorWkPtr_t &parent)
 Set the StateSelector containing this state. More...
 
const Neighbors_tneighbors () const
 Get the neighbors. More...
 
Edges_t neighborEdges () const
 Get the neighbors. More...
 
const Edges_thiddenNeighbors () const
 
void updateWeight (const EdgePtr_t &edge, const Weight_t &w)
 Set weight of edge starting from this state. More...
 
Weight_t getWeight (const EdgePtr_t &edge)
 Get weight of edge starting from this state. More...
 
ConstraintSetPtr_t configConstraint () const
 Constraint to project onto this state. More...
 
virtual void addNumericalConstraintForPath (const ImplicitPtr_t &nm, const segments_t &passiveDofs=segments_t())
 Add constraints::Implicit to the component. More...
 
bool insertNumericalConstraintsForPath (ConfigProjectorPtr_t &proj) const
 
const NumericalConstraints_tnumericalConstraintsForPath () const
 Get a reference to the NumericalConstraints_t. More...
 
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 ImplicitPtr_t &numConstraint, const segments_t &passiveDofs=segments_t())
 
virtual void addNumericalCost (const ImplicitPtr_t &numCost)
 Add a cost function Implicit to the component. More...
 
virtual void resetNumericalConstraints ()
 Reset the numerical constraints stored in the component. More...
 
virtual void addLockedJointConstraint (const LockedJointPtr_t &constraint) HPP_MANIPULATION_DEPRECATED
 
virtual void resetLockedJoints () HPP_MANIPULATION_DEPRECATED
 Reset the locked joint in the component. More...
 
bool insertNumericalConstraints (ConfigProjectorPtr_t &proj) const
 
bool insertLockedJoints (ConfigProjectorPtr_t &cs) const HPP_MANIPULATION_DEPRECATED
 
const NumericalConstraints_tnumericalConstraints () const
 Get a reference to the NumericalConstraints_t. More...
 
const NumericalConstraints_tnumericalCosts () 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 HPP_MANIPULATION_DEPRECATED
 
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 StatePtr_t create (const std::string &name)
 Create a new state. More...
 

Protected Member Functions

void init (const StateWkPtr_t &self)
 Initialize the object. More...
 
 State (const std::string &name)
 Constructor. More...
 
std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip. 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
 

Additional Inherited Members

- 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...
 
NumericalConstraints_t numericalCosts_
 Stores the numerical costs. More...
 
const LockedJoints_t lockedJoints_
 List of LockedJoint constraints: More...
 
GraphWkPtr_t graph_
 A weak pointer to the parent graph. More...
 
bool isInit_
 

Detailed Description

State of an end-effector.

States of the graph of constraints. There is one graph for each end-effector.

Member Typedef Documentation

◆ EdgeFactory

typedef boost::function< EdgePtr_t (const std::string&, const GraphWkPtr_t&, const StateWkPtr_t&, const StateWkPtr_t&) > hpp::manipulation::graph::State::EdgeFactory

Constructor & Destructor Documentation

◆ ~State()

hpp::manipulation::graph::State::~State ( )

Destructor.

◆ State()

hpp::manipulation::graph::State::State ( const std::string &  name)
protected

Constructor.

Member Function Documentation

◆ addNumericalConstraintForPath()

virtual void hpp::manipulation::graph::State::addNumericalConstraintForPath ( const ImplicitPtr_t nm,
const segments_t passiveDofs = segments_t () 
)
inlinevirtual

Add constraints::Implicit to the component.

◆ configConstraint()

ConstraintSetPtr_t hpp::manipulation::graph::State::configConstraint ( ) const
inline

Constraint to project onto this state.

◆ contains()

virtual bool hpp::manipulation::graph::State::contains ( ConfigurationIn_t  config) const
virtual

Check whether the configuration is in this state.

return configConstraint()->isSatisfied (config);
Note
You should not use this method to know in which states a configuration is. This only checks if the configuration satisfies the constraints. Instead, use the class StateSelector.

◆ create()

static StatePtr_t hpp::manipulation::graph::State::create ( const std::string &  name)
static

Create a new state.

◆ dotPrint()

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

Print the object in a stream.

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

◆ getWeight()

Weight_t hpp::manipulation::graph::State::getWeight ( const EdgePtr_t edge)

Get weight of edge starting from this state.

◆ hiddenNeighbors()

const Edges_t& hpp::manipulation::graph::State::hiddenNeighbors ( ) const
inline

Get the hidden neighbors It is a vector of transitions outgoing from this state and that are included in a waypoint edge.

◆ init()

void hpp::manipulation::graph::State::init ( const StateWkPtr_t &  self)
protected

Initialize the object.

◆ initialize()

virtual void hpp::manipulation::graph::State::initialize ( )
protectedvirtual

◆ insertNumericalConstraintsForPath()

bool hpp::manipulation::graph::State::insertNumericalConstraintsForPath ( ConfigProjectorPtr_t proj) const
inline

Insert the numerical constraints in a ConfigProjector

Returns
true is at least one ImplicitPtr_t was inserted.

◆ isWaypoint() [1/2]

bool hpp::manipulation::graph::State::isWaypoint ( ) const
inline

◆ isWaypoint() [2/2]

void hpp::manipulation::graph::State::isWaypoint ( bool  isWaypoint)
inline

◆ linkTo()

EdgePtr_t hpp::manipulation::graph::State::linkTo ( const std::string &  name,
const StatePtr_t to,
const size_type w = 1,
EdgeFactory  create = Edge::create 
)

Create a link from this state to the given state.

Parameters
wif strictly negative, the edge is not included in the neighbor list. Otherwise, it is included with Weight_t w

◆ neighborEdges()

Edges_t hpp::manipulation::graph::State::neighborEdges ( ) const
inline

Get the neighbors.

◆ neighbors()

const Neighbors_t& hpp::manipulation::graph::State::neighbors ( ) const
inline

Get the neighbors.

◆ numericalConstraintsForPath()

const NumericalConstraints_t& hpp::manipulation::graph::State::numericalConstraintsForPath ( ) const
inline

Get a reference to the NumericalConstraints_t.

◆ populateTooltip()

virtual void hpp::manipulation::graph::State::populateTooltip ( dot::Tooltip tp) const
protectedvirtual

Populate DrawingAttributes tooltip.

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

◆ print()

std::ostream& hpp::manipulation::graph::State::print ( std::ostream &  os) const
protectedvirtual

Print the object in a stream.

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

◆ stateSelector() [1/2]

StateSelectorWkPtr_t hpp::manipulation::graph::State::stateSelector ( ) const
inline

Get the parent StateSelector.

◆ stateSelector() [2/2]

void hpp::manipulation::graph::State::stateSelector ( const StateSelectorWkPtr_t &  parent)
inline

Set the StateSelector containing this state.

◆ updateWeight()

void hpp::manipulation::graph::State::updateWeight ( const EdgePtr_t edge,
const Weight_t w 
)

Set weight of edge starting from this state.


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