UP | HOME

The ROS Ecosystem

Introduction

The ROS ecosystem consists of a collection of tools, software, and documentation. These are used to describe, implement, and inspect a ROS program, which consists of multiple processes (called nodes) that run in parallel and communicate with each other using inter-process communication.

As a federated system, the components of a ROS system can be supplied by anybody. While core ROS developers create and maintain components, standards, infrastructure, and documentation used by everybody else, the majority of ROS components are contributed by members of the community. As anybody can contribute to ROS there is wide variance in package quality, usability and documentation.

Packages

Packages are the basic organization unit for ROS components.

  • Packages are created from source code and data (e.g., python files, C++ files, configuration files, interface descriptions).
  • Packages are distributed either as source code (e.g., as a git repository or a tarball) or as a binary file (e.g., a debian (.deb) file).
  • Some packages rely on other packages to function. If package A depends on packages B and C then packages B and C are dependencies of package A.
  • Many ROS packages depend on packages that are distributed with Ubuntu.
    • Packages distributed with the operating system (e.g., Ubuntu) are called system dependencies.

Installation

There are a few ways to install and use packages in ROS:

  1. ROS provides a central apt repository where packages released for the ROS distribution (e.g., lyrical) can be downloaded using apt.
    • sudo apt install ros-lyrical-<package-name>, where <package-name> is the package name where the underscores (_) have been changed to dashes (-).
    • This method is the most common for installing ROS packages and is preferred.
  2. You can download the source code for the package, build it, and use it:
    • This method is used if the binary package is unavailable or you wish to modify a package.
  3. You can use a language-specific package manager (e.g., pip for python).
    • If you wish to publish a ROS package and have it included in the ROS distribution, you must also package any dependencies that are not available via apt.
    • It is also possible to add a dependency on a pip package; however, there are complications due to pip no longer installing packages system-wide without the --break-system-packages flag.
  4. The ROS Index provides information on all ROS packages and dependencies, including information about:
    • What versions of ROS the package is released for.
    • The location of the source code.
    • Package documentation.

Metadata

  • Metadata about ROS packages is stored in a manifest file called package.xml (sometimes referred to as the package manifest).
    • Metadata includes dependency information, author information, a package description, etc.
  • You can view the package manifest for any ROS package using ros2 pkg xml <package>, where <package> is the package's name.
    • ros2 pkg --help provides a list of other useful pkg commands.
    • ros2 pkg is part of the ros2cli package, the ROS 2 Command Line Interface.
  • The format for package.xml is specified in REP 0149.
  • In ROS 2, meta information about packages is stored in the location <prefix>/share/ament_index
    • The <prefix> directory is the location where the package is installed (for your main ROS installation it is /opt/ros/lyrical)
  • The structure of the ament_index directory provides information about the package. Development of this index is ongoing.

rosdep

  • ROS maintains a tool called rosdep which enables ROS packages to specify their dependencies on other ROS packages and on system dependencies.
  • Every system dependency in the ROS ecosystem is given a name that is used across all operating systems that ROS supports
  • Because every Linux Distribution names its packages differently, rosdep maps ROS names for system dependencies to the appropriate name on the underlying supported operating system
  • The rosdistro repository maintains a list of system dependencies that ROS packages can use.
  • rosdep is useful if you are installing packages from source code and want to download their dependencies first.
  • rosdep tutorial

ROS Environment

  • Collections of ROS packages are built and installed under a directory called a workspace
  • The packages installed via apt are located in the workspace located at /opt/ros/<version> (e.g., /opt/ros/yrical)
    • This scheme prevents conflicts with OS packages that might have the same name and also enables installing multiple ROS versions on the same machine
  • By default ROS 2 commands are not on the PATH and cannot be found
  • At least one ROS 2 workspace must be "sourced" before ROS 2 can be used
  • When you installed ROS 2 you added the line source /opt/ros/lyrical/setup.bash to the ~/.bashrc file.
    • This line "sources" the workspace, putting the ros2 commands on the path and setting everything up so you can use ROS
    • If the ros2 command is not found, it likely means that the workspace has not been sourced
  • The first workspace you source (e.g., at /opt/ros/lyrical) is called the underlay
  • Subsequent workspaces you source (e.g., for your project) are overlays
  • The ROS2 Configuring Environment Tutorial goes through the process of setting up the ROS 2 environment

Documentation

ROS has centralized documentation for its core packages as well as providing infrastructure for individuals to provide documentation for their own packages. As an open source project, users are encouraged to contribute to the documentation.

  • https://docs.ros.org: The main user documentation for ROS
  • https://index.ros.org The ROS index tracks ROS packages and links to documentation for them.
    • This page is extremely useful and should be your first stop when trying to learn about a package.
    • It allows search based on ROS distribution
    • Search for "system dependencies" (e.g., packages that are downloaded from Ubuntu)
    • Search for "ROS dependencies" (i.e., packages that are downloaded from ROS servers).
    • Currently documentation for lyrical is mostly not published, use rolling or kilted instead.
  • https://repo.ros2.org/status_page/ros_lyrical_default.html: The status page showing what packages from lyrical are released
    • Released packages are downloadable via apt
  • ROS Enhancement Proposals (REP) - Documents ROS design decisions and best practices.
  • https://robotics.stackexchange.com - The preferred Q & A website for asking ROS questions.
  • Built-in documentation: Most ros tools accept a --help or -h argument to display their help.
  • External Documentation: Sometimes the package itself has an external documentation website (often linked on the ROS wiki, often on the repository page).
  • Some of the tools used in ROS are actually maintained separately from ROS and have their own documentation as well.
  • The source code is often the ultimate documentation. Do not be afraid to read the code.
  • Part of this course is about learning how to use the documentation, so not all the answers will be provided in these notes or in lecture!

Deprecated Documentation

Sometimes there is a lot of overlap between ROS 1 and ROS 2 packages but the ROS 2 packages are not yet documented.

Author: Matthew Elwin.