Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ok, I know have gotten a simple example to work. I discarded everything I had and wrote a simple Python node, that can successfully attach an object and remove it again.

I guess it was indeed poor understanding of how the arm_navigation stack works, as it seems like the following is the procedure that works.

For attaching:

  • Add CollisionObject to collision_objects in the planning scene using the /environment_server/set_planning_scene_diff service
  • Publish CollisionObject on the /collision_object topic
  • Publish AttachedCollisionObject on the /attached_collision_object topic

For removing attached objects:

  • Using the same topic and message as point 3 above, with the following settings:

    rm_object = arm_navigation_msgs.msg.AttachedCollisionObject()
    rm_object.link_name = rm_object.REMOVE_ALL_ATTACHED_OBJECTS
    rm_object.object.operation.operation = rm_object.object.operation.REMOVE
    
  • The planning scene then needs to be refreshed, as @bit-pirate pointed out. Do this be sending an empty GetPlanningSceneRequest to environment_server/set_planning_scene_diff