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

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

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

Public Member Functions

virtual ~LevelSetEdge ()
 
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
 
bool generateTargetConfigOnLeaf (ConfigurationIn_t qStart, ConfigurationIn_t qLeaf, ConfigurationOut_t q) const
 
virtual ConstraintSetPtr_t buildConfigConstraint () HPP_MANIPULATION_DEPRECATED
 
virtual ConstraintSetPtr_t buildTargetConstraint ()
 Build path and target state constraints. More...
 
void buildHistogram ()
 
LeafHistogramPtr_t histogram () const
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. More...
 
Foliation definition
void insertParamConstraint (const ImplicitPtr_t &nm, const segments_t &passiveDofs=segments_t())
 
const NumericalConstraints_tparamConstraints () const
 Get constraints parameterizing the target state foliation. More...
 
void insertConditionConstraint (const ImplicitPtr_t &nm, const segments_t &passiveDofs=segments_t())
 
const NumericalConstraints_tconditionConstraints () const
 
- Public Member Functions inherited from hpp::manipulation::graph::Edge
virtual ~Edge ()
 Destructor. More...
 
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
 
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 LevelSetEdgePtr_t create (const std::string &name, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_t &to)
 Create a new LevelSetEdge. 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

void init (const LevelSetEdgeWkPtr_t &weak, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_t &to)
 Initialization of the object. More...
 
 LevelSetEdge (const std::string &name)
 
virtual std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip. More...
 
virtual void initialize ()
 
- 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 buildPathConstraint ()
 Build path constraints. 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
 

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 that handles crossed foliations

Let us consider the following simple constraint graph corresponding to a robot grasping an object with one gripper.

constraint-graph.png
Simple constraint graph corresponding to a robot grasping an object.

In order to disambiguate, we assume here that

  • transition Grasp object is in Placement state,
  • transition Release object is in Grasp state.

If state Placement is defined by the object lying on a planar polygonal surface, then

  • state Placement,
  • transition Transit, and
  • transition Grasp object

are all constrained in a foliated manifold parameterized by the position of the box on the surface.

Likewise, if the object is cylindrical the grasp may have a degree of freedom corresponding to the angle around z-axis of the gripper with respect to the object. See classes Handle and Gripper for details. In this latter case,

  • state Grasp,
  • transition Transfer, and
  • transition Release object

are all constrained in a foliated manifold parameterized by the angle around z-axis of the gripper with respect to the object.

Let us denote

  • grasp the numerical constraint defining state Grasp,
  • placement the numerical constraint defining state Placement,
  • grasp_comp the parameterized constraint defining a leaf of Transfer (the angle between the gripper and the object),
  • placement_comp the parameterized constraint defining a leaf of Placement (the position of the object on the contact surface).

As explained in this paper , we are in the crossed foliation case and manipulation RRT will never be able to connect trees expanding in different leaves of the foliation.

This class solves this issue in the following way by creating an instance of LevelSetEdge between Placement and Grasp.

When extending a configuration $\mathbf{q}_{start}$ in state Placement, this transition will produce a target configuration (method generateTargetConfig) as follows.

  • pick a random configuration $\mathbf{q}_rand$, in the edge histogram (see method histogram)
  • compute right hand side of grasp_comp with $\mathbf{q}_{rand}$,
  • compute right hand side of placement_comp with $\mathbf{q}_{start}$,
  • solve (grasp, placement, placement_comp, grasp_comp) using input configuration $\mathbf{q}$. Note that the parent method Edge::generateTargetConfig does the same without adding grasp_comp.

The constraints parameterizing the target state foliation (graps_comp in our example) are passed to class instances using method insertParamConstraint.

Constructor & Destructor Documentation

◆ ~LevelSetEdge()

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

◆ LevelSetEdge()

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

Member Function Documentation

◆ applyConstraints() [1/2]

virtual bool hpp::manipulation::graph::LevelSetEdge::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 from hpp::manipulation::graph::Edge.

◆ applyConstraints() [2/2]

virtual bool hpp::manipulation::graph::LevelSetEdge::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 from hpp::manipulation::graph::Edge.

◆ buildConfigConstraint()

virtual ConstraintSetPtr_t hpp::manipulation::graph::LevelSetEdge::buildConfigConstraint ( )
virtual
Deprecated:
Use buildTargetConstraint instead

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

◆ buildHistogram()

void hpp::manipulation::graph::LevelSetEdge::buildHistogram ( )

Build the histogram

See also
LevelSetEdge::histogram.

◆ buildTargetConstraint()

virtual ConstraintSetPtr_t hpp::manipulation::graph::LevelSetEdge::buildTargetConstraint ( )
virtual

Build path and target state constraints.

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

◆ conditionConstraints()

const NumericalConstraints_t& hpp::manipulation::graph::LevelSetEdge::conditionConstraints ( ) const

Get constraints parameterizing the target state foliation

See also
LevelSetEdge::histogram

◆ create()

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

Create a new LevelSetEdge.

◆ dotPrint()

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

Print the object in a stream.

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

◆ generateTargetConfig() [1/2]

virtual bool hpp::manipulation::graph::LevelSetEdge::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 from hpp::manipulation::graph::Edge.

◆ generateTargetConfig() [2/2]

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

Generate a reachable configuration in the target state

Parameters
qStartconfiguration 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.

◆ generateTargetConfigOnLeaf()

bool hpp::manipulation::graph::LevelSetEdge::generateTargetConfigOnLeaf ( ConfigurationIn_t  qStart,
ConfigurationIn_t  qLeaf,
ConfigurationOut_t  q 
) const

Generate a reachable configuration in leaf of target state

Parameters
qStartconfiguration defining the right hand side of the edge path constraint,
qLeafconfiguration used to set the right hand side of the target state foliation. See method insertParamConstraint.

◆ histogram()

LeafHistogramPtr_t hpp::manipulation::graph::LevelSetEdge::histogram ( ) const

Return pointer on histogram of the edge

The edge histogram is a container of configurations defined by a set of constraints called the condition constraints that a configuration should satisfy to be inserted in the histogram.

The histogram is passed to the Roadmap via the graph (method Graph::insertHistogram). The roadmap then populates the histogram with all new configurations satisfying the condition constraints.

The condition constraints should therefore be the constraints of the target state of the level set edge.

See also
LevelSetEdge::conditionConstraints LevelSetEdge::insertConditionConstraint

◆ init()

void hpp::manipulation::graph::LevelSetEdge::init ( const LevelSetEdgeWkPtr_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::LevelSetEdge::initialize ( )
protectedvirtual

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

◆ insertConditionConstraint()

void hpp::manipulation::graph::LevelSetEdge::insertConditionConstraint ( const ImplicitPtr_t nm,
const segments_t passiveDofs = segments_t() 
)

Insert a condition constraint

See also
LevelSetEdge::histogram

◆ insertParamConstraint()

void hpp::manipulation::graph::LevelSetEdge::insertParamConstraint ( const ImplicitPtr_t nm,
const segments_t passiveDofs = segments_t() 
)

Insert a constraints parameterizing the target state foliation

Parameters
nmthe numerical constraint,
passiveDofsthe passive degrees of freedom of the constraint.

◆ paramConstraints()

const NumericalConstraints_t& hpp::manipulation::graph::LevelSetEdge::paramConstraints ( ) const

Get constraints parameterizing the target state foliation.

◆ populateTooltip()

virtual void hpp::manipulation::graph::LevelSetEdge::populateTooltip ( dot::Tooltip tp) const
protectedvirtual

Populate DrawingAttributes tooltip.

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

◆ print()

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

Print the object in a stream.

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


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