[Documentation] [TitleIndex] [WordIndex

Overview

(1/25/2017) This documentation is old, and the rosdistro script is no longer available on recent ROS installations. This page is kept for historical reasons only.

If you find new info please consider updating this page.

rosdistro is a file format for managing ROS Distributions and the ROS stacks they contain. This file format is used as input to a variety of tools in the ROS build and release toolchain, from stack release tools to rosdoc. The rosdistro format has changed for Catkin-based repositories.

Rosdistro Catkin

The rosdistro tool allows you to get access to the full dependency tree and the vcs information of all packages and repositories. To increase performance, the rosdistro tool will automatically look for a cache file on your local disk. If no cache file is found locally, it will try to download the latest cache file from the server. The cache files are only used to improve performance, and are not needed to get correct results. rosdistro will automatically go to github to find any dependencies that are not part of the cache file. Note that operation without a cache file can be very slow, depending on your own internet connection and the response times of github. The rosdistro tool will always write the latest dependency information to a local cache file, to speed up performance for the next query.

Installation

The rosdistro package is available on the ros apt repository. Follow the installation instructions to set up your apt repository first. After that, you can install the rosdistro tool using the following command:

sudo apt-get update
sudo apt-get install python-rosdistro

Usage

The rosdistro tool can be used both as a command line tool and as a Python libraray.

Command line

The command line tool is called 'rosdistro', and gets installed in /usr/bin by default. The basic usage pattern is 'rosdistro command', with command one of the following:

  rosdistro depends 3 groovy actionlib tf geometry

(1/25/2017) The rosdistro script is no longer available since version 0.2.2. This page is kept for historical reasons only.

See also How to run rosdistro command? on ROS Answers.

  rosdistro depends_on 5 groovy actionlib tf geometry

Python Library

First, start with constructing the RosDistro python object:

import rosdistro

distro = rosdistro.RosDistro('groovy')

Now, you can access the dependency tree:

# get the list of packages that depend on actionlib up to recursion depth 3
distro.get_depends_on('actionlib', 3)

# get the list of packages that depend on actionlib, tf or geometry, up to a recursion depth 6
distro.get_depends_on(['actionlib', 'tf', 'geometry'], 6)

# get the list of package dependencies of actionlib, up to a recursion depth 3
distro.get_depends('actionlib', 3)

# get the list of package dependencies of actionlib, tf and geometry, up to a recursion depth 6
distro.get_depends(['actionlib', 'tf', 'geometry'], 6)

You can also get access to the rosinstall files, to download a list of packages and/or repositories:

# get latest release from vcs
distro.get_rosinstall('actionlib', source='vcs')  

# get latest release from tar
distro.get_rosinstall('actionlib', source='tar')  

# get master branch of list of packages and/or repositories from vcs
distro.get_rosinstall(['tf', 'geometry'], version='master', source='vcs')

Rosdistro Pre-Catkin

Specification: rosdistro format documentation.

Python library

The rosdistro library is now part of the rospkg standalone library. Please see the API documentation for more.


2024-11-16 17:43