Package roslib :: Module packages :: Class ROSPackages
[frames] | no frames]

Class ROSPackages

source code

object --+
         |
        ROSPackages

UNSTABLE/EXPERIMENTAL

Utility class for querying properties about ROS packages. This should be used when querying properties about multiple packages. ROSPackages caches information about packages, which enables it to have higher performance than alternatives like shelling out to rospack.

Example:

 rp = ROSPackages()
 d = rp.depends1(['roscpp', 'rospy'])
 print d['roscpp']
 d = rp.rosdeps(['roscpp', 'rospy'])
 print d['rospy']
Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
load_manifests(self, packages)
Load manifests for specified packages into 'manifests' attribute.
source code
{str: [str]}
depends1(self, packages)
Collect all direct dependencies of specified packages into a dictionary.
source code
{str: [str]}
depends(self, packages)
Collect all dependencies of specified packages into a dictionary.
source code
{str: [str]}
rosdeps0(self, packages)
Collect rosdeps of specified packages into a dictionary.
source code
{str: [str]}
rosdeps(self, packages)
Collect all (recursive) dependencies of specified packages into a dictionary.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

load_manifests(self, packages)

source code 

Load manifests for specified packages into 'manifests' attribute.

Parameters:
  • packages ([str]) - package names

depends1(self, packages)

source code 

Collect all direct dependencies of specified packages into a dictionary.

Parameters:
  • packages ([str]) - package names
Returns: {str: [str]}
dictionary mapping package names to list of dependent package names.

depends(self, packages)

source code 

Collect all dependencies of specified packages into a dictionary.

Parameters:
  • packages ([str]) - package names
Returns: {str: [str]}
dictionary mapping package names to list of dependent package names.

rosdeps0(self, packages)

source code 

Collect rosdeps of specified packages into a dictionary.

Parameters:
  • packages ([str]) - package names
Returns: {str: [str]}
dictionary mapping package names to list of rosdep names.

rosdeps(self, packages)

source code 

Collect all (recursive) dependencies of specified packages into a dictionary.

Parameters:
  • packages ([str]) - package names
Returns: {str: [str]}
dictionary mapping package names to list of dependent package names.