I am working with a 6 DOF robotic arm in MoveIt2 using ROS 2 Foxy. I am using a Stereolabs ZED 2i camera and a point cloud to create an occupancy map using Octomap following the perception pipeline in MoveIt. I want to temporarily disable collisions with Octomap in certain situations. When the robotic arm moves to an approach position I want to take them into account and then when it makes a final move to hit a switch on a wall I want them disabled.
I have tried using the moveit::planning_interface::PlanningSceneInterface API, but I could not find equivalent methods to getAllowedCollisionMatrix() and setAllowedCollisionMatrix() present in MoveIt (ROS 1).
I have searched the MoveIt2 documentation and forums, but have not found a suitable solution. Could you please provide an example of how to disable Octomap collisions in MoveIt2 for ROS 2 Foxy?
Your environment
Description
I am working with a 6 DOF robotic arm in MoveIt2 using ROS 2 Foxy. I am using a Stereolabs ZED 2i camera and a point cloud to create an occupancy map using Octomap following the perception pipeline in MoveIt. I want to temporarily disable collisions with Octomap in certain situations. When the robotic arm moves to an approach position I want to take them into account and then when it makes a final move to hit a switch on a wall I want them disabled.
I have tried using the moveit::planning_interface::PlanningSceneInterface API, but I could not find equivalent methods to getAllowedCollisionMatrix() and setAllowedCollisionMatrix() present in MoveIt (ROS 1).
I have searched the MoveIt2 documentation and forums, but have not found a suitable solution. Could you please provide an example of how to disable Octomap collisions in MoveIt2 for ROS 2 Foxy?
My sensors_3d.yaml file is configured as follows:
My move_group.launch file has the following configuration:
To perform the moves, I am following the example of moveit_cpp_example as follows: