diff --git a/include/hpp/manipulation/graph/node.hh b/include/hpp/manipulation/graph/node.hh index 85ddb266243c931788d6ff77ad61222c23e26c77..8973f3029cae321a9c221e8fa92fd13dce3ea601 100644 --- a/include/hpp/manipulation/graph/node.hh +++ b/include/hpp/manipulation/graph/node.hh @@ -126,6 +126,8 @@ namespace hpp { /// Print the object in a stream. std::ostream& print (std::ostream& os) const; + virtual void populateTooltip (dot::Tooltip& tp) const; + private: /// List of possible motions from this state (i.e. the outgoing /// vertices). diff --git a/src/graph/node.cc b/src/graph/node.cc index 0d629206c58b32328c7621b0b764ad8788d1268c..24c929a855221c7202cdafd87bb963d2c347ba74 100644 --- a/src/graph/node.cc +++ b/src/graph/node.cc @@ -16,6 +16,8 @@ #include "hpp/manipulation/graph/node.hh" +#include <hpp/constraints/differentiable-function.hh> + #include "hpp/manipulation/robot.hh" #include "hpp/manipulation/graph/edge.hh" #include "hpp/manipulation/graph/graph.hh" @@ -81,6 +83,17 @@ namespace hpp { return os; } + void Node::populateTooltip (dot::Tooltip& tp) const + { + GraphComponent::populateTooltip (tp); + tp.addLine (""); + tp.addLine ("Numerical constraints for paths are:"); + for (NumericalConstraints_t::const_iterator it = numericalConstraintsForPath_.begin (); + it != numericalConstraintsForPath_.end (); ++it) { + tp.addLine ("- " + (*it)->function ().name ()); + } + } + std::ostream& Node::print (std::ostream& os) const { os << "| |-- ";