March 2018
Intermediate to advanced
1396 pages
42h 14m
English
We proceed similarly to create the object for the table, which is also approximated by a box. Therefore, we simply remove any previous object and add the table. In this case, the object name is table:
# Retrieve params:
self._table_object_name = rospy.get_param('~table_object_name', 'table')
# Clean the scene: self._scene.remove_world_object(self._table_object_name) # Add table and Coke can objects to the planning scene: self._pose_table = self._add_table(self._table_object_name)
The _add_table method adds the table to the planning scene:
def _add_table(self, name): p = PoseStamped() p.header.frame_id = self._robot.get_planning_frame() p.header.stamp = rospy.Time.now() p.pose.position.x = 1.0 p.pose.position.y = 0.0 ...