From a5a511e54fc472ef5eeedf352acff814c0e3dfc2 Mon Sep 17 00:00:00 2001
From: mnaveau <maximilien.naveau@laas.fr>
Date: Wed, 13 Apr 2016 11:01:47 +0200
Subject: [PATCH] the .so is compiling with pinocchio, the tests have to fixed

---
 .../ComAndFootRealizationByGeometry.cpp       | 25 +++++++++++--------
 tests/TestObject.cpp                          |  4 +--
 tests/TestObject.hh                           | 20 +++++++--------
 3 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/src/MotionGeneration/ComAndFootRealizationByGeometry.cpp b/src/MotionGeneration/ComAndFootRealizationByGeometry.cpp
index 0252a406..59957973 100644
--- a/src/MotionGeneration/ComAndFootRealizationByGeometry.cpp
+++ b/src/MotionGeneration/ComAndFootRealizationByGeometry.cpp
@@ -740,7 +740,8 @@ bool ComAndFootRealizationByGeometry::
 
   ODEBUG("Typeid of humanoid: " << typeid(getHumanoidDynamicRobot()).name() );
   // Call specialized dynamics.
-  getPinocchioRobot()->getSpecializedInverseKinematics(Waist,Ankle,BodyPose,FootPose,lq);
+  getPinocchioRobot()->ComputeSpecializedInverseKinematics(
+        Waist,Ankle,BodyPose,FootPose,lq);
 
   return true;
 }
@@ -1248,11 +1249,12 @@ void ComAndFootRealizationByGeometry::
       TempALeft * m_GainFactor / 0.2;
   MAL_S4x4_MATRIX_ACCESS_I_J(jointEndPosition,2,3) = m_ZARM;
 
-  getPinocchioRobot()->getSpecializedInverseKinematics(*m_LeftShoulder,
-                                                       *getHumanoidDynamicRobot()->leftWrist(),
-                                                       jointRootPosition,
-                                                       jointEndPosition,
-                                                       qArml);
+  getPinocchioRobot()->ComputeSpecializedInverseKinematics(
+        m_LeftShoulder,
+        getPinocchioRobot()->leftHand()->associatedWrist,
+        jointRootPosition,
+        jointEndPosition,
+        qArml);
   ODEBUG4("ComputeHeuristicArm: Step 2 ","DebugDataIKArms.txt");
   ODEBUG4( "IK Left arm p:" << qArml(0)<< " " <<  qArml(1)  << " " << qArml(2)
            << " " << qArml(3) << "  " << qArml(4) << " " << qArml(5), "DebugDataIKArms.txt" );
@@ -1260,11 +1262,12 @@ void ComAndFootRealizationByGeometry::
   MAL_S4x4_MATRIX_ACCESS_I_J(jointEndPosition,0,3) = TempARight;
   MAL_S4x4_MATRIX_ACCESS_I_J(jointEndPosition,2,3) = m_ZARM;
 
-  getPinocchioRobot()->getSpecializedInverseKinematics(*m_RightShoulder,
-                                                       *getHumanoidDynamicRobot()->rightWrist(),
-                                                       jointRootPosition,
-                                                       jointEndPosition,
-                                                       qArmr);
+  getPinocchioRobot()->ComputeSpecializedInverseKinematics(
+        m_RightShoulder,
+        getPinocchioRobot()->rightHand()->associatedWrist,
+        jointRootPosition,
+        jointEndPosition,
+        qArmr);
   ODEBUG4( "IK Right arm p:" << qArmr(0)<< " " <<  qArmr(1)  << " " << qArmr(2)
            << " " << qArmr(3) << "  " << qArmr(4) << " " << qArmr(5), "DebugDataIKArms.txt" );
 
diff --git a/tests/TestObject.cpp b/tests/TestObject.cpp
index 588c35b8..920e7ab0 100644
--- a/tests/TestObject.cpp
+++ b/tests/TestObject.cpp
@@ -136,8 +136,8 @@ namespace PatternGeneratorJRL
 						      string &SpecificitiesFileName,
 						      string &LinkJointRank,
 						      string &InitConfig,
-						      CjrlHumanoidDynamicRobot * & aHDR,
-						      CjrlHumanoidDynamicRobot * & aDebugHDR,
+                              PinocchioRobot * & aHDR,
+                              PinocchioRobot * & aDebugHDR,
 						      PatternGeneratorInterface * & aPGI)
     {
       // Creating the humanoid robot.
diff --git a/tests/TestObject.hh b/tests/TestObject.hh
index ccfc9a73..1e0185e1 100644
--- a/tests/TestObject.hh
+++ b/tests/TestObject.hh
@@ -77,8 +77,8 @@ namespace PatternGeneratorJRL
       bool doTest(std::ostream &os);
 
       /*! \brief Decide from which object the robot is build from. */
-      virtual void SpecializedRobotConstructor(CjrlHumanoidDynamicRobot *& aHDR,
-					       CjrlHumanoidDynamicRobot *& aDebugHDR );
+      virtual void SpecializedRobotConstructor(PinocchioRobot *& aPR,
+                           PinocchioRobot *& aDebugPR );
 
     protected:
 
@@ -96,12 +96,12 @@ namespace PatternGeneratorJRL
        */
       /*! */
       void CreateAndInitializeHumanoidRobot(std::string &RobotFileName,
-					    std::string &LinkJointRank,
-					    std::string &SpecificitiesFileName,
-					    std::string &InitConfig,
-					    CjrlHumanoidDynamicRobot *& aHDR,
-					    CjrlHumanoidDynamicRobot *& aDebugHDR,
-					    PatternGeneratorJRL::PatternGeneratorInterface *&aPGI);
+                        std::string &LinkJointRank,
+                        std::string &SpecificitiesFileName,
+                        std::string &InitConfig,
+                        PinocchioRobot *& aPR,
+                        PinocchioRobot *& aDebugPR,
+                        PatternGeneratorJRL::PatternGeneratorInterface *&aPGI);
 
       /*! @} */
 
@@ -136,10 +136,10 @@ namespace PatternGeneratorJRL
 	 @{
       */
       /*! \brief Abstract model of the humanoid robot considered */
-      CjrlHumanoidDynamicRobot * m_HDR ;
+      PinocchioRobot * m_HDR ;
 
       /*! \brief Abstract model of the humanoid robot for debugging purposes. */
-      CjrlHumanoidDynamicRobot * m_DebugHDR ;
+      PinocchioRobot * m_DebugHDR ;
 
       /*! @} */
 
-- 
GitLab