hpp::manipulation::graph::WaypointEdge Class Reference

Edge with waypoint. More...

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

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

Public Member Functions

virtual bool build (core::PathPtr_t &path, ConfigurationIn_t q1, ConfigurationIn_t q2, const core::WeighedDistance &d) const
 
virtual bool applyConstraints (ConfigurationIn_t qoffset, ConfigurationOut_t q) const
 
template<class EdgeType >
boost::shared_ptr< EdgeType > waypoint () const
 Return the inner waypoint. More...
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. More...
 
void createWaypoint (const unsigned int depth, const std::string &bname="WaypointEdge")
 Create inner waypoints. More...
 
NodePtr_t node () const
 Get the node in which path after the waypoint is. More...
 
- Public Member Functions inherited from hpp::manipulation::graph::Edge
 ~Edge ()
 Destructor. More...
 
virtual bool applyConstraints (core::NodePtr_t nnear, ConfigurationOut_t q) const
 
NodePtr_t to () const
 Get the destination. More...
 
NodePtr_t from () const
 Get the origin. More...
 
void isInNodeFrom (bool iinf)
 
bool isInNodeFrom () const
 
- Public Member Functions inherited from hpp::manipulation::graph::GraphComponent
const std::string & name () const
 Get the component name. More...
 
void name (const std::string &name)
 Set the component name. More...
 
int id () const
 Return the component id. More...
 
virtual void addNumericalConstraint (const NumericalConstraintPtr_t &numConstraint, const SizeIntervals_t &passiveDofs=SizeIntervals_t())
 Add core::NumericalConstraint to the component. More...
 
virtual void addNumericalConstraint (const DifferentiableFunctionPtr_t &function, const ComparisonTypePtr_t &ineq) HPP_MANIPULATION_DEPRECATED
 Add core::DifferentiableFunction to the component. More...
 
virtual void addLockedJointConstraint (const LockedJointPtr_t &constraint)
 Add core::LockedJoint constraint to 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 LockedJoints_tlockedJoints () const
 Get a reference to the LockedJoints_t. More...
 
void parentGraph (const GraphWkPtr_t &parent)
 Set the parent graph. More...
 

Static Public Member Functions

static WaypointEdgePtr_t create (const GraphWkPtr_t &graph, const NodeWkPtr_t &from, const NodeWkPtr_t &to)
 Create a new WaypointEdge. More...
 
- Static Public Member Functions inherited from hpp::manipulation::graph::Edge
static EdgePtr_t create (const GraphWkPtr_t &graph, const NodeWkPtr_t &from, const NodeWkPtr_t &to)
 Create a new empty Edge. More...
 
- Static Public Member Functions inherited from hpp::manipulation::graph::GraphComponent
static GraphComponentWkPtr_t get (int id)
 Get the component by its ID. More...
 

Protected Member Functions

void init (const EdgeWkPtr_t &weak, const GraphWkPtr_t &graph, const NodeWkPtr_t &from, const NodeWkPtr_t &to)
 Initialization of the object. More...
 
virtual std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
- Protected Member Functions inherited from hpp::manipulation::graph::Edge
void init (const EdgeWkPtr_t &weak, const GraphWkPtr_t &graph, const NodeWkPtr_t &from, const NodeWkPtr_t &to)
 Initialization of the object. More...
 
 Edge ()
 Constructor. More...
 
ConstraintSetPtr_t configConstraint () const
 Constraint to project onto the same leaf as config. More...
 
ConstraintSetPtr_t pathConstraint () const
 Constraint to project a path. More...
 
virtual ConstraintSetPtr_t buildConfigConstraint () const
 
virtual ConstraintSetPtr_t buildPathConstraint () const
 
- Protected Member Functions inherited from hpp::manipulation::graph::GraphComponent
void init (const GraphComponentWkPtr_t &weak)
 Initialize the component. More...
 
 GraphComponent ()
 
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip. More...
 

Additional Inherited Members

- Protected Attributes inherited from hpp::manipulation::graph::GraphComponent
NumericalConstraints_t numericalConstraints_
 Stores the numerical constraints. More...
 
std::vector< SizeIntervals_tpassiveDofs_
 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...
 

Detailed Description

Edge with waypoint.

Waypoints are handled recursively, i.e. class WaypointEdge contains only a Node and an Edge, the second Edge being itself. In this package, the Node in a WaypointEdge is semantically different from other Node because it does not correspond to a state with different manipulation rules. It has the same rules as another Node (either Edge::from() or Edge::to()).

Semantically, a waypoint Node is fully part of the WaypointEdge. When a corresponding path reaches it, no planning is required to know what to do next. To the contrary, when a path reaches Edge::from() or Edge::to(), there may be several possibilities.

Note
Implementation details: let's say, between the two nodes $N_f$ and $N_t$, two waypoints are required: $ N_f \xrightarrow{e_0} n_0 \xrightarrow{e_1} n_1 \xrightarrow{E} N_t$. The outmost WaypointEdg contains:
  • from: $N_f$,
  • to: $N_t$,
  • constraints: those of edge $E$,
  • waypoint: $(E_1, n_1)$.
where $E_1$ is an instance of class WaypointEdge containing:
  • from: $N_f$,
  • to: $n_1$,
  • constraints: those of edge $e_1$,
  • waypoint: $(e_0, n_0)$.

Member Function Documentation

◆ applyConstraints()

virtual bool hpp::manipulation::graph::WaypointEdge::applyConstraints ( ConfigurationIn_t  qoffset,
ConfigurationOut_t  q 
) const
virtual

Reimplemented from hpp::manipulation::graph::Edge.

◆ build()

virtual bool hpp::manipulation::graph::WaypointEdge::build ( core::PathPtr_t &  path,
ConfigurationIn_t  q1,
ConfigurationIn_t  q2,
const core::WeighedDistance &  d 
) const
virtual

Reimplemented from hpp::manipulation::graph::Edge.

◆ create()

static WaypointEdgePtr_t hpp::manipulation::graph::WaypointEdge::create ( const GraphWkPtr_t &  graph,
const NodeWkPtr_t &  from,
const NodeWkPtr_t &  to 
)
static

Create a new WaypointEdge.

◆ createWaypoint()

void hpp::manipulation::graph::WaypointEdge::createWaypoint ( const unsigned int  depth,
const std::string &  bname = "WaypointEdge" 
)

Create inner waypoints.

Parameters
depththe number of waypoints between from() and to() minus 1.
bnamebasename used for naming.
Note
inner edges are named bname + "_e" + pos inner nodes are named bname + "_n" + pos

◆ dotPrint()

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

Print the object in a stream.

Reimplemented from hpp::manipulation::graph::Edge.

◆ init()

void hpp::manipulation::graph::WaypointEdge::init ( const EdgeWkPtr_t &  weak,
const GraphWkPtr_t &  graph,
const NodeWkPtr_t &  from,
const NodeWkPtr_t &  to 
)
protected

Initialization of the object.

◆ node()

NodePtr_t hpp::manipulation::graph::WaypointEdge::node ( ) const
virtual

Get the node in which path after the waypoint is.

Reimplemented from hpp::manipulation::graph::Edge.

◆ print()

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

Print the object in a stream.

Reimplemented from hpp::manipulation::graph::Edge.

◆ waypoint()

template<class EdgeType >
boost::shared_ptr<EdgeType> hpp::manipulation::graph::WaypointEdge::waypoint ( ) const

Return the inner waypoint.

Parameters
EdgeTypeis either Edge or WaypointEdge