Skip to content

Commit

Permalink
Show link names in inertia error message (#874)
Browse files Browse the repository at this point in the history
* Show link names in inertia error message

* Suppress warning message for base link and static links

Signed-off-by: Timon Engelke <timon.engelke@online.de>
  • Loading branch information
timonegk committed Aug 31, 2022
1 parent 4e976dc commit 4df5aa3
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -885,9 +885,12 @@ void RobotLink::createInertia(const urdf::LinkConstSharedPtr & link)
ignition::math::Quaterniond box_rot;
if (!mass_matrix.EquivalentBox(box_scale, box_rot)) {
// Invalid inertia, load with default scale
RVIZ_COMMON_LOG_ERROR_STREAM(
"The link is static or has unrealistic "
"inertia, so the equivalent inertia box will not be shown.\n");
if (link->parent_joint && link->parent_joint->type != urdf::Joint::FIXED) {
// Do not show error message for base link or static links
RVIZ_COMMON_LOG_ERROR_STREAM(
"The link " << link->name << " is has unrealistic "
"inertia, so the equivalent inertia box will not be shown.\n");
}
return;
}
Ogre::Vector3 translate(
Expand Down

0 comments on commit 4df5aa3

Please sign in to comment.