O'Reilly logo

Programming Robots with ROS by William D. Smart, Brian Gerkey, Morgan Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required