collada_urdf: adding hack to axes to placate OpenRAVE

This commit is contained in:
tfield 2010-03-23 19:34:38 +00:00
parent 2072a78daf
commit d40511d2d5
1 changed files with 5 additions and 1 deletions

View File

@ -522,6 +522,11 @@ public:
axis_z = 0.0; axis_z = 0.0;
} }
// @hack: OpenRAVE appears to flip joint axes
axis_x *= -1.0;
axis_y *= -1.0;
axis_z *= -1.0;
switch (urdf_joint->type) switch (urdf_joint->type)
{ {
case urdf::Joint::REVOLUTE: { case urdf::Joint::REVOLUTE: {
@ -896,7 +901,6 @@ public:
string joint_rotate_sid = string("node_") + joint_sid + string("_axis0"); string joint_rotate_sid = string("node_") + joint_sid + string("_axis0");
joint_rotate->setSid(joint_rotate_sid.c_str()); joint_rotate->setSid(joint_rotate_sid.c_str());
cout << "setting " << urdf_link->parent_joint->name << " to " << node_id << endl;
node_ids_[urdf_link->parent_joint->name] = node_id; node_ids_[urdf_link->parent_joint->name] = node_id;
} }