hpp::manipulation::graph::Node Class Reference

State of an end-effector. More...

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

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

Public Member Functions

 ~Node ()
 Destructor. More...
 
EdgePtr_t linkTo (const NodePtr_t &to, const Weight_t &w=1, const bool &isInNodeFrom=false, boost::function< EdgePtr_t(const GraphWkPtr_t &, const NodeWkPtr_t &, const NodeWkPtr_t &) > create=Edge::create)
 Create a link from this node to the given node. More...
 
virtual bool contains (ConfigurationIn_t config) const
 Check whether the configuration is in this state. More...
 
NodeSelectorWkPtr_t nodeSelector () const
 Get the parent NodeSelector. More...
 
void nodeSelector (const NodeSelectorWkPtr_t &parent)
 Set the NodeSelector containing this node. More...
 
const Neighbors_tneighbors () const
 Get the neighbors. More...
 
void updateWeight (const EdgePtr_t &edge, const Weight_t &w)
 
ConstraintSetPtr_t configConstraint () const
 Constraint to project onto this node. More...
 
virtual void addNumericalConstraintForPath (const NumericalConstraintPtr_t &nm, const SizeIntervals_t &passiveDofs=SizeIntervals_t())
 Add core::NumericalConstraint to the component. More...
 
virtual void addNumericalConstraintForPath (const DifferentiableFunctionPtr_t &function, const ComparisonTypePtr_t &ineq) HPP_MANIPULATION_DEPRECATED
 Add core::DifferentiableFunction to the component. More...
 
bool insertNumericalConstraintsForPath (ConfigProjectorPtr_t &proj) const
 Insert the numerical constraints in a ConfigProjector. More...
 
const NumericalConstraints_tnumericalConstraintsForPath () const
 Get a reference to the NumericalConstraints_t. More...
 
std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the object in a stream. 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 NodePtr_t create ()
 Create a new node. 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 NodeWkPtr_t &self)
 Initialize the object. More...
 
 Node ()
 Constructor. More...
 
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...
 
- Protected Member Functions inherited from hpp::manipulation::graph::GraphComponent
void init (const GraphComponentWkPtr_t &weak)
 Initialize the component. More...
 
 GraphComponent ()
 

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

State of an end-effector.

Nodes of the graph of constraints. There is one graph for each end-effector.

Constructor & Destructor Documentation

◆ ~Node()

hpp::manipulation::graph::Node::~Node ( )

Destructor.

◆ Node()

hpp::manipulation::graph::Node::Node ( )
protected

Constructor.

Member Function Documentation

◆ addNumericalConstraintForPath() [1/2]

virtual void hpp::manipulation::graph::Node::addNumericalConstraintForPath ( const NumericalConstraintPtr_t nm,
const SizeIntervals_t passiveDofs = SizeIntervals_t () 
)
inlinevirtual

Add core::NumericalConstraint to the component.

◆ addNumericalConstraintForPath() [2/2]

virtual void hpp::manipulation::graph::Node::addNumericalConstraintForPath ( const DifferentiableFunctionPtr_t function,
const ComparisonTypePtr_t ineq 
)
inlinevirtual

Add core::DifferentiableFunction to the component.

◆ configConstraint()

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

Constraint to project onto this node.

◆ contains()

virtual bool hpp::manipulation::graph::Node::contains ( ConfigurationIn_t  config) const
virtual

Check whether the configuration is in this state.

return configConstraint()->isSatisfied (config);
Note
You should not use this method to know in which states a configuration is. This only checks if the configuration satisfies the constraints. Instead, use the class NodeSelector.

◆ create()

static NodePtr_t hpp::manipulation::graph::Node::create ( )
static

Create a new node.

◆ dotPrint()

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

Print the object in a stream.

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

◆ init()

void hpp::manipulation::graph::Node::init ( const NodeWkPtr_t &  self)
protected

Initialize the object.

◆ insertNumericalConstraintsForPath()

bool hpp::manipulation::graph::Node::insertNumericalConstraintsForPath ( ConfigProjectorPtr_t proj) const
inline

Insert the numerical constraints in a ConfigProjector.

Returns
true is at least one NumericalConstraintPtr_t was inserted.

◆ linkTo()

EdgePtr_t hpp::manipulation::graph::Node::linkTo ( const NodePtr_t to,
const Weight_t w = 1,
const bool &  isInNodeFrom = false,
boost::function< EdgePtr_t(const GraphWkPtr_t &, const NodeWkPtr_t &, const NodeWkPtr_t &) >  create = Edge::create 
)

Create a link from this node to the given node.

◆ neighbors()

const Neighbors_t& hpp::manipulation::graph::Node::neighbors ( ) const
inline

Get the neighbors.

◆ nodeSelector() [1/2]

NodeSelectorWkPtr_t hpp::manipulation::graph::Node::nodeSelector ( ) const
inline

Get the parent NodeSelector.

◆ nodeSelector() [2/2]

void hpp::manipulation::graph::Node::nodeSelector ( const NodeSelectorWkPtr_t &  parent)
inline

Set the NodeSelector containing this node.

◆ numericalConstraintsForPath()

const NumericalConstraints_t& hpp::manipulation::graph::Node::numericalConstraintsForPath ( ) const
inline

Get a reference to the NumericalConstraints_t.

◆ populateTooltip()

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

Populate DrawingAttributes tooltip.

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

◆ print()

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

Print the object in a stream.

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

◆ updateWeight()

void hpp::manipulation::graph::Node::updateWeight ( const EdgePtr_t edge,
const Weight_t w 
)