From 2e69130ffd8fa6d047ceb6ef15cf92d7ab788564 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Tue, 19 Aug 2014 11:13:43 +0200
Subject: [PATCH] Fix bug: Node::configConstraint did not take into account all
 the constraints

---
 src/graph/node.cc | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/graph/node.cc b/src/graph/node.cc
index 0746b5e..d186c79 100644
--- a/src/graph/node.cc
+++ b/src/graph/node.cc
@@ -87,14 +87,8 @@ namespace hpp {
       ConstraintPtr_t Node::configConstraint()
       {
         if (!configConstraints_) {
-          ConstraintSetPtr_t configConst = buildConstraintSet (graph_, name () + "-cfgconstraint");
-          insertListIn <LockedDofs_t> (lockedDofConstraints_, configConst);
-          if (numericalConstraints_.size () > 0) {
-            ConfigProjectorPtr_t cp = buildConfigProjector (graph_, name () + "cfgproj");
-            insertListIn <DifferentiableFunctions_t> (numericalConstraints_, cp);
-            configConst->addConstraint (HPP_DYNAMIC_PTR_CAST(Constraint, cp));
-          }
-          configConstraints_ = configConst;
+          Nodes_t thisNode; thisNode.push_back (wkPtr_.lock ());
+          configConstraints_ = graph_.lock ()->configConstraint (thisNode);
         }
         return configConstraints_;
       }
-- 
GitLab