Commit ef393cad authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Update to changes in Pinocchio

parent 3bbef56c
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <hpp/util/debug.hh> #include <hpp/util/debug.hh>
#include "pinocchio/multibody/joint/joint-composite.hpp" // TODO remove me when pinocchio handles this.
#include <pinocchio/multibody/joint/joint.hpp> #include <pinocchio/multibody/joint/joint.hpp>
#include <hpp/pinocchio/joint.hh> #include <hpp/pinocchio/joint.hh>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <hpp/core/steering-method/reeds-shepp.hh> #include <hpp/core/steering-method/reeds-shepp.hh>
#include <pinocchio/multibody/joint/joint-composite.hpp> // TODO remove me when pinocchio handles this.
#include <pinocchio/multibody/joint/joint.hpp> #include <pinocchio/multibody/joint/joint.hpp>
#include <hpp/pinocchio/device.hh> #include <hpp/pinocchio/device.hh>
......
...@@ -82,7 +82,7 @@ DevicePtr_t createRobot () ...@@ -82,7 +82,7 @@ DevicePtr_t createRobot ()
JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(JointModelPX::NQ,-4); JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(JointModelPX::NQ,-4);
JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(JointModelPX::NQ,4); JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(JointModelPX::NQ,4);
JointIndex idX = robot->model().addJoint(0,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,jointName); JointIndex idX = robot->model().addJoint(0,JointModelPX(), mat, jointName, max_effort,max_velocity,lower_position,upper_position);
JointModelPY::TangentVector_t max_effortY = JointModelPY::TangentVector_t::Constant(JointModelPY::NV,std::numeric_limits<double>::max()); JointModelPY::TangentVector_t max_effortY = JointModelPY::TangentVector_t::Constant(JointModelPY::NV,std::numeric_limits<double>::max());
JointModelPY::TangentVector_t max_velocityY = JointModelPY::TangentVector_t::Constant(JointModelPY::NV,std::numeric_limits<double>::max()); JointModelPY::TangentVector_t max_velocityY = JointModelPY::TangentVector_t::Constant(JointModelPY::NV,std::numeric_limits<double>::max());
...@@ -90,7 +90,7 @@ DevicePtr_t createRobot () ...@@ -90,7 +90,7 @@ DevicePtr_t createRobot ()
JointModelPY::ConfigVector_t upper_positionY = JointModelPY::ConfigVector_t::Constant(JointModelPY::NQ,4); JointModelPY::ConfigVector_t upper_positionY = JointModelPY::ConfigVector_t::Constant(JointModelPY::NQ,4);
std::string jointNameY = name + "_y"; std::string jointNameY = name + "_y";
robot->model().addJoint(idX,JointModelPY(), mat,max_effortY,max_velocityY,lower_positionY,upper_positionY,jointNameY); robot->model().addJoint(idX,JointModelPY(), mat,jointNameY,max_effortY,max_velocityY,lower_positionY,upper_positionY);
robot->createData(); robot->createData();
robot->createGeomData(); robot->createGeomData();
......
...@@ -74,7 +74,7 @@ DevicePtr_t createRobot () ...@@ -74,7 +74,7 @@ DevicePtr_t createRobot ()
JointModelPX::ConfigVector_t lower_position(-4); JointModelPX::ConfigVector_t lower_position(-4);
JointModelPX::ConfigVector_t upper_position(4); JointModelPX::ConfigVector_t upper_position(4);
robot->model().addJoint(0,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,jointName); robot->model().addJoint(0,JointModelPX(), mat,jointName,max_effort,max_velocity,lower_position,upper_position);
robot->createData(); robot->createData();
...@@ -121,7 +121,7 @@ DevicePtr_t createRobot2 () ...@@ -121,7 +121,7 @@ DevicePtr_t createRobot2 ()
JointIndex idJoint = 0; JointIndex idJoint = 0;
for(int i = 0 ; i < 10 ; ++i){ for(int i = 0 ; i < 10 ; ++i){
idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,jointName + TOSTR(i)); idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,jointName + TOSTR(i),max_effort,max_velocity,lower_position,upper_position);
} }
......
...@@ -88,15 +88,15 @@ DevicePtr_t createRobot () ...@@ -88,15 +88,15 @@ DevicePtr_t createRobot ()
JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(-4); JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(-4);
JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(4); JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(4);
JointIndex idJoint = robot->model().addJoint(0,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,jointName); JointIndex idJoint = robot->model().addJoint(0,JointModelPX(), mat,jointName,max_effort,max_velocity,lower_position,upper_position);
std::string bname = "joint_a"; std::string bname = "joint_a";
for (int i = 0; i < 2; ++i) { for (int i = 0; i < 2; ++i) {
idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,bname+TOSTR(i)); idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,bname+TOSTR(i),max_effort,max_velocity,lower_position,upper_position);
} }
bname = "joint_b"; bname = "joint_b";
for (int i = 0; i < 3; ++i) { for (int i = 0; i < 3; ++i) {
idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,bname+TOSTR(i)); idJoint = robot->model().addJoint(idJoint,JointModelPX(), mat,bname+TOSTR(i),max_effort,max_velocity,lower_position,upper_position);
} }
......
...@@ -106,8 +106,8 @@ BOOST_AUTO_TEST_CASE (Roadmap1) { ...@@ -106,8 +106,8 @@ BOOST_AUTO_TEST_CASE (Roadmap1) {
JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(-3); JointModelPX::ConfigVector_t lower_position = JointModelPY::ConfigVector_t::Constant(-3);
JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(3); JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(3);
JointIndex idJoint = robot->model().addJoint(0,JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,name + "_x"); JointIndex idJoint = robot->model().addJoint(0,JointModelPX(), mat,name + "_x",max_effort,max_velocity,lower_position,upper_position);
robot->model().addJoint(idJoint,JointModelPY(), mat,max_effort,max_velocity,lower_position,upper_position,name + "_y"); robot->model().addJoint(idJoint,JointModelPY(), mat,name + "_y",max_effort,max_velocity,lower_position,upper_position);
robot->createData(); robot->createData();
robot->createGeomData(); robot->createGeomData();
...@@ -350,8 +350,8 @@ BOOST_AUTO_TEST_CASE (nearestNeighbor) { ...@@ -350,8 +350,8 @@ BOOST_AUTO_TEST_CASE (nearestNeighbor) {
JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(3); JointModelPX::ConfigVector_t upper_position = JointModelPY::ConfigVector_t::Constant(3);
JointIndex idJoint = robot->model().addJoint(0,::se3::JointModelPX(), mat,max_effort,max_velocity,lower_position,upper_position,name + "_x"); JointIndex idJoint = robot->model().addJoint(0,::se3::JointModelPX(), mat,name + "_x",max_effort,max_velocity,lower_position,upper_position);
robot->model().addJoint(idJoint,::se3::JointModelPY(), mat,max_effort,max_velocity,lower_position,upper_position,name + "_y"); robot->model().addJoint(idJoint,::se3::JointModelPY(), mat,name + "_y",max_effort,max_velocity,lower_position,upper_position);
robot->createData(); robot->createData();
robot->createGeomData(); robot->createGeomData();
......
...@@ -95,7 +95,7 @@ BOOST_AUTO_TEST_CASE (kdTree) { ...@@ -95,7 +95,7 @@ BOOST_AUTO_TEST_CASE (kdTree) {
JointIndex idJoint = 0; JointIndex idJoint = 0;
idJoint = robot->model().addJoint(idJoint,JointModelTranslation(), mat,max_effort,max_velocity,lower_position,upper_position,name + "_xyz"); idJoint = robot->model().addJoint(idJoint,JointModelTranslation(), mat,name + "_xyz",max_effort,max_velocity,lower_position,upper_position);
idJoint = robot->model().addJoint(idJoint,JointModelSpherical() , mat,name + "_SO3"); idJoint = robot->model().addJoint(idJoint,JointModelSpherical() , mat,name + "_SO3");
idJoint = robot->model().addJoint(idJoint,JointModelRUBZ() , mat,name + "_SO2"); idJoint = robot->model().addJoint(idJoint,JointModelRUBZ() , mat,name + "_SO2");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment