Chapter 20. Tools
Efficient software development requires good developer tools. Where would you be without your favorite editor, version control system, or testing framework? When developing robotics software, we of course rely on those tools, but we also add some new ones. These ROS-specific developer tools are designed to help you work with your robotics applications, including starting and stopping, introspection, and testing.
In this chapter, we’ll cover commonly used ROS tools, explaining when and
how to use each one. We will leave out the following tools, which are
covered in the context of debugging in Chapter 21:
rosbag
, rqt_bag
, rqt_graph
, and rqt_plot
.
The Master and Friends: roscore
We first encountered roscore
much earlier in this book
(see “roscore”), and have used it extensively since then. But
it will be helpful to understand what exactly it does. When you run
roscore
, which is your first step in bringing up a ROS system, you’re
really starting three different tools:
-
The master, which handles the name service.
-
The parameter server, which holds key/value parameter data (see “Parameters: rosparam”).
-
The
rosout
node, which aggregates debug messages from all other nodes (see “/rosout Versus /rosout_agg”).
The first thing that a ROS node does on startup is contact the master to register itself. That’s why, if you try to start a node without a master, you’ll get a warning, like this:
user@hostname$ python -c "import rospy; rospy.init_node('my_node')" Unable ...
Get Programming Robots with ROS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.