We can add a collision object to the MoveIt! planning scene, and we can see how the motion-planning works. For adding a collision object, we can use mesh files, which can directly be imported from the MoveIt! interface, and can be added by writing a ROS node using MoveIt! APIs.
We will first discuss how to add a collision object using the ROS node:
- In the node add_collision_object.cpp, which is inside the seven_dof_arm_test/src folder, we are starting a ROS node and creating an object of moveit::planning_interface::PlanningSceneInterface, which can access the planning scene of MoveIt! and perform any action on the current scene. We will now add a sleep of 5 seconds to wait for the planningSceneInterface ...