The RosStack classes provides APIs similar to the rosstack command-line tool distributed with ROS. Like rosstack, it provides information about stack dependency information, filesystem locations, and manifest access. The Python API is more efficient than shelling out to rosstack as it provides caching and other optimizations for repeated querying.
Name of stack manifest file, i.e. ‘stack.xml’.
Query information about ROS stacks on the local filesystem. This includes information about dependencies, retrieving stack Manifest instances, and determining the contents of stacks.
RosStack can be initialized with the default environment, or its environment configuration can be overridden with alternate ROS_ROOT and ROS_PACKAGE_PATH settings.
NOTE: for performance reasons, RosPack caches information about packages.
Parameters: |
|
---|
Get the ROS_ROOT configuration of this instance.
Get the ROS_PACKAGE_PATH configuration of this instance.
Get the ROS_ROOT configuration of this instance. Read-only.
Get the ROS_PACKAGE_PATH configuration of this instance. Read-only.
Get the Manifest of the specified package.
Parameters: | name – package name, str |
---|---|
Raises : | InvalidManifest |
List stacks.
Returns: | complete list of package names in ROS environment |
---|
Parameters: | name – stack name, str |
---|---|
Returns: | filesystem path of stack |
Raises : | ResourceNotFound |
Get the explicit dependencies of a stack.
Parameters: | name – stack name, str |
---|---|
Returns: | list of names of direct dependencies |
Raises : | ResourceNotFound |
Raises : | InvalidManifest |
Get explicit and implicit dependencies of a stack.
Parameters: | name – stack name, str |
---|---|
Returns: | list of names of dependencies. |
Raises : | InvalidManifest |
Returns: | name of packages that are part of stack |
---|---|
Raises : | ResourceNotFound if stack cannot be located |
Parameters: | env – override environment variable dictionary |
---|---|
Returns: | version number of stack, or None if stack is unversioned. |
Expand names into a list of packages. Names can either be of packages or stacks.
Parameters: | |
---|---|
Returns: | ([packages], [not_found]). expand_packages() returns two lists. The first is of packages names. The second is a list of names for which no matching stack or package was found. Lists may have duplicates. |
Get stack version where stack_dir points to root directory of stack.
Parameters: | env – override environment variable dictionary |
---|---|
Returns: | version number of stack, or None if stack is unversioned. |