Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detaching attached collision object bugfix #1438

Merged
merged 1 commit into from May 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions moveit_core/planning_scene/src/planning_scene.cpp
Expand Up @@ -1657,8 +1657,6 @@ bool PlanningScene::processAttachedCollisionObjectMsg(const moveit_msgs::Attache
const EigenSTL::vector_Isometry3d& poses = attached_body->getGlobalCollisionBodyTransforms();
const std::string& name = attached_body->getName();

robot_state_->clearAttachedBody(name);

if (world_->hasObject(name))
ROS_WARN_NAMED(LOGNAME,
"The collision world already has an object with the same name as the body about to be detached. "
Expand All @@ -1670,6 +1668,8 @@ bool PlanningScene::processAttachedCollisionObjectMsg(const moveit_msgs::Attache
ROS_DEBUG_NAMED(LOGNAME, "Detached object '%s' from link '%s' and added it back in the collision world",
name.c_str(), object.link_name.c_str());
}

robot_state_->clearAttachedBody(name);
}
if (!attached_bodies.empty() || object.object.id.empty())
return true;
Expand Down