How to disable collision between a link and a newly added collision object?
I have a scene with UR10 arm mounted on wall. I also have a table. I have this entire scene configured using moveit setup assistant.
I launch the scene. I then run a node(part_spawner) which spawns a mesh on the table(I am doing this by loading a mesh and adding this mesh as a collision object to planning_scene_interface). My rviz screen properly loads it and spawns it, as expected rviz also shows that there is a collision between the table and the mesh. But when I check for the collisions in the same node(part_spawner) using planning_scene.CheckCollision(collision_request, collision_result, copied_state, allowed_collision_matrix)
, the collision_result does not return any contact between table and mesh. I'm guessing this should ideally return a pair of contact (table, mesh)
My goal is to manually disable this specific collision by adding the pair (table, mesh) to the Allowed Collision Matrix using allowedCollisionMatrix.setEntry('table', 'mesh', true)
. But the collision is not being detected in the first place.
Is this the right way of doing it?
Is there a better way to do it?