Adding a collision object to MoveIt!

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:

  1. 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 ...

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.