Skip to content
Snippets Groups Projects
Commit fd1da58e authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add a pointer to the robot in graph::Graph

parent f32699dd
No related merge requests found
......@@ -17,6 +17,7 @@
#ifndef HPP_MANIPULATION_GRAPH_GRAPH_HH
# define HPP_MANIPULATION_GRAPH_GRAPH_HH
# include "hpp/manipulation/robot.hh"
# include "hpp/manipulation/graph/node-selector.hh"
# include "hpp/manipulation/fwd.hh"
......@@ -39,11 +40,11 @@ namespace hpp {
{
public:
/// Create a new Graph.
static GraphPtr_t create()
static GraphPtr_t create(RobotPtr_t robot)
{
Graph* ptr = new Graph;
GraphPtr_t shPtr (ptr);
ptr->init (shPtr);
ptr->init (shPtr, robot);
return shPtr;
}
......@@ -63,8 +64,9 @@ namespace hpp {
protected:
/// Initialization of the object.
void init (const GraphWkPtr_t& weak)
void init (const GraphWkPtr_t& weak, RobotPtr_t robot)
{
robot_ = robot;
wkPtr_ = weak;
}
......@@ -80,6 +82,9 @@ namespace hpp {
/// stability constraints.
ConstraintPtr_t constraints_;
/// Keep a pointer to the composite robot.
RobotPtr_t robot_;
/// Weak pointer to itself.
GraphWkPtr_t wkPtr_;
}; // Class Graph
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment