I was wondering if the Moveit API supports collision checking between two collision objects in a planning scene. The robot state does not come into the picture here - only two collision objects of type "moveit_msgs::CollisionObject".
I am working with ROS Melodic on Ubuntu 18.04 running in a docker container.
Here are some of my ideas so far:
I tried digging through code related AllowedCollisionMatrix. It has methods such as "setDefaultEntry". As far as I understood, it useful only for ignoring collision between robot and a specific object in the scene.
A hacky solution is to put the robot in a known non-colliding state. Then, temporarily attach "CollisionObjectA" to the robot. And, see if it collides with "CollisionObjectB" using the existing functions in the API. This solution seems like the easiest but it is also ugly.
Define "CollisionObjectA" as link attached to a 6 DOF joint co-located at the root of the robot. Make a planning group for the 6 DOF joint. Set the 6 DOF state of the "CollisionObjectA" and query collision via the existing API (i.e., isValid ). Though it theoretically makes sense, I guess that there can be complications when solving IK for other planning groups.
Instantiate FCL collision manager object on my own and perform the necessary collision checks. This has the drawback of ensuring the collision object A and B in planning scene are in sync with the same in my FCL collision manager.
If anybody can shed light on how collision between two collision objects can be detected/queried, it would be really helpful.
Originally posted by pradeepr on ROS Answers with karma: 23 on 2020-05-08
Post score: 1