Skip to content

Commit

Permalink
Fix application of link pose on inertial/visual/collision
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
  • Loading branch information
sloretz committed Oct 29, 2020
1 parent c84405d commit 6582d52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdformat_urdf/src/sdformat_urdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ sdformat_urdf::convert_link(
urdf_link->inertial = std::make_shared<urdf::Inertial>();
urdf_link->inertial->mass = sdf_inertia.MassMatrix().Mass();
// URDF doesn't have link pose concept, so add SDF link pose to inertial
urdf_link->inertial->origin = convert_pose(sdf_inertia.Pose() * link_pose);
urdf_link->inertial->origin = convert_pose(link_pose * sdf_inertia.Pose());
urdf_link->inertial->ixx = sdf_inertia.MassMatrix().Ixx();
urdf_link->inertial->ixy = sdf_inertia.MassMatrix().Ixy();
urdf_link->inertial->ixz = sdf_inertia.MassMatrix().Ixz();
Expand Down Expand Up @@ -370,7 +370,7 @@ sdformat_urdf::convert_link(
return nullptr;
}
// URDF doesn't have link pose concept, so add SDF link pose to visual
urdf_visual->origin = convert_pose(link_pose + visual_pose);
urdf_visual->origin = convert_pose(link_pose * visual_pose);

urdf_visual->geometry = convert_geometry(*sdf_visual->Geom(), errors);
if (!urdf_visual->geometry) {
Expand Down Expand Up @@ -442,7 +442,7 @@ sdformat_urdf::convert_link(
return nullptr;
}
// URDF doesn't have link pose concept, so add SDF link pose to collision
urdf_collision->origin = convert_pose(link_pose + collision_pose);
urdf_collision->origin = convert_pose(link_pose * collision_pose);

urdf_collision->geometry = convert_geometry(*sdf_collision->Geom(), errors);
if (!urdf_collision->geometry) {
Expand Down

0 comments on commit 6582d52

Please sign in to comment.