Skip to content
Snippets Groups Projects
Commit ae930ac3 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Update to pinocchio v2

parent bb0d1bbf
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,8 @@ namespace hpp {
typedef pinocchio::JointPtr_t JointPtr_t;
typedef pinocchio::JointIndex JointIndex;
typedef std::vector<JointIndex> JointIndices_t;
typedef se3::FrameIndex FrameIndex;
typedef std::vector<se3::FrameIndex> FrameIndices_t;
typedef pinocchio::FrameIndex FrameIndex;
typedef std::vector<pinocchio::FrameIndex> FrameIndices_t;
typedef pinocchio::Configuration_t Configuration_t;
typedef pinocchio::ConfigurationIn_t ConfigurationIn_t;
typedef pinocchio::ConfigurationOut_t ConfigurationOut_t;
......
......@@ -29,8 +29,7 @@
namespace hpp {
namespace manipulation {
using se3::Frame;
using se3::FrameIndex;
using ::pinocchio::Frame;
pinocchio::DevicePtr_t Device::clone () const
{
......@@ -48,7 +47,7 @@ namespace hpp {
pinocchio::GeomModel& gm = geomModel();
// The root frame should be the first frame.
Frame& rootFrame = m.frames[idxs[0]];
if (rootFrame.type == se3::JOINT) {
if (rootFrame.type == ::pinocchio::JOINT) {
JointIndex jid = m.getJointId (rootFrame.name);
m.jointPlacements[jid] = t;
return;
......@@ -61,16 +60,16 @@ namespace hpp {
if (frame.parent == rootFrame.parent) {
// frame is between rootFrame and next moving joints.
frame.placement = shift * frame.placement;
if (frame.type == se3::BODY) {
if (frame.type == ::pinocchio::BODY) {
// Update the geometry object placement.
for (std::size_t k = 0; k < gm.geometryObjects.size(); ++k)
{
se3::GeometryObject& go = gm.geometryObjects[k];
::pinocchio::GeometryObject& go = gm.geometryObjects[k];
if (go.parentFrame == idxs[i])
go.placement = shift * go.placement;
}
}
} else if ((frame.type == se3::JOINT) && (rootFrame.parent == m.parents[frame.parent])) {
} else if ((frame.type == ::pinocchio::JOINT) && (rootFrame.parent == m.parents[frame.parent])) {
// frame corresponds to a child joint of rootFrame.parent
m.jointPlacements[frame.parent] = shift * m.jointPlacements[frame.parent];
}
......
......@@ -1103,8 +1103,8 @@ namespace hpp {
// Loop over all frames of object, detect joint and create locked
// joint.
assert (robot.frameIndices.has (od.name));
BOOST_FOREACH (const se3::FrameIndex& f, robot.frameIndices.get (od.name)) {
if (model.frames[f].type != se3::JOINT) continue;
BOOST_FOREACH (const FrameIndex& f, robot.frameIndices.get (od.name)) {
if (model.frames[f].type != ::pinocchio::JOINT) continue;
const JointIndex j = model.frames[f].parent;
JointPtr_t oj (new Joint (ps->robot(), j));
LiegroupSpacePtr_t space (oj->configurationSpace ());
......
......@@ -21,7 +21,7 @@
#include <boost/assign/list_of.hpp>
#include <pinocchio/multibody/joint/joint.hpp>
#include <pinocchio/multibody/joint/joint-generic.hpp>
#include <hpp/util/debug.hh>
......@@ -62,7 +62,7 @@ namespace hpp {
bool isHandleOnFreeflyer (const Handle& handle)
{
if (handle.joint()->jointModel().shortname() == se3::JointModelFreeFlyer::classname()
if (handle.joint()->jointModel().shortname() == ::pinocchio::JointModelFreeFlyer::classname()
&& !handle.joint ()->parentJoint ()) {
return true;
}
......
......@@ -549,7 +549,7 @@ namespace hpp {
bool _saturate (vectorIn_t q, vectorOut_t qSat, Eigen::VectorXi& sat)
{
bool ret = false;
const se3::Model& model = robot->model();
const pinocchio::Model& model = robot->model();
for (std::size_t i = 1; i < model.joints.size(); ++i) {
const size_type jnq = model.joints[i].nq();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment