ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Do we need to remove collision object before applyAttachedCollisionObject?

asked 2020-05-30 07:22:34 -0500

cv_ros_user gravatar image

updated 2020-05-30 07:28:26 -0500

Currently, when I want to attach an object to the robot, I am just doing:

  • applyCollisionObject() to add multiple objects in the planning scene
  • [some robot operations]
  • applyAttachedCollisionObject() to attach the given object to the robot end-effector using the object current pose

When looking at the tutorial, it is written:

Attaching an object requires two operations

    Removing the original object from the environment
    Attaching the object to the robot

The tutorial uses planning_scene_diff_publisher publish call while I would like to hold to the planning_scene_interface and have synchronous update.

This looks counterintuitive for me and I want to be sure that the object must be removed beforehand, using for instance applyCollisionObject() with REMOVE.

Not removing the object from the planning scene seems to work in my case (visually in RViz). But maybe this is not the correct approach and collision issue can occur later with object present both in the world and attached to the robot maybe?

For instance, move_group.attachObject() does not remove the collision object beforehand, see the code.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-04 12:56:12 -0500

cv_ros_user gravatar image

My answer

No, it is not needed to remove the collision object before calling applyAttachedCollisionObject(). See this tutorial code.

This may sound like a dumb question, but I am not the only one misinterpreting the tutorial (when using the planning_scene_interface API). See for instance.

edit flag offensive delete link more

Question Tools



Asked: 2020-05-30 07:22:34 -0500

Seen: 538 times

Last updated: Jun 04 '20