From eb021e7ffe366dcfbf48c7f67d1963498bc00269 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Fri, 27 Oct 2017 17:48:20 +0200
Subject: [PATCH] Fix bug in automatic graph construction.

---
 src/graph/helper.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/graph/helper.cc b/src/graph/helper.cc
index c1178e6d..b6bf6ac9 100644
--- a/src/graph/helper.cc
+++ b/src/graph/helper.cc
@@ -191,7 +191,7 @@ namespace hpp {
                   we->nbWaypoints (nbWaypoints);
                   gls = linkWaypoint <LevelSetEdge> (n, T-1, T, name, "ls");
                   for (std::size_t i = 0; i < Nedges; ++i)
-                    we->setWaypoint (i, e[i], n[i]);
+                    we->setWaypoint (i, e[i], n[i+1]);
                   we->setWaypoint (T-1, gls, n[T]);
                   gls->state (n.front());
                   gls->setShort (pregrasp);
-- 
GitLab