Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Haschke <[email protected]>
  • Loading branch information
sjahr and rhaschke authored Aug 26, 2024
1 parent 28a4975 commit 4b173e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ collision_detection::Contact* processResult(ContactTestData& cdata, collision_de

return &(dr.back());
}
RCLCPP_ERROR(getLogger(), "Result cannot be processed. Returning nullptr, this should never happen!");
RCLCPP_DEBUG(getLogger(), "Result cannot be processed. Returning nullptr, this should never happen!");
return nullptr;
}

Expand Down
2 changes: 1 addition & 1 deletion moveit_core/robot_model/src/robot_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ const LinkModel* RobotModel::getRigidlyConnectedParentLinkModel(const LinkModel*
{
if (!link)
{
RCLCPP_ERROR(getLogger(), "Cannot determine rigidly connected parent link because input link is nullptr");
RCLCPP_DEBUG(getLogger().get_child("getRigidlyConnectedParentLink", "Link is NULL");
return link;
}
const moveit::core::LinkModel* parent_link = link->getParentLinkModel();
Expand Down
11 changes: 4 additions & 7 deletions moveit_core/robot_state/src/robot_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,18 +926,15 @@ const LinkModel* RobotState::getRigidlyConnectedParentLinkModel(const std::strin
std::string object{ frame.substr(0, idx) };
if (!hasAttachedBody(object))
{
RCLCPP_DEBUG(getLogger(),
"Cannot find rigidly connected parent link for frame '%s' because there is no attached body.",
frame.c_str());
RCLCPP_DEBUG(getLogger().get_child("getRigidlyConnectedParentLink",
"Attached object '%s' for frame '%s' does not exist.", object.c_str(), frame.c_str());
return nullptr;
}
auto body{ getAttachedBody(object) };
if (!body->hasSubframeTransform(frame))
{
RCLCPP_DEBUG(getLogger(),
"Cannot find rigidly connected parent link for frame '%s' because the transformation to the parent "
"link is unknown.",
frame.c_str());
RCLCPP_DEBUG(getLogger().get_child("getRigidlyConnectedParentLink",
"Body '%s' does not have subframe '%s', object.c_str(), frame.c_str());
return nullptr;
}
link = body->getAttachedLink();
Expand Down

0 comments on commit 4b173e7

Please sign in to comment.