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

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

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

Public Types

typedef core::RelativeMotion RelativeMotion
 

Public Member Functions

virtual ~Edge ()
 Destructor. More...
 
virtual bool applyConstraints (core::NodePtr_t nStart, ConfigurationOut_t q) const HPP_MANIPULATION_DEPRECATED
 
virtual bool applyConstraints (ConfigurationIn_t qStart, ConfigurationOut_t q) const HPP_MANIPULATION_DEPRECATED
 
virtual bool generateTargetConfig (core::NodePtr_t nStart, ConfigurationOut_t q) const
 
virtual bool generateTargetConfig (ConfigurationIn_t qStart, ConfigurationOut_t q) const
 
virtual bool canConnect (ConfigurationIn_t q1, ConfigurationIn_t q2) const
 
virtual bool build (core::PathPtr_t &path, ConfigurationIn_t q1, ConfigurationIn_t q2) 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
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. More...
 
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 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

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 ()
 
virtual std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
- 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...
 

Protected Attributes

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_
 

Friends

class Graph
 

Detailed Description

Transition between two states of a constraint graph

An edge stores two types of constraints.

  • Path constraints should be safisfied by paths belonging to the edge. Along any path, the right hand side of the constraint is constant, but can differ between paths. For instance if an edge represents a transit path of a robot that can grasp an object, the right hand side of the constraint represents the position of the object. Along any transit path, the object does not move, but for different paths the object can be at different positions.
    See also
    method pathConstraint.
  • Configuration constraints are constraints that configurations in the destination state should satisfy and the constraints that paths should satisfy. For instance, if the edge links a state where the robot does not hold the object to a state where the robot holds the object, the configuration constraints represent a fixed relative position of the object with respect to the gripper and a stable position of the object. Configuration constraints are necessary to generate a configuration in the destination state of the edge that is reachable from a given configuration in the start state by an admissible path.

Member Typedef Documentation

◆ RelativeMotion

Constructor & Destructor Documentation

◆ ~Edge()

virtual hpp::manipulation::graph::Edge::~Edge ( )
virtual

Destructor.

◆ Edge()

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

Constructor.

Member Function Documentation

◆ applyConstraints() [1/2]

virtual bool hpp::manipulation::graph::Edge::applyConstraints ( core::NodePtr_t  nStart,
ConfigurationOut_t  q 
) const
virtual

Generate a reachable configuration in the target state

Parameters
nStartnode containing the configuration defining the right hand side of the edge 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:
Use generateTargetConfig instead.

Reimplemented in hpp::manipulation::graph::LevelSetEdge.

◆ applyConstraints() [2/2]

virtual bool hpp::manipulation::graph::Edge::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:
Use generateTargetConfig instead.

Reimplemented in hpp::manipulation::graph::LevelSetEdge, and hpp::manipulation::graph::WaypointEdge.

◆ build()

virtual bool hpp::manipulation::graph::Edge::build ( core::PathPtr_t path,
ConfigurationIn_t  q1,
ConfigurationIn_t  q2 
) const
virtual

◆ buildConfigConstraint()

virtual ConstraintSetPtr_t hpp::manipulation::graph::Edge::buildConfigConstraint ( )
protectedvirtual

◆ buildPathConstraint()

virtual ConstraintSetPtr_t hpp::manipulation::graph::Edge::buildPathConstraint ( )
protectedvirtual

Build path constraints.

◆ buildTargetConstraint()

virtual ConstraintSetPtr_t hpp::manipulation::graph::Edge::buildTargetConstraint ( )
protectedvirtual

Build path and target state constraint set.

Reimplemented in hpp::manipulation::graph::LevelSetEdge.

◆ canConnect()

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

◆ configConstraint()

ConstraintSetPtr_t hpp::manipulation::graph::Edge::configConstraint ( ) const

Constraint of the destination state and of the path

Deprecated:
Use targetConstraint instead

◆ create()

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

Create a new empty Edge.

◆ direction()

virtual bool hpp::manipulation::graph::Edge::direction ( const core::PathPtr_t path) const
virtual

Get direction of the path compare to the edge

Returns
true is reverse

◆ dotPrint()

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

◆ generateTargetConfig() [1/2]

virtual bool hpp::manipulation::graph::Edge::generateTargetConfig ( core::NodePtr_t  nStart,
ConfigurationOut_t  q 
) const
virtual

Generate a reachable configuration in the target state

Parameters
nStartnode 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 nStart.

Reimplemented in hpp::manipulation::graph::LevelSetEdge.

◆ generateTargetConfig() [2/2]

virtual bool hpp::manipulation::graph::Edge::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 in hpp::manipulation::graph::LevelSetEdge, and hpp::manipulation::graph::WaypointEdge.

◆ init()

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

Initialization of the object.

◆ initialize()

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

◆ intersectionConstraint()

virtual bool hpp::manipulation::graph::Edge::intersectionConstraint ( const EdgePtr_t other,
ConfigProjectorPtr_t  projector 
) const
virtual

Populate a ConfigProjector with constraints required to generate a path at the intersection of two edges.

◆ isShort()

bool hpp::manipulation::graph::Edge::isShort ( ) const
inline

◆ pathConstraint()

ConstraintSetPtr_t hpp::manipulation::graph::Edge::pathConstraint ( ) const

Constraint to project a path.

Returns
The initialized constraint.

◆ pathValidation()

const core::PathValidationPtr_t& hpp::manipulation::graph::Edge::pathValidation ( ) const
inline

Get path validation associated to the edge.

◆ print()

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

◆ relativeMotion() [1/2]

const RelativeMotion::matrix_type& hpp::manipulation::graph::Edge::relativeMotion ( ) const
inline

◆ relativeMotion() [2/2]

void hpp::manipulation::graph::Edge::relativeMotion ( const RelativeMotion::matrix_type m)

Update the relative motion matrix.

◆ securityMarginForPair()

void hpp::manipulation::graph::Edge::securityMarginForPair ( const size_type row,
const size_type col,
const value_type margin 
)

Set Security margin for a pair of joints

Parameters
rowindex of joint1 + 1 in robot,
colindex of joint2 + 1 in robot,
marginsecurity margin for collision checking between those joints.
Note
set value to matrix [row, col] and matrix [col, row].

◆ securityMargins()

const matrix_t& hpp::manipulation::graph::Edge::securityMargins ( ) const
inline

Accessor to the security margin.

◆ setShort()

void hpp::manipulation::graph::Edge::setShort ( bool  isShort)
inline

◆ state() [1/2]

StatePtr_t hpp::manipulation::graph::Edge::state ( ) const
inline

Get the state in which path is.

◆ state() [2/2]

void hpp::manipulation::graph::Edge::state ( StatePtr_t  state)
inline

◆ stateFrom()

StatePtr_t hpp::manipulation::graph::Edge::stateFrom ( ) const

Get the origin.

◆ stateTo()

StatePtr_t hpp::manipulation::graph::Edge::stateTo ( ) const

Get the destination.

◆ steeringMethod()

const core::SteeringMethodPtr_t& hpp::manipulation::graph::Edge::steeringMethod ( ) const
inline

Get steering method associated to the edge.

◆ targetConstraint()

ConstraintSetPtr_t hpp::manipulation::graph::Edge::targetConstraint ( ) const

Constraint of the destination state and of the path.

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

Member Data Documentation

◆ isShort_

bool hpp::manipulation::graph::Edge::isShort_
protected

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