March 2018
Intermediate to advanced
1396 pages
42h 14m
English
In this case, the target object to grasp is the can of Coke. It is a cylindrical object that we can approximate as a box, which is one of the basic primitives in the MoveIt! planning scene API:
# Retrieve params:
self._grasp_object_name = rospy.get_param('~grasp_object_name', 'coke_can')
# Clean the scene:
self._scene.remove_world_object(self._grasp_object_name)
# Add table and Coke can objects to the planning scene:
self._pose_coke_can = self._add_coke_can(self._grasp_object_name)
The objects in the planning scene receive a unique identifier, which is a string. In this case, coke_can is the identifier for the can of Coke. We remove it from the scene to avoid having duplicate objects, and then we add to the scene. ...