O'Reilly logo

Mastering ROS for Robotics Programming - Second Edition by Jonathan Cacace, Lentin Joseph

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required