Icraoss09 ROS
Icraoss09 ROS
Morgan Quigley∗ , Brian Gerkey† , Ken Conley† , Josh Faust† , Tully Foote† ,
Jeremy Leibs‡ , Eric Berger† , Rob Wheeler† , Andrew Ng∗
∗ Computer Science Department, Stanford University, Stanford, CA
† Willow Garage, Menlo Park, CA
‡ Computer Science Department, University of Southern California
However, graphs are usually far more complex, often con- B. Logging and playback
taining cycles and one-to-many or many-to-many connec- Research in robotic perception is often done most con-
tions. veniently with logged sensor data, to permit controlled
comparisons of various algorithms and to simplify the ex- get tedious. To allow for “packaged” functionality such as a
perimental procedure. ROS supports this approach by pro- navigation system, ROS provides a tool called roslaunch,
viding generic logging and playback functionality. Any ROS which reads an XML description of a graph and instantiates
message stream can be dumped to disk and later replayed. the graph on the cluster, optionally on specific hosts. The
Importantly, this can all be done at the command line; it end-user experience of launching the navigation system then
requires no modification of the source code of any pieces of boils down to
software in the graph.
roslaunch [Link]
For example, the following network graph could be
quickly set up to collect a dataset for visual-odometry and a single Ctrl-C will gracefully close all five processes.
research: This functionality can also significantly aid sharing and reuse
of large demonstrations of integrative robotics research, as
the set-up and tear-down of large distributed systems can be
robot camera easily replicated.
D. Collaborative Development
Due to the vast scope of robotics and artificial intelligence,
logger visualizer collaboration between researchers is necessary in order to
build large systems. To support collaborative development,
the ROS software system is organized into packages. Our
definition of “package” is deliberately open-ended: a ROS
The resulting message dump can be played back into a package is simply a directory which contains an XML file
different graph, which contains the node under development: describing the package and stating any dependencies.
A collection of ROS packages is a directory tree with ROS
packages at the leaves: a ROS package repository may thus
logger vision research visualizer contain an arbitrarily complex scheme of subdirectories. For
example, one ROS repository has root directories including
“nav,” “vision,” and “motion planning,” each of which con-
tains many packages as subdirectories.
As before, node instantiation can be performed simply by ROS provides a utility called rospack to query and
launching a process; it can be done at the command line, in inspect the code tree, search dependencies, find packages
a debugger, from a script, etc. by name, etc. A set of shell expansions called rosbash is
To facilitate logging and monitoring of systems distributed provided for convenience, accelerating command-line navi-
across many hosts, the rosconsole library builds upon the gation of the system.
Apache project’s log4cxx system to provide a convenient The rospack utility is designed to support simultane-
and elegant logging interface, allowing printf-style diag- ous development across multiple ROS package repositories.
nostic messages to be routed through the network to a single Environment variables are used to define the roots of local
stream called rosout. copies of ROS package repositories, and rospack crawls
C. Packaged subsystems the package trees as necessary. Recursive builds, supported
by the rosmake utility, allow for cross-package library
Some areas of robotics research, such as indoor robot
dependencies.
navigation, have matured to the point where “out of the
The open-ended nature of ROS packages allows for great
box” algorithms can work reasonably well. ROS leverages
variation in their structure and purpose: some ROS packages
the algorithms implemented in the Player project to provide
wrap existing software, such as Player or OpenCV, au-
a navigation system, producing this graph:
tomating their builds and exporting their functionality. Some
packages build nodes for use in ROS graphs, other packages
provide libraries and standalone executables, and still others
robot laser map
provide scripts to automate demonstrations and tests. The
packaging system is meant to partition the building of ROS-
based software into small, manageable chunks, each of which
localization
can be maintained and developed on its own schedule by its
own team of developers.
planner
At time of writing, several hundred ROS packages exist
across several publicly-viewable repositories, and hundreds
more likely exist in private repositories at various institutions
and companies. The ROS core is distributed as its own
Although each node can be run from the command line, re- package repository in Sourceforge:
peatedly typing the commands to launch the processes could [Link]
However, the ros repository includes only the base ROS topic, and service names, without requiring any modification
communications infrastructure and graph-management tools. to the code of the node or cluster. The following graph
Software which actually builds robotic systems using ROS shows a hierarchical multi-robot control system constructed
is provided in a second repository, also on Sourceforge: by simply instantiating multiple navigation stacks, each in
[Link] their own namespace:
This repository contains many useful tools and libraries, such
as those discussed in this paper.
E. Visualization and Monitoring
While designing and debugging robotics software, it often
becomes necessary to observe some state while the system
is running. Although printf is a familiar technique for
debugging programs on a single machine, this technique can
be difficult to extend to large-scale distributed systems, and
can become unwieldly for general-purpose monitoring.
Instead, ROS can exploit the dynamic nature of the
connectivity graph to “tap into” any message stream on
the system. Furthermore, the decoupling between publishers
and subscribers allows for the creation of general-purpose
visualizers. Simple programs can be written which subscribe
to a particular topic name and plot a particular type of data,
such as laser scans or images. However, a more powerful
concept is a visualization program which uses a plugin
architecture: this is done in the rviz program, which is
distributed with ROS. Visualization panels can be dynami- The previous graph was automatically generated by the
cally instantiated to view a large variety of datatypes, such rxgraph tool, which can inspect and monitor any ROS
as images, point clouds, geometric primitives (such as object graph at runtime. Its output renders nodes as ovals, topics as
recognition results), render robot poses and trajectories, etc. squares, and connectivity as arcs.
Plugins can be easily written to display more types of data.
A native ROS port is provided for Python, a dynamically-
typed language supporting introspection. Using Python, a G. Transformations
powerful utility called rostopic was written to filter
messages using expressions supplied on the command line, Robotic systems often need to track spatial relationships
resulting in an instantly customizable “message tap” which for a variety of reasons: between a mobile robot and some
can convert any portion of any data stream into a text stream. fixed frame of reference for localization, between the various
These text streams can be piped to other UNIX command- sensor frames and manipulator frames, or to place frames on
line tools such as grep, sed, and awk, to create complex target objects for control purposes.
monitoring tools without writing any code. To simplify and unify the treatment of spatial frames,
Similarly, a tool called rxplot provides the functionality a transformation system has been written for ROS, called
of a virtual oscilloscope, plotting any variable in real-time as tf. The tf system constructs a dynamic transformation
a time series, again through the use of Python introspection tree which relates all frames of reference in the system.
and expression evaluation. As information streams in from the various subsystems of
the robot (joint encoders, localization algorithms, etc.), the
F. Composition of functionality tf system can produce streams of transformations between
In ROS, a “stack” of software is a cluster of nodes that nodes on the tree by constructing a path between the desired
does something useful, as was illustrated in the navigation nodes and performing the necessary calculations.
example. As previously described, ROS is able to instantiate For example, the tf system can be used to easily generate
a cluster of nodes with a single command, once the cluster point clouds in a stationary “map” frame from laser scans
is described in an XML file. However, sometimes multiple received by a tilting laser scanner on a moving robot. As
instantiations of a cluster are desired. For example, in multi- another example, consider a two-armed robot: the tf system
robot experiments, a navigation stack will be needed for can stream the transformation from a wrist camera on one
each robot in the system, and robots with humanoid torsos robotic arm to the moving tool tip of the second arm of the
will likely need to instantiate two identical arm controllers. robot. These types of computations can be tedious, error-
ROS supports this by allowing nodes and entire roslaunch prone, and difficult to debug when coded by hand, but the
cluster-description files to be pushed into a child namespace, tf implementation, combined with the dynamic messaging
thus ensuring that there can be no name collisions. Essen- infrastructure of ROS, allows for an automated, systematic
tially, this prepends a string (the namespace) to all node, approach.
V. C ONCLUSION
We have designed ROS to support our philosophy of
modular, tools-based software development. We anticipate
that its open-ended design can be extended and built upon by
others to build robot software systems which can be useful
to a variety of hardware platforms, research settings, and
runtime requirements.
ACKNOWLEDGEMENTS
We thank the fledgeling ROS user community for their
feedback and contributions, especially Rosen Diankov (au-
thor of the ROS Octave library) and Bhaskara Marthi (author
of the ROS LISP library).
R EFERENCES
[1] J. Kramer and M. Scheutz, “Development environments for au-
tonomous mobile robots: A survey,” Autonomous Robots, vol. 22,
no. 2, pp. 101–132, 2007.
[2] M. Quigley, E. Berger, and A. Y. Ng, “STAIR: Hardware and Software
Architecture,” in AAAI 2007 Robotics Workshop, Vancouver, B.C,
August, 2007.
[3] K. Wyobek, E. Berger, H. V. der Loos, and K. Salisbury, “Towards a
personal robotics development platform: Rationale and design of an
intrinsically safe personal robot,” in Proc. of the IEEE Intl. Conf. on
Robotics and Automation (ICRA), 2008.
[4] M. Montemerlo, N. Roy, and S. Thrun, “Perspectives on standardiza-
tion in mobile robot programming: The Carnegie Mellon Navigation
(CARMEN) Toolkit,” in Proc. of the IEEE/RSJ Intl. Conf. on Intelli-
gent Robots and Systems (IROS), Las Vegas, Nevada, Oct. 2003, pp.
2436–2441.
[5] A. Makarenko, A. Brooks, and T. Kaupp, in Proc. of the IEEE/RSJ
Intl. Conf. on Intelligent Robots and Systems (IROS), Nov. 2007.
[6] R. T. Vaughan and B. P. Gerkey, “Reusable robot code and the
Player/Stage Project,” in Software Engineering for Experimental
Robotics, ser. Springer Tracts on Advanced Robotics, D. Brugali, Ed.
Springer, 2007, pp. 267–289.
[7] G. Bradski and A. Kaehler, Learning OpenCV, Sep. 2008.
[8] R. Diankov and J. Kuffner, “The robotic busboy: Steps towards
developing a mobile robotic home assistant,” in Intelligent Autonomous
Systems, vol. 10, 2008.
[9] J. Jackson, “Microsoft robotics studio: A technical introduction,” in
IEEE Robotics and Automation Magazine, Dec. 2007, [Link]
[Link]/en-us/robotics.
[10] O. Michel, “Webots: a powerful realistic mobile robots simulator,” in
Proc. of the Second Intl. Workshop on RoboCup. Springer-Verlag,
1998.