class documentation

Parser for roslaunch XML format. Loads parsed representation into ROSConfig model.

Method __init__ @param resolve_anon: If True (default), will resolve $(anon foo). If false, will leave these args as-is. @type resolve_anon: bool @param args_only: if True, will only load arg tags (e.g. autocompletion purposes) @type args_only: bool...
Method load load XML file into launch configuration @param filename: XML config file to load @type filename: str @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param core: if True, load file using ROS core rules @type core: bool @param argv: override command-line arguments (mainly for arg testing) @type argv: [str]...
Method load_string Load XML text into launch configuration @param xml_text: XML configuration @type xml_text: str @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param core: if True, load file using ROS core rules @type core: bool...
Method opt_attrs Helper routine for fetching and resolving optional tag attributes @param tag DOM tag @param context LoaderContext @param attrs (str): list of attributes to resolve
Method reqd_attrs Helper routine for fetching and resolving required tag attributes @param tag: DOM tag @param attrs: list of attributes to resolve @type attrs: (str) @raise KeyError: if required attribute is missing
Method resolve_args Wrapper around substitution_args.resolve_args to set common parameters
Constant ARG_ATTRS Undocumented
Constant ENV_ATTRS Undocumented
Constant GROUP_ATTRS Undocumented
Constant INCLUDE_ATTRS Undocumented
Constant MACHINE_ATTRS Undocumented
Constant NODE_ATTRS Undocumented
Constant PARAM_ATTRS Undocumented
Constant REMAP_ATTRS Undocumented
Constant ROSPARAM_OPT_ATTRS Undocumented
Constant TEST_ATTRS Undocumented
Instance Variable args_only Undocumented
Instance Variable resolve_anon Undocumented
Instance Variable root_context Undocumented
Method _arg_tag Process an <arg> tag.
Method _check_attrs Undocumented
Method _env_tag Undocumented
Method _include_tag Undocumented
Method _launch_tag Undocumented
Method _load_launch subroutine of launch for loading XML DOM into config. Load_launch assumes that it is creating the root XmlContext, and is thus affected by command-line arguments. @param launch: DOM node of the root <launch> tag in the file @type launch: L{Node} @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param is_core: (optional) if True, load file using ROS core rules...
Method _machine_tag Undocumented
Method _node_tag Process XML <node> or <test> tag @param tag: DOM node @type tag: Node @param context: namespace context @type context: L{LoaderContext} @param params: ROS parameter list @type params: [L{Param}] @param clear_params: list of ROS parameter names to clear before setting parameters @type clear_params: [str] @param default_machine: default machine to assign to node @type default_machine: str @param is_test: if set, will load as L{Test} object instead of L{Node} object @type is_test: bool...
Method _ns_clear_params_attr Common processing routine for xml tags with NS and CLEAR_PARAMS attributes
Method _param_tag @param force_local: if True, param must be added to context instead of ros_config @type force_local: bool
Method _parse_launch Undocumented
Method _recurse_load @return: new default machine for current context @rtype: L{Machine}
Method _remap_tag Undocumented
Method _rosparam_tag Undocumented
Method _test_attrs Process attributes of <test> tag not present in <node> @return: test_name, time_limit @rtype: str, int

Inherited from Loader:

Method add_param Add L{Param} instances to launch config. Dictionary values are unrolled into individual parameters.
Method load_env Load environment variable setting
Method load_rosparam Load rosparam setting
Method param_value Parse text representation of param spec into Python value @param name: param name, for error message use only @type name: str @param verbose: print verbose output @type verbose: bool @param textfile: name of text file to load from, or None @type textfile: str @param binfile: name of binary file to load from, or None @type binfile: str @param command: command to execute for parameter value, or None @type command: str @raise ValueError: if parameters are invalid...
def __init__(self, resolve_anon=True, args_only=False):

@param resolve_anon: If True (default), will resolve $(anon foo). If false, will leave these args as-is. @type resolve_anon: bool @param args_only: if True, will only load arg tags (e.g. autocompletion purposes) @type args_only: bool

def load(self, filename, ros_config, core=False, argv=None, verbose=True):

load XML file into launch configuration @param filename: XML config file to load @type filename: str @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param core: if True, load file using ROS core rules @type core: bool @param argv: override command-line arguments (mainly for arg testing) @type argv: [str]

def load_string(self, xml_text, ros_config, core=False, verbose=True):

Load XML text into launch configuration @param xml_text: XML configuration @type xml_text: str @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param core: if True, load file using ROS core rules @type core: bool

def opt_attrs(self, tag, context, attrs):

Helper routine for fetching and resolving optional tag attributes @param tag DOM tag @param context LoaderContext @param attrs (str): list of attributes to resolve

def reqd_attrs(self, tag, context, attrs):

Helper routine for fetching and resolving required tag attributes @param tag: DOM tag @param attrs: list of attributes to resolve @type attrs: (str) @raise KeyError: if required attribute is missing

def resolve_args(self, args, context):

Wrapper around substitution_args.resolve_args to set common parameters

ARG_ATTRS: tuple[str, ...] =

Undocumented

Value
('name', 'value', 'default', 'doc')
ENV_ATTRS: tuple[str, ...] =

Undocumented

Value
('name', 'value')
GROUP_ATTRS =

Undocumented

Value
(NS, CLEAR_PARAMS)
INCLUDE_ATTRS =

Undocumented

Value
('file', NS, CLEAR_PARAMS, 'pass_all_args')
MACHINE_ATTRS: tuple[str, ...] =

Undocumented

Value
('name',
 'address',
 'env-loader',
 'ssh-port',
 'user',
 'password',
 'default',
...
NODE_ATTRS =

Undocumented

Value
['pkg',
 'type',
 'machine',
 'name',
 'args',
 'output',
 'respawn',
...
PARAM_ATTRS: tuple[str, ...] =

Undocumented

Value
('name', 'value', 'type', 'value', 'textfile', 'binfile', 'command')
REMAP_ATTRS: tuple[str, ...] =

Undocumented

Value
('from', 'to')
ROSPARAM_OPT_ATTRS: tuple[str, ...] =

Undocumented

Value
('command', 'ns', 'file', 'param', 'subst_value')
TEST_ATTRS =

Undocumented

Value
NODE_ATTRS+['test-name', 'time-limit', 'retry']
args_only =

Undocumented

resolve_anon =

Undocumented

root_context =

Undocumented

@ifunless
def _arg_tag(self, tag, context, ros_config, verbose=True):

Process an <arg> tag.

def _check_attrs(self, tag, context, ros_config, attrs):

Undocumented

@ifunless
def _env_tag(self, tag, context, ros_config):

Undocumented

@ifunless
def _include_tag(self, tag, context, ros_config, default_machine, is_core, verbose):

Undocumented

@ifunless
def _launch_tag(self, tag, ros_config, filename=None):

Undocumented

def _load_launch(self, launch, ros_config, is_core=False, filename=None, argv=None, verbose=True):

subroutine of launch for loading XML DOM into config. Load_launch assumes that it is creating the root XmlContext, and is thus affected by command-line arguments. @param launch: DOM node of the root <launch> tag in the file @type launch: L{Node} @param ros_config: launch configuration to load XML file into @type ros_config: L{ROSLaunchConfig} @param is_core: (optional) if True, load file using ROS core rules. Default False. @type is_core: bool @param filename: (optional) name of file being loaded @type filename: str @param verbose: (optional) print verbose output. Default False. @type verbose: bool @param argv: (optional) command-line args. Default sys.argv.

@ifunless
def _machine_tag(self, tag, context, ros_config, verbose=True):

Undocumented

@ifunless
def _node_tag(self, tag, context, ros_config, default_machine, is_test=False, verbose=True):

Process XML <node> or <test> tag @param tag: DOM node @type tag: Node @param context: namespace context @type context: L{LoaderContext} @param params: ROS parameter list @type params: [L{Param}] @param clear_params: list of ROS parameter names to clear before setting parameters @type clear_params: [str] @param default_machine: default machine to assign to node @type default_machine: str @param is_test: if set, will load as L{Test} object instead of L{Node} object @type is_test: bool

def _ns_clear_params_attr(self, tag_name, tag, context, ros_config, node_name=None, include_filename=None):

Common processing routine for xml tags with NS and CLEAR_PARAMS attributes

@param tag: DOM Node @type tag: Node @param context: current namespace context @type context: LoaderContext @param clear_params: list of params to clear @type clear_params: [str] @param node_name: name of node (for use when tag_name == 'node') @type node_name: str @param include_filename: <include> filename if this is an <include> tag. If specified, context will use include rules. @type include_filename: str @return: loader context @rtype: L{LoaderContext}

@ifunless
def _param_tag(self, tag, context, ros_config, force_local=False, verbose=True):

@param force_local: if True, param must be added to context instead of ros_config @type force_local: bool

def _parse_launch(self, filename, verbose):

Undocumented

def _recurse_load(self, ros_config, tags, context, default_machine, is_core, verbose):

@return: new default machine for current context @rtype: L{Machine}

@ifunless
def _remap_tag(self, tag, context, ros_config):

Undocumented

@ifunless
def _rosparam_tag(self, tag, context, ros_config, verbose=True):

Undocumented

def _test_attrs(self, tag, context):

Process attributes of <test> tag not present in <node> @return: test_name, time_limit @rtype: str, int