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

#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 canConnect (ConfigurationIn_t q1, ConfigurationIn_t q2) const
 
virtual bool build (core::PathPtr_t &path, ConfigurationIn_t q1, ConfigurationIn_t q2) const
 
virtual bool applyConstraints (ConfigurationIn_t qStart, ConfigurationOut_t q) const HPP_MANIPULATION_DEPRECATED
 
virtual bool generateTargetConfig (ConfigurationIn_t qStart, ConfigurationOut_t q) const
 
const EdgePtr_twaypoint (const std::size_t index) const
 Return the index-th edge. More...
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. More...
 
void nbWaypoints (const size_type number)
 Set the number of waypoints. More...
 
std::size_t nbWaypoints () const
 
void setWaypoint (const std::size_t index, const EdgePtr_t wEdge, const StatePtr_t wTo)
 
- Public Member Functions inherited from hpp::manipulation::graph::Edge
virtual ~Edge ()
 Destructor. More...
 
virtual bool applyConstraints (core::NodePtr_t nStart, ConfigurationOut_t q) const HPP_MANIPULATION_DEPRECATED
 
virtual bool generateTargetConfig (core::NodePtr_t nStart, ConfigurationOut_t q) const
 
StatePtr_t stateTo () const
 Get the destination. More...
 
StatePtr_t stateFrom () const
 Get the origin. More...
 
StatePtr_t state () const
 Get the state in which path is. More...
 
void state (StatePtr_t state)
 
const core::SteeringMethodPtr_tsteeringMethod () const
 Get steering method associated to the edge. More...
 
const core::PathValidationPtr_tpathValidation () const
 Get path validation associated to the edge. More...
 
const RelativeMotion::matrix_typerelativeMotion () const
 
void relativeMotion (const RelativeMotion::matrix_type &m)
 Update the relative motion matrix. More...
 
void securityMarginForPair (const size_type &row, const size_type &col, const value_type &margin)
 
const matrix_tsecurityMargins () const
 Accessor to the security margin. More...
 
virtual bool direction (const core::PathPtr_t &path) const
 
virtual bool intersectionConstraint (const EdgePtr_t &other, ConfigProjectorPtr_t projector) const
 
ConstraintSetPtr_t configConstraint () const HPP_MANIPULATION_DEPRECATED
 
ConstraintSetPtr_t targetConstraint () const
 Constraint of the destination state and of the path. More...
 
void setShort (bool isShort)
 
bool isShort () const
 
ConstraintSetPtr_t pathConstraint () const
 
- 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 WaypointEdgePtr_t create (const std::string &name, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_t &to)
 Create a new WaypointEdge. More...
 
- Static Public Member Functions inherited from hpp::manipulation::graph::Edge
static EdgePtr_t create (const std::string &name, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_t &to)
 Create a new empty Edge. More...
 

Protected Member Functions

 WaypointEdge (const std::string &name)
 
void init (const WaypointEdgeWkPtr_t &weak, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_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 StateWkPtr_t &from, const StateWkPtr_t &to)
 Initialization of the object. More...
 
 Edge (const std::string &name)
 Constructor. More...
 
virtual ConstraintSetPtr_t buildConfigConstraint () HPP_MANIPULATION_DEPRECATED
 
virtual ConstraintSetPtr_t buildTargetConstraint ()
 Build path and target state constraint set. More...
 
virtual ConstraintSetPtr_t buildPathConstraint ()
 Build path constraints. 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...
 

Additional Inherited Members

- Public Types inherited from hpp::manipulation::graph::Edge
typedef core::RelativeMotion RelativeMotion
 
- Protected Attributes inherited from hpp::manipulation::graph::Edge
bool isShort_
 
- 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

Edge with intermediate waypoint states.

This class implements a transition from one state to another state with intermediate states in-between. This feature is particularly interesting when manipulating objects. Between a state where a gripper does not grasp an object and a state where the same gripper grasps the object, it is useful to add an intermediate state where the gripper is close to the object.

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

Semantically, a waypoint State 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::stateFrom() or Edge::stateTo(), there may be several possibilities.

Note
Implementation details: let's say, between the two states $N_f$ and $N_t$, two waypoints are required: $ N_f \xrightarrow{e_0} n_0 \xrightarrow{e_1} n_1 \xrightarrow{e_2} N_t$. The WaypointEdge contains:
  • from: $N_f$,
  • to: $N_t$,
  • states: $(n_0, n_1)$
  • transitions: $(e_0, e_1, e_2)$
  • constraints: any calls to the constraints throw,

Constructor & Destructor Documentation

◆ WaypointEdge()

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

Member Function Documentation

◆ applyConstraints()

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

Generate a reachable configuration in the target state

Parameters
qStartnode containing the configuration defining the right hand side of the edge path constraint,
[in,out]qinput configuration used to initialize the numerical solver and output configuration lying in the target state and reachable along the edge from nnear. deprecated Used generateTargetConfig instead.

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
virtual

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

◆ canConnect()

virtual bool hpp::manipulation::graph::WaypointEdge::canConnect ( ConfigurationIn_t  q1,
ConfigurationIn_t  q2 
) const
virtual

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

◆ create()

static WaypointEdgePtr_t hpp::manipulation::graph::WaypointEdge::create ( const std::string &  name,
const GraphWkPtr_t &  graph,
const StateWkPtr_t &  from,
const StateWkPtr_t &  to 
)
static

Create a new WaypointEdge.

◆ 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.

◆ generateTargetConfig()

virtual bool hpp::manipulation::graph::WaypointEdge::generateTargetConfig ( ConfigurationIn_t  qStart,
ConfigurationOut_t  q 
) const
virtual

Generate a reachable configuration in the target state

Parameters
qStartnode containing the configuration defining the right hand side of the edge path constraint,
[in,out]qinput configuration used to initialize the numerical solver and output configuration lying in the target state and reachable along the edge from nnear.

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

◆ init()

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

Initialization of the object.

◆ nbWaypoints() [1/2]

void hpp::manipulation::graph::WaypointEdge::nbWaypoints ( const size_type  number)

Set the number of waypoints.

◆ nbWaypoints() [2/2]

std::size_t hpp::manipulation::graph::WaypointEdge::nbWaypoints ( ) const
inline

◆ 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.

◆ setWaypoint()

void hpp::manipulation::graph::WaypointEdge::setWaypoint ( const std::size_t  index,
const EdgePtr_t  wEdge,
const StatePtr_t  wTo 
)

Set waypoint index with wEdge and wTo.

Parameters
wTois the destination state of wEdge

◆ waypoint()

const EdgePtr_t& hpp::manipulation::graph::WaypointEdge::waypoint ( const std::size_t  index) const

Return the index-th edge.


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