Mastering ROS for Robotics Programming is an advanced guide of ROS that is very suitable for readers who already have a basic knowledge in ROS. ROS is widely used in robotics companies, universities, and robotics research institutes for designing, building, and simulating a robot model and interfacing it into real hardware. ROS is now an essential requirement for Robotic engineers; this guide can help you acquire knowledge of ROS and can also help you polish your skills in ROS using interactive examples. Even though it is an advanced guide, you can see the basics of ROS in the first chapter to refresh the concepts. It also helps ROS beginners. The book mainly focuses on the advanced concepts of ROS, such as ROS Navigation stack, ROS MoveIt!, ROS plugins, nodelets, controllers, ROS Industrial, and so on.
You can work with the examples in the book without any special hardware; however, in some sections you can see the interfacing of I/O boards, vision sensors, and actuators to ROS. To work with this hardware, you will need to buy it.
The book starts with an introduction to ROS and then discusses how to build a robot model in ROS for simulating and visualizing. After the simulation of robots using Gazebo, we can see how to connect the robot to Navigation stack and MoveIt!. In addition to this, we can see ROS plugins, controllers, nodelets, and interfacing of I/O boards and vision sensors. Finally, we can see more about ROS Industrial and troubleshooting and best practices in ROS.
Chapter 1, Introduction to ROS and Its Package Management, gives you an understanding of the core underlying concepts of ROS and how to work with ROS packages.
Chapter 2, Working with 3D Robot Modeling in ROS, discusses the design of two robots; one is a seven-DOF (Degree of Freedom) manipulator and the other is a differential drive robot.
Chapter 3, Simulating Robots Using ROS and Gazebo, discusses the simulation of seven-DOF arms, differential wheeled robots, and ROS controllers that help control robot joints in Gazebo.
Chapter 4, Using the ROS MoveIt! and Navigation Stack, interfaces out-of-the-box functionalities such as robot manipulation and autonomous navigation using ROS MoveIt! and Navigation stack.
Chapter 5, Working with Pluginlib, Nodelets, and Gazebo Plugins, shows some of the advanced concepts in ROS, such as ROS pluginlib, nodelets, and Gazebo plugins. We will discuss the functionalities and application of each concept and can practice one example to demonstrate its working.
Chapter 6, Writing ROS Controllers and Visualization Plugins, shows how to write a basic ROS controller for PR2 robots and robots similar to PR2. After creating the controller, we will run the controller using the PR2 simulation in Gazebo. We can also see how to create plugin for RViz.
Chapter 7, Interfacing I/O Boards, Sensors, and Actuators to ROS, discusses interfacing some hardware components, such as sensors and actuators, with ROS. We will see the interfacing of sensors using I/O boards, such as Arduino, Raspberry Pi, and Odroid-C1, with ROS.
Chapter 8, Programming Vision Sensors using ROS, Open-CV, and PCL, discusses how to interface various vision sensors with ROS and program it using libraries such as Open Source Computer Vision (Open-CV) and Point Cloud Library (PCL).
Chapter 9, Building and Interfacing Differential Drive Mobile Robot Hardware in ROS, helps you to build autonomous mobile robot hardware with differential drive configuration and interface it with ROS. This chapter aims at giving you an idea of building a custom mobile robot and interfacing it with ROS.
Chapter 10, Exploring the Advanced Capabilities of ROS-MoveIt!, discusses the capabilities of MoveIt! such as collision avoidance, perception using 3D sensors, grasping, picking, and placing. After that, we can see the interfacing of a robotic manipulator hardware with MoveIt!
Chapter 11, ROS for Industrial Robots, helps you understand and install ROS-Industrial packages in ROS. We can see how to develop an MoveIt! IKFast plugin for an industrial robot.
Chapter 12, Troubleshooting and Best Practices in ROS, discusses how to set the ROS development environment in Eclipse IDE, best practices in ROS, and troubleshooting tips in ROS.
You should have a good PC running Linux distribution, preferably Ubuntu 14.04.3 or Ubuntu 15.04.
Readers can use a laptop or PC with a graphics card, and a RAM of 4 GB to 8 GB is preferred. This is actually for running high-end simulation in Gazebo and also for processing Point cloud and for computer vision.
The readers should have sensors, actuators, and the I/O board mentioned in the book and should have the provision to connect them all to their PC.
The readers also need a Git tool installed to clone the packages files.
If you are a Windows user, then it will be good to download Virtual box and set up Ubuntu in that. Working with Virtual box can have issues when we try to interface real hardware with ROS, so it would be good if you could work with the real system itself.
If you are a robotics enthusiast or a researcher who wants to learn more about building robot applications using ROS, this book is for you. In order to learn from this book, you should have a basic knowledge of ROS, GNU/Linux, and C++ programming concepts. The book will also be good for programmers who want to explore the advanced features of ROS.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Create a folder called launch
and inside this folder create the following launch file called start_laser.launch
."
A block of code is set as follows:
#include <ros/ros.h> #include <moveit/robot_model_loader/robot_model_loader.h> #include <moveit/planning_scene/planning_scene.h>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
robot_model_loader::RobotModelLoader robot_model_loader("robot_description");
robot_model::RobotModelPtr kinematic_model = robot_model_loader.getModel();
planning_scene::PlanningScene planning_scene(kinematic_model);
Any command-line input or output is written as follows:
$ sudo apt-get update $ sudo apt-get install ros-indigo-perception
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on camera | driver and tickColor Transformer."
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>
or <[email protected]>
, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can also download chapter codes from https://github.com/qboticslabs/mastering_ros.git.
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/B04782_ColoredImages.pdf.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at <[email protected]>
, and we will do our best to address the problem.