Package roslaunch :: Module loader :: Class Loader
[frames] | no frames]

Class Loader

source code

object --+
         |
        Loader
Known Subclasses:

Lower-level library for loading ROS launch model. It provides an abstraction between the representation (e.g. XML) and the validation of the property values.

Instance Methods
 
add_param(self, ros_config, param_name, param_value, verbose=True)
Add Param instances to launch config.
source code
 
load_rosparam(self, context, ros_config, cmd, param, file_, text, verbose=True, subst_function=None)
Load rosparam setting
source code
 
load_env(self, context, ros_config, name, value)
Load environment variable setting
source code
 
param_value(self, verbose, name, ptype, value, textfile, binfile, command)
Parse text representation of param spec into Python value
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

add_param(self, ros_config, param_name, param_value, verbose=True)

source code 

Add Param instances to launch config. Dictionary values are unrolled into individual parameters.

Parameters:
  • ros_config (ROSLaunchConfig) - launch configuration
  • param_name (str) - name of parameter namespace to load values into. If param_name is '/', param_value must be a dictionary
  • param_value (str) - value to assign to param_name. If param_value is a dictionary, it's values will be unrolled into individual parameters.
Raises:
  • ValueError - if parameters cannot be processed into valid Params

load_rosparam(self, context, ros_config, cmd, param, file_, text, verbose=True, subst_function=None)

source code 

Load rosparam setting

Parameters:
  • context (LoaderContext) - Loader context
  • ros_config (ROSLaunchConfig) - launch configuration
  • cmd (str) - 'load', 'dump', or 'delete'
  • file_ (str) - filename for rosparam to use or None
  • text (str) - text for rosparam to load. Ignored if file_ is set.
Raises:
  • ValueError - if parameters cannot be processed into valid rosparam setting

load_env(self, context, ros_config, name, value)

source code 

Load environment variable setting

Parameters:
  • context (LoaderContext) - Loader context
  • ros_config (ROSLaunchConfig) - launch configuration
  • name (str) - environment variable name
  • value (str) - environment variable value

param_value(self, verbose, name, ptype, value, textfile, binfile, command)

source code 

Parse text representation of param spec into Python value

Parameters:
  • name (str) - param name, for error message use only
  • verbose (bool) - print verbose output
  • textfile (str) - name of text file to load from, or None
  • binfile (str) - name of binary file to load from, or None
  • command (str) - command to execute for parameter value, or None
Raises:
  • ValueError - if parameters are invalid