29#ifndef HPP_MANIPULATION_GRAPH_STATE_HH
30#define HPP_MANIPULATION_GRAPH_STATE_HH
33#include <hpp/constraints/implicit.hh>
34#include <hpp/core/config-projector.hh>
35#include <hpp/core/constraint-set.hh>
44namespace manipulation {
45using constraints::Implicit;
46using constraints::ImplicitPtr_t;
57 typedef std::function<
EdgePtr_t(
const std::string&,
const GraphWkPtr_t&,
58 const StateWkPtr_t&,
const StateWkPtr_t&)>
112 throwIfNotInitialized();
113 return configConstraints_;
125 numericalConstraintsForPath_.push_back(nm);
131 for (
const auto& nc : numericalConstraintsForPath_) proj->add(nc);
132 return !numericalConstraintsForPath_.empty();
137 return numericalConstraintsForPath_;
146 void init(
const StateWkPtr_t& self);
152 std::ostream&
print(std::ostream& os)
const;
171 StateSelectorWkPtr_t selector_;
Define common methods of the graph components.
Definition graph-component.hh:51
Edges_t neighborEdges() const
Get the neighbors.
Definition state.hh:97
virtual void initialize()
bool insertNumericalConstraintsForPath(ConfigProjectorPtr_t &proj) const
Definition state.hh:130
void stateSelector(const StateSelectorWkPtr_t &parent)
Set the StateSelector containing this state.
Definition state.hh:89
StateSelectorWkPtr_t stateSelector() const
Get the parent StateSelector.
Definition state.hh:86
const Neighbors_t & neighbors() const
Get the neighbors.
Definition state.hh:94
void isWaypoint(bool isWaypoint)
Definition state.hh:83
const Edges_t & hiddenNeighbors() const
Definition state.hh:102
std::ostream & print(std::ostream &os) const
Print the object in a stream.
ConstraintSetPtr_t configConstraint() const
Constraint to project onto this state.
Definition state.hh:111
std::function< EdgePtr_t(const std::string &, const GraphWkPtr_t &, const StateWkPtr_t &, const StateWkPtr_t &)> EdgeFactory
Definition state.hh:59
static StatePtr_t create(const std::string &name)
Create a new state.
virtual bool contains(ConfigurationIn_t config) const
std::ostream & dotPrint(std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
Print the object in a stream.
State(const std::string &name)
Constructor.
virtual void addNumericalConstraint(const ImplicitPtr_t &numConstraint)
void init(const StateWkPtr_t &self)
Initialize the object.
EdgePtr_t linkTo(const std::string &name, const StatePtr_t &to, const size_type &w=1, EdgeFactory create=Edge::create)
virtual void addNumericalConstraintForPath(const ImplicitPtr_t &nm)
Add a constraint for paths that lie in this state.
Definition state.hh:123
virtual void populateTooltip(dot::Tooltip &tp) const
Populate DrawingAttributes tooltip.
Weight_t getWeight(const EdgePtr_t &edge)
Get weight of edge starting from this state.
bool isWaypoint() const
Definition state.hh:81
void updateWeight(const EdgePtr_t &edge, const Weight_t &w)
Set weight of edge starting from this state.
const NumericalConstraints_t & numericalConstraintsForPath() const
Get a reference to the NumericalConstraints_t.
Definition state.hh:136
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
hpp::core::NumericalConstraints_t NumericalConstraints_t
Definition fwd.hh:64
shared_ptr< Edge > EdgePtr_t
Definition fwd.hh:49
::hpp::statistics::DiscreteDistribution< EdgePtr_t > Neighbors_t
Definition fwd.hh:59
shared_ptr< State > StatePtr_t
Definition fwd.hh:48
std::vector< EdgePtr_t > Edges_t
Definition fwd.hh:57
::hpp::statistics::DiscreteDistribution< EdgePtr_t >::Weight_t Weight_t
Definition fwd.hh:58
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition fwd.hh:138
constraints::ImplicitPtr_t ImplicitPtr_t
Definition fwd.hh:131
core::ConfigProjectorPtr_t ConfigProjectorPtr_t
Definition fwd.hh:136
core::size_type size_type
Definition fwd.hh:90
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:49