Disable collisions between specified links and Octomap
Hi all,
I am using a manipulator with a suction gripper to pick up objects from the clutter. Planning scene and picking items are visible to the depth camera. I am using MoveIt! with occupancy_map_monitor plugin to generate Octomaps and plan / verify trajectory against potential collisions.
The problem occurs during the picking when I actually want to enter a collision between the suction cup and picked item. I do not want to disable collision check or clear Octomap completely for grasping, as some other collisions might occur.
My current solution involves additional prismatic joint in URDF, controlled via "/joint_states" topic. This joint can "extend" or "compress" suction cup collisions... But this solution seems to be an overkill, and might not scale for another purpose.
I tried to find a simpler solution, such as temporary disabling collisions between specified URDF link and Octomap, but I could not find any. Maybe someone knows a better way?
You can probably do this using planning_scene::PlanningScene::getAllowedCollisionMatrixNonConst() and then configuring collision checking for your suction cup link and the octomap.
See also Programatically disable self-collision checking on move_group? in the old
moveit
Google group.Great thanks for quick response!
#1 As I understand, AllowedCollisionMatrix allows me to disable/enable collision check between specified links. But can Octomap be treated as a link?
#2 Solution presented on
moveit
group cuts some parts of Octomap that collides with newly added scene object. But Octomap is updated only with some pre-defined frequency.This way I always have to wait until next update before planning movement. This introduces "expensive" delay between collision update request and planning.IIUC, the
moveit
group discussion discusses the collision matrix approach as the first option.re: octomap as link: the matrix actually contains information about collision objects. Every link in your urdf (with geometry) is considered a collision object. The octomap -- although dynamically added -- is also a collision object (a single one iirc).
I didn't post this as an answer as it's been a while since I've worked with this, but this is what I remember.
Thanks again gvdhoorn. For the next few weeks, I will not be able to dive deeper into this problem. But I will share a better solution if I find it.