ROS stacks

Packages can be organized into ROS stacks. Whereas the goal of packages is to create and compile minimal collections of code for easy reuse, the goal of stacks is to simplify the process of code sharing. Stacks are the primary mechanism in ROS for distributing software. Each stack has an associated version and can declare dependencies on other stacks. These dependencies also declare a version number, which provides greater stability in development.

Stacks collect packages that collectively provide functionality, such as a navigation stack or a manipulation stack.

Stacks are easy to create by hand. A stack is simply a directory descended from ROS_ROOT or ROS_PACKAGE_PATH that has a stack.xml file in it. Any packages in this directory are considered to be part of the stack.

For release purposes, a CMakeLists.txt should also be put into the root of the stack. The roscreate-stack tool can generate this file automatically.

Please see the stack manifest section for documentation on how to write stack.xml files.

Unary stacks

A unary stack is simply a stack that is also a package.

Advanced: This is described in greater detail in REP 109.

Command-line Tools

rosstack is the primary ROS tool for interacting with ROS stacks. It is the stack-level analogue of the rospack tool for packages.

There are also extensions to common Unix shells that provide additional functionality to help you navigate and use packages. The most commonly used of these is rosbash, which provides ROS-variants of common Unix shell commands for Bash and other shells. The most commonly used of these is roscd, which performs a cd to the directory of a package or stack, e.g.

roscd navigation