Skip to content

Commit

Permalink
Suppress warning message for base link and static links
Browse files Browse the repository at this point in the history
Signed-off-by: Timon Engelke <timon.engelke@online.de>
  • Loading branch information
timonegk committed Jul 14, 2022
1 parent 3351466 commit 30988bf
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 " << link->name << " 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 30988bf

Please sign in to comment.