hpp-manipulation 7.0.0
Classes for manipulation planning.
Loading...
Searching...
No Matches
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 std::function< EdgePtr_t(const std::string &, const GraphWkPtr_t &, const StateWkPtr_t &, const StateWkPtr_t &)> EdgeFactory

Public Member Functions

 ~State ()
 Destructor.
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.
void stateSelector (const StateSelectorWkPtr_t &parent)
 Set the StateSelector containing this state.
const Neighbors_tneighbors () const
 Get the neighbors.
Edges_t neighborEdges () const
 Get the neighbors.
const Edges_thiddenNeighbors () const
void updateWeight (const EdgePtr_t &edge, const Weight_t &w)
 Set weight of edge starting from this state.
Weight_t getWeight (const EdgePtr_t &edge)
 Get weight of edge starting from this state.
ConstraintSetPtr_t configConstraint () const
 Constraint to project onto this state.
virtual void addNumericalConstraint (const ImplicitPtr_t &numConstraint)
virtual void addNumericalConstraintForPath (const ImplicitPtr_t &nm)
 Add a constraint for paths that lie in this state.
bool insertNumericalConstraintsForPath (ConfigProjectorPtr_t &proj) const
const NumericalConstraints_tnumericalConstraintsForPath () const
 Get a reference to the NumericalConstraints_t.
std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream.
Public Member Functions inherited from hpp::manipulation::graph::GraphComponent
virtual ~GraphComponent ()
const std::string & name () const
 Get the component name.
const std::size_t & id () const
 Return the component id.
virtual void addNumericalCost (const ImplicitPtr_t &numCost)
 Add a cost function Implicit to the component.
virtual void resetNumericalConstraints ()
 Reset the numerical constraints stored in the component.
bool insertNumericalConstraints (ConfigProjectorPtr_t &proj) const
const NumericalConstraints_tnumericalConstraints () const
 Get a reference to the NumericalConstraints_t.
const NumericalConstraints_tnumericalCosts () const
 Get a reference to the NumericalConstraints_t.
void parentGraph (const GraphWkPtr_t &parent)
 Set the parent graph.
GraphPtr_t parentGraph () const
 Set the parent graph.
virtual void invalidate ()
void solveLevelByLevel (bool solveLevelByLevel)
bool solveLevelByLevel () const

Static Public Member Functions

static StatePtr_t create (const std::string &name)
 Create a new state.

Protected Member Functions

void init (const StateWkPtr_t &self)
 Initialize the object.
 State (const std::string &name)
 Constructor.
std::ostream & print (std::ostream &os) const
 Print the object in a stream.
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip.
virtual void initialize ()
Protected Member Functions inherited from hpp::manipulation::graph::GraphComponent
void init (const GraphComponentWkPtr_t &weak)
 Initialize the component.
 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.
NumericalConstraints_t numericalCosts_
 Stores the numerical costs.
GraphWkPtr_t graph_
 A weak pointer to the parent graph.
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 std::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

◆ addNumericalConstraint()

virtual void hpp::manipulation::graph::State::addNumericalConstraint(const ImplicitPtr_t &numConstraint)
virtual

Add constraint to the state Call the parent implementation.

Exceptions
std::logic_errorif the constraint is parameterizable (contains at least one Equality comparison type).

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

◆ addNumericalConstraintForPath()

virtual void hpp::manipulation::graph::State::addNumericalConstraintForPath(const ImplicitPtr_t &nm)
inlinevirtual

Add a constraint for paths that lie in this state.

◆ 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_tconfig)const
virtual

Check whether the configuration is in this state.

return configConstraint()->isSatisfied (config);
ConstraintSetPtr_t configConstraint() const
Constraint to project onto this state.
Definition state.hh:111
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()

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::DrawingAttributesda = 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(boolisWaypoint)
inline

◆ linkTo()

EdgePtr_t hpp::manipulation::graph::State::linkTo(const std::string &name,
const StatePtr_t &to,
const size_type &w = 1,
EdgeFactorycreate = 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: