The planning scene

The first thing we have to do is define the objects in the environment since MoveIt! needs this information to make the arm interact with an object without colliding with it, and to reference them to do certain actions. Here, we will consider the following scene:

Environment with manipulator and objects in Gazebo

This scene has the arm with the gripper and the RGB-D sensor as the robotic manipulator. There is also a table and a can of Coke; the flat support surface and the cylindrical object, respectively. You can run this scene in Gazebo with the following command:

    $ roslaunch rosbook_arm_gazebo rosbook_arm_grasping_world.launch  

This scene is just a simple example that models a real use case. However, we still have to tell MoveIt! about the planning scene. At this moment, it only knows about the robotic manipulator. We have to tell it about the table and the can of Coke. This can be done either by using 3D perception algorithms, which take the point cloud of the RGB-D sensor, or programmatically, by specifying the pose and shape of the objects with some basic primitives. We will see how we can define the planning scene following the latter approach.

The code to perform the pick and place task is the pick_and_place.py Python program located in the scripts folder of the rosbook_arm_pick_and_place package. The important part to create the planning scene is in the __init__ method of the CokeCanPickAndPlace class:

self._scene = PlanningSceneInterface() 

In the following sections, we will add the table and the can of Coke to this planning scene.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.137.64