From 336d19d887084c874b90fce9b38986e15d73272a Mon Sep 17 00:00:00 2001
From: mnaveau <maximilien.naveau@laas.fr>
Date: Mon, 19 Sep 2016 18:34:28 +0200
Subject: [PATCH] enable compatibility pinocchi 1.1.0

---
 tests/TestNaveau2015.cpp |  4 ++--
 tests/TestObject.cpp     | 10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/TestNaveau2015.cpp b/tests/TestNaveau2015.cpp
index 790e2b71..2e5b50c9 100644
--- a/tests/TestNaveau2015.cpp
+++ b/tests/TestNaveau2015.cpp
@@ -39,8 +39,8 @@
 #include "TestObject.hh"
 #include "MotionGeneration/ComAndFootRealizationByGeometry.hh"
 
-#include "pinocchio/multibody/parser/urdf.hpp"
-#include "pinocchio/multibody/parser/srdf.hpp"
+//#include "pinocchio/multibody/parser/urdf.hpp"
+//#include "pinocchio/multibody/parser/srdf.hpp"
 
 using namespace std;
 using namespace PatternGeneratorJRL;
diff --git a/tests/TestObject.cpp b/tests/TestObject.cpp
index 140706f4..66df47c9 100644
--- a/tests/TestObject.cpp
+++ b/tests/TestObject.cpp
@@ -28,8 +28,8 @@
 #include <fstream>
 #include "Debug.hh"
 #include "TestObject.hh"
-#include "pinocchio/multibody/parser/urdf.hpp"
-#include "pinocchio/multibody/parser/srdf.hpp"
+#include "pinocchio/parsers/urdf.hpp"
+#include "pinocchio/parsers/srdf.hpp"
 using namespace std;
 
 #define NB_OF_FIELDS 39
@@ -305,7 +305,8 @@ namespace PatternGeneratorJRL
         aFoot.anklePosition(1) = v.second.get<double>("y");
         aFoot.anklePosition(2) = v.second.get<double>("z");
       }
-      aFoot.associatedAnkle = aModel->getBodyId("r_ankle");
+      se3::FrameIndex ra = aModel->getFrameId("r_ankle");
+      aFoot.associatedAnkle = aModel->frames[ra].parent ;
       aPR.initializeRightFoot(aFoot);
 
       // Initialize the Left Foot
@@ -323,7 +324,8 @@ namespace PatternGeneratorJRL
         aFoot.anklePosition(1) = v.second.get<double>("y");
         aFoot.anklePosition(2) = v.second.get<double>("z");
       }
-      aFoot.associatedAnkle = aModel->getBodyId("l_ankle");
+      se3::FrameIndex la = aModel->getBodyId("l_ankle");
+      aFoot.associatedAnkle = aModel->frames[la].parent ;
       aPR.initializeLeftFoot(aFoot);
     }
 
-- 
GitLab