[Documentation] [TitleIndex] [WordIndex

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | rosdep | rosemacs | roslang | roslib | rosmake | rospack | rosunit

Package Summary

rospack is a command-line program which provides many of the services of the *NIX pkg-config tool. It is used to find packages among the "forest" of code in a typical ROS distribution, calculate dependencies, mangle Makefiles, and in general promote peace and harmony in a ROS distribution.

rospack uses the TinyXML parser, a zLib-licensed library which is available here: http://tinyxml.sourceforge.net

Overview

rospack is a command-line tool for retrieving information about ROS packages available on the filesystem. It implements a wide variety of commands ranging from locating ROS packages in the filesystem, to listing available stacks, to calculating the dependency tree of stacks. It is also used in the ROS build system for calculating build information for packages.

For an equivalent tool for stacks, see rosstack.

Usage

$ rospack [options] <command> [package]
   Allowed commands:
     help
     find [package]
     list
     list-names
     langs
     depends [package] (alias: deps)
     depends1 [package] (alias: deps1)
     depends-manifests [package] (alias: deps-manifests)
     depends-indent [package] (alias: deps-indent)
     depends-why --target=<target> [package] (alias: deps-why)
     vcs [package]
     vcs0 [package]
     depends-on [package]
     depends-on1 [package]
     export [--deps-only] --lang=<lang> --attrib=<attrib> [package]
     cflags-only-I [--deps-only] [package]
     cflags-only-other [--deps-only] [package]
     libs-only-L [--deps-only] [package]
     libs-only-l [--deps-only] [package]
     libs-only-other [--deps-only] [package]
     profile [--length=<length>] [--zombie-only]
     plugins --attrib=<attrib> [--top=<toppkg>] [package]
  Extra options:
    -q     Quiets error reports.

If [package] is omitted, the current working directory
is used (if it contains a manifest.xml). 

The rospack tool implements many commands that print information about ROS packages. All of these commands print their results to stdout. Any errors or warnings go to stderr. This separation ensures that error output does not confuse programs that execute rospack as a subprocess to, for example, recover build flags for a package.

The -q option can be given after any subcommand. It will suppress most error messages that usually go to stderr. The return code will still be non-zero, to indicate the error. E.g., to search for a package, but suppress the error message if it's not found:

$ rospack find -q foo
$ echo $?
255

NOTE: for all commands, if [package] is omitted, the current working directory is used.

rospack help

help

rospack find

find [package]

rospack list

list

list-names

rospack langs

langs

rospack depends, depends1, depends-manifests, depends-indent, depends-why

depends [package]

depends1 [package]

depends-manifests [package]

depends-indent [package]

depends-why --target=TARGET [package] (new in ROS 0.11)

rospack vcs, vcs0

vcs [package]

vcs0 [package]

rospack depends-on, depends-on1

depends-on [package]

depends-on1 [package]

rospack export

export --lang=LANGUAGE --attrib=ATTRIBUTE [package]

--deps-only

rospack cflag-only-I, cflags-only-other

NOTE: the cflags-only-* commands are simply variants of the rospack export command with additional processing.

cflags-only-I [package]

cflags-only-other [package]

--deps-only

rospack libs-only-L, libs-only-l, libs-only-other

NOTE: the libs-only-* commands are simply variants of the rospack export command with additional processing.

libs-only-L [package]

libs-only-l [package]

libs-only-other [package]

--deps-only

rospack profile

profile [--length=N]

--zombie-only

rospack plugins

plugins --attrib=<attrib> [package]

--top=TOPPKG

rospack_nosubdirs

You can prevent rospack from descending into a directory by simply adding an empty rospack_nosubdirs file. This is useful when you want to block off part of your package tree, either for performance reasons, or to hide another version of your code. We recommend creating a rospack_nosubdirs file in packages that checkout code from other code repositories, as those often create big directory trees that don't get cleaned up if a package is moved or deleted.

This will not prevent rospack from finding nodes in these directories, for roslaunch or rosrun.


2011-11-19 12:34