Skip to content

Commit

Permalink
PS: Warn when user tried to remove a nonexistent object
Browse files Browse the repository at this point in the history
  • Loading branch information
v4hn committed Sep 2, 2021
1 parent cdac8ac commit 98cf3ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions moveit_core/planning_scene/src/planning_scene.cpp
Expand Up @@ -1827,7 +1827,11 @@ bool PlanningScene::processCollisionObjectRemove(const moveit_msgs::CollisionObj
else
{
if (!world_->removeObject(object.id))
{
ROS_WARN_STREAM_NAMED(LOGNAME,
"Tried to remove world object '" << object.id << "', but it does not exist in this scene.");
return false;
}

removeObjectColor(object.id);
removeObjectType(object.id);
Expand Down

0 comments on commit 98cf3ed

Please sign in to comment.