Skip to Content
ROS Programming: Building Powerful Robots
book

ROS Programming: Building Powerful Robots

by Anil Mahtani, Luis Sanchez, Enrique Fernandez, Aaron Martinez, Lentin Joseph
March 2018
Intermediate to advanced content levelIntermediate to advanced
1396 pages
42h 14m
English
Packt Publishing
Content preview from ROS Programming: Building Powerful Robots

The target object to grasp

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Robots with ROS

Programming Robots with ROS

Morgan Quigley, Brian Gerkey, William D. Smart
Machine Learning Design Patterns

Machine Learning Design Patterns

Valliappa Lakshmanan, Sara Robinson, Michael Munn

Publisher Resources

ISBN: 9781788627436Supplemental Content