hpp::manipulation::graph::Graph Class Reference

Description of the constraint graph. More...

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

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

Public Member Functions

NodeSelectorPtr_t createNodeSelector ()
 Create and insert a NodeSelector inside the graph. More...
 
NodePtr_t getNode (ConfigurationIn_t config) const
 Returns the states of a configuration. More...
 
Edges_t getEdges (const NodePtr_t &from, const NodePtr_t &to) const
 Get possible edges between two nodes. More...
 
EdgePtr_t chooseEdge (const NodePtr_t &node) const
 Select randomly outgoing edge of the given node. More...
 
ConstraintSetPtr_t configConstraint (const NodePtr_t &node)
 Constraint to project onto the Node. More...
 
ConstraintSetPtr_t configConstraint (const EdgePtr_t &edge)
 Constraint to project onto the same leaf as config. More...
 
ConstraintSetPtr_t pathConstraint (const EdgePtr_t &edge)
 Constraint to project a path. More...
 
void maxIterations (size_type iterations)
 Set maximal number of iterations. More...
 
size_type maxIterations () const
 Get maximal number of iterations in config projector. More...
 
void errorThreshold (const value_type &threshold)
 Set error threshold. More...
 
value_type errorThreshold () const
 Get errorimal number of threshold in config projector. More...
 
const DevicePtr_trobot () const
 Get the robot. More...
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the component in DOT language. More...
 
- 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 GraphPtr_t create (DevicePtr_t robot)
 Create a new Graph. 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 GraphWkPtr_t &weak, DevicePtr_t robot)
 Initialization of the object. More...
 
 Graph ()
 Constructor. More...
 
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 ()
 
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

Description of the constraint graph.

This class contains a graph representing a robot with several end-effectors.

One must make sure not to create loop with shared pointers. To ensure that, the classes are defined as follow:

Constructor & Destructor Documentation

◆ Graph()

hpp::manipulation::graph::Graph::Graph ( )
inlineprotected

Constructor.

Member Function Documentation

◆ chooseEdge()

EdgePtr_t hpp::manipulation::graph::Graph::chooseEdge ( const NodePtr_t node) const

Select randomly outgoing edge of the given node.

◆ configConstraint() [1/2]

ConstraintSetPtr_t hpp::manipulation::graph::Graph::configConstraint ( const NodePtr_t node)

Constraint to project onto the Node.

Parameters
theNode_t on which to project.
Returns
The initialized projector.

◆ configConstraint() [2/2]

ConstraintSetPtr_t hpp::manipulation::graph::Graph::configConstraint ( const EdgePtr_t edge)

Constraint to project onto the same leaf as config.

Parameters
edgesa list of edges defining the foliation.
Returns
The constraint.

◆ create()

static GraphPtr_t hpp::manipulation::graph::Graph::create ( DevicePtr_t  robot)
static

Create a new Graph.

◆ createNodeSelector()

NodeSelectorPtr_t hpp::manipulation::graph::Graph::createNodeSelector ( )

Create and insert a NodeSelector inside the graph.

◆ dotPrint()

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

Print the component in DOT language.

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

◆ errorThreshold() [1/2]

void hpp::manipulation::graph::Graph::errorThreshold ( const value_type threshold)

Set error threshold.

◆ errorThreshold() [2/2]

value_type hpp::manipulation::graph::Graph::errorThreshold ( ) const

Get errorimal number of threshold in config projector.

◆ getEdges()

Edges_t hpp::manipulation::graph::Graph::getEdges ( const NodePtr_t from,
const NodePtr_t to 
) const

Get possible edges between two nodes.

◆ getNode()

NodePtr_t hpp::manipulation::graph::Graph::getNode ( ConfigurationIn_t  config) const

Returns the states of a configuration.

◆ init()

void hpp::manipulation::graph::Graph::init ( const GraphWkPtr_t &  weak,
DevicePtr_t  robot 
)
protected

Initialization of the object.

◆ maxIterations() [1/2]

void hpp::manipulation::graph::Graph::maxIterations ( size_type  iterations)

Set maximal number of iterations.

◆ maxIterations() [2/2]

size_type hpp::manipulation::graph::Graph::maxIterations ( ) const

Get maximal number of iterations in config projector.

◆ pathConstraint()

ConstraintSetPtr_t hpp::manipulation::graph::Graph::pathConstraint ( const EdgePtr_t edge)

Constraint to project a path.

Parameters
edgea list of edges defining the foliation.
Returns
The constraint.

◆ print()

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

Print the object in a stream.

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

◆ robot()

const DevicePtr_t& hpp::manipulation::graph::Graph::robot ( ) const

Get the robot.