Package roslaunch :: Module substitution_args
[frames] | no frames]

Module substitution_args

source code

Library for processing XML substitution args. This is currently used by roslaunch and xacro, but it is not yet a top-level ROS feature.

Classes
  SubstitutionException
Base class for exceptions in substitution_args routines
  ArgException
Exception for missing $(arg) values
Functions
str
resolve_args(arg_str, context=None, resolve_anon=True)
Resolves substitution args (see wiki spec http://ros.org/wiki/roslaunch).
source code
Variables
  __package__ = 'roslaunch'
Function Details

resolve_args(arg_str, context=None, resolve_anon=True)

source code 

Resolves substitution args (see wiki spec http://ros.org/wiki/roslaunch).

Parameters:
  • arg_str (str) - string to resolve zero or more substitution args in. arg_str may be None, in which case resolve_args will return None
  • context (dict), dict - (optional) dictionary for storing results of the 'anon' and 'arg' substitution args. multiple calls to resolve_args should use the same context so that 'anon' substitions resolve consistently. If no context is provided, a new one will be created for each call. Values for the 'arg' context should be stored as a dictionary in the 'arg' key.
  • resolve_anon (bool), bool - If True (default), will resolve $(anon foo). If false, will leave these args as-is.
Returns: str
Raises: