xacro.substitution_args module
Library for processing XML substitution args.
This is currently used by roslaunch and xacro, but it is not yet a top-level ROS feature. This file has been modified from ros_comm/tools/roslaunch/src/roslaunch/substitution_args.py
- exception xacro.substitution_args.ArgException
Bases:
SubstitutionException
Exception for missing $(arg) values.
- exception xacro.substitution_args.SubstitutionException
Bases:
Exception
Base class for exceptions in substitution_args routines.
- xacro.substitution_args.convert_value(value, type_)
Convert a value from a string representation into the specified type.
@param value: string representation of value @type value: str @param type_: int, double, string, bool, or auto @type type_: str @raise ValueError: if parameters are invalid
- xacro.substitution_args.resolve_args(arg_str, context=None, filename=None)
Resolve substitution args (see wiki spec U{http://ros.org/wiki/roslaunch}).
- @param arg_str: string to resolve zero or more substitution args in.
arg_str may be None, in which case resolve_args will return None
@type arg_str: str @param context dict: (optional) dictionary for storing results of the ‘arg’ substitution args.
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.
@type context: dict
@return str: arg_str with substitution args resolved @rtype: str @raise SubstitutionException: if there is an error resolving substitution args