Classes | Functions | Variables
substitution_args Namespace Reference

Classes

class  ArgException
 
class  SubstitutionException
 

Functions

def _arg (resolved, a, args, context)
 
def _collect_args (arg_str)
 
def _resolve_args (arg_str, context, resolve_anon, commands)
 
def _sanitize_path (path)
 
def _separate_first_path (value)
 
def _split_command (resolved, command_with_args)
 
def resolve_args (arg_str, context=None, resolve_anon=True)
 

Variables

int _DOLLAR = 1
 
int _IN = 3
 
int _LP = 2
 
int _OUT = 0
 

Function Documentation

◆ _arg()

def substitution_args._arg (   resolved,
  a,
  args,
  context 
)
private
process $(arg) arg

:returns: updated resolved argument, ``str``
:raises: :exc:`ArgException` If arg invalidly specified

Definition at line 80 of file substitution_args.py.

◆ _collect_args()

def substitution_args._collect_args (   arg_str)
private
State-machine parser for resolve_args. Substitution args are of the form:
$(find package_name)/scripts/foo.py $(export some/attribute blar) non-relevant stuff

@param arg_str: argument string to parse args from
@type  arg_str: str
@raise SubstitutionException: if args are invalidly specified
@return: list of arguments
@rtype: [str]

Definition at line 159 of file substitution_args.py.

◆ _resolve_args()

def substitution_args._resolve_args (   arg_str,
  context,
  resolve_anon,
  commands 
)
private

Definition at line 142 of file substitution_args.py.

◆ _sanitize_path()

def substitution_args._sanitize_path (   path)
private

Definition at line 74 of file substitution_args.py.

◆ _separate_first_path()

def substitution_args._separate_first_path (   value)
private

Definition at line 65 of file substitution_args.py.

◆ _split_command()

def substitution_args._split_command (   resolved,
  command_with_args 
)
private

Definition at line 58 of file substitution_args.py.

◆ resolve_args()

def substitution_args.resolve_args (   arg_str,
  context = None,
  resolve_anon = True 
)
Resolves 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 '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.
@type  context: dict
@param resolve_anon bool: If True (default), will resolve $(anon
    foo). If false, will leave these args as-is.
@type  resolve_anon: bool

@return str: arg_str with substitution args resolved
@rtype:  str
@raise SubstitutionException: if there is an error resolving substitution args

Definition at line 104 of file substitution_args.py.

Variable Documentation

◆ _DOLLAR

int substitution_args._DOLLAR = 1
private

Definition at line 156 of file substitution_args.py.

◆ _IN

int substitution_args._IN = 3
private

Definition at line 158 of file substitution_args.py.

◆ _LP

int substitution_args._LP = 2
private

Definition at line 157 of file substitution_args.py.

◆ _OUT

int substitution_args._OUT = 0
private

Definition at line 155 of file substitution_args.py.



rotors_gazebo
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Mon Feb 28 2022 23:39:12