Note: This is a legacy, rosbuild based, version of the ROS Filesystem Concepts
Packages in ROS are organized into ROS stacks. Whereas the goal of packages is to create 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. Unlike a traditional software library that you link against at compile time, these stacks can also provide this functionality at runtime via ROS topics and services.
Stacks are easy to create by hand. A stack is simply a directory descended from ROS_ROOT or ROS_PACKAGE_PATH (see ROS Environment Variables) that has a stack.xml file in it. Any Packages in this directory are considered to be part of the Stack.
Please see the Stack Manifest section for documentation on how to write stack.xml files.
roscreate-stack helps automate the process of creating a stack, including generating a valid stack.xml file with correct dependencies.
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. The most commonly used of these is roscd, which performs a cd to the directory of a package or stack, e.g.
Client Library Support
In Python, you can use the roslib.stacks module in the roslib package to get information about ROS stacks.