|I recently finished reading Programming Robots with ROS: A Practical Introduction to the Robot Operating System by Quigley, Gerkey and Smart. It is one of the O’Reilly books, for which to some one of the most important parts of the book is the animal on the cover. On this book, it is a bat.
I found the book to be a good guide and explanation of the architecture and some of the underpinnings of ROS. There are several well thought out examples which takes the reader from the theory of how ROS works to some of the tricks of the trade of actual implementations. While not an exhaustive guide to ROS, the book provides an extremely useful guide for understanding how to actually get things done.
As you may recall from earlier articles on building the JetsonBot, the JetsonBot runs ROS on the Jetson TK1 Development Kit to control the robot and provide user interfaces. In the articles, the reader was basically thrown in the water to learn to swim, there wasn’t much background about ROS or how to actually use it beyond the JetsonBot specific implementation.
This is typical on how a lot of these types of projects start off. As they say, “you don’t know what you don’t know” when you get started. It is not until you get into the project that people generally start to understand the complexity of the undertaking. Software is particularly difficult this way, since there is really no affordance to tell the complexity of the underlying architecture, data, algorithms and such. This is especially true in distributed systems where all the code or data can be shared across many computers. With most electrical or mechanical systems you can generally look at them and tell if something is complex, with software that is not the case.
Yet understanding the architecture of a system is very important for many applications, certainly ROS is one of those. Typical documentation for a programming API usually includes such things as function calls, description of small data structures needed, parameters and so on, but rarely explains the overall architecture of the system. Typically each function has a manual page of some sort along with some very terse language on usage, nearly always unlike the way an actual person would describe it. Sometimes there are wikis to help organize things, and usually some equivalent to ‘Hello World’ sample code. However, those tools don’t really tell someone how to actually use the system; most programmers now just try to find code on Github that kinda sort does what they want to do (warts and all) and use stackoverflow to help get over any hurdles they encounter.
Here’s where a book like “Programming Robots with ROS” is a valuable tool. If you’re a beginner or intermediate ROS programmer, the book provides a good background for getting started. If you have played around with the code before, the book helps put the concepts behind the code into perspective. ROS is a distributed system, which is probably one of the most difficult software architectures to get your head around. The book gives a very nice explanation of how each part of the system interacts with the others, and explains not only the architecture but also why the architecture was chosen and built that way.
If you’re a software person and read the book, most concepts will be familiar with the usual terminology and domain specific lingo that you’ll have to translate. If you’re not a software person, the concepts are explained in a straightforward enough manner that you can begin working with it.
In either case, you’ll learn how ROS uses publish/subscribe mechanisms for distribution and how to differentiate between Topics, Services and Actions and under what circumstances to use each accordingly. There are also description of all the tools provided for working within the system, and which situations best leverage them. Building upon these basic concepts, you’ll also see how different subsystems can be added using these mechanisms to build robots such as follower robots, patrol robots and stockroom robots.
Most of the examples in the book are written in Python. Being able to read Python is helpful but not mandatory as the explanation of the sample code is quite thorough.
ROS is a large program, and one of the interesting things is that there are robot simulators available which provide people with the opportunity to build virtual robots, and then test them out in simulated virtual worlds. In other words, you don’t have to actually physically build the robot to test out the software for the robot and examine the behavior. You can just simulate it. Granted, that’s not as much fun as actually having a robot, but it is much less expensive and faster.
The only real issue I had with the book is that the pictures in the book are in black and white. Unfortunately there are a lot of callouts to color references in the images that more than likely exist on the electronic versions. Since most of the images are from examples which are work through (you’ll be able to have them running on a computer in front of you) it’s probably just a nuisance for most people.
Highly Recommended, buy it if you are into ROS.