Skip to content
Snippets Groups Projects
Commit 7607927e authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

fix in urdf model processing: cylinder axis definition differ in coin and urdf...

fix in urdf model processing: cylinder axis definition differ in coin and urdf (thanks to Markus Sigg for sending the fix)
parent 163b1d22
No related branches found
No related tags found
No related merge requests found
......@@ -234,6 +234,7 @@ namespace VirtualRobot
{
boost::shared_ptr<Cylinder> c = boost::dynamic_pointer_cast<Cylinder>(g);
res = factory->createCylinder(c->radius * scale, c->length * scale);
}
break;
......@@ -252,6 +253,11 @@ namespace VirtualRobot
if (res)
{
Eigen::Matrix4f p = convertPose(pose);
if (g->type == urdf::Geometry::CYLINDER)
{
// inventor and urdf differ in the conventions for cylinders
p = p * MathTools::axisangle2eigen4f(Eigen::Vector3f::UnitX(), M_PI_2);
}
factory->applyDisplacement(res, p);
}
......
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