package documentation

Implementation of the rosparam as well as a library for modifying the state of the ROS Parameter Server using YAML files.

From __init__.py:

Exception RosParamException rosparam base exception type
Exception RosParamIOException Exception for communication-based (i/o) errors.
Function construct_angle_degrees python-yaml utility for converting deg(num) into float value
Function construct_angle_radians python-yaml utility for converting rad(num) into float value
Function construct_yaml_binary Overrides pyaml's constructor for binary data. Wraps binary data in xmlrpclib.Binary container instead of straight string representation.
Function delete_param Delete a parameter from the Parameter Server
Function dump_params Download a parameter tree from the Parameter Server and store in a yaml file
Function get_param Download a parameter from Parameter Server
Function get_param_server Undocumented
Function list_params Get list of parameters in ns
Function load_file Load the YAML document from the specified file
Function load_str Load the YAML document as a string
Function print_params Print contents of param dictionary to screen
Function represent_foo Undocumented
Function represent_xml_binary Adds a pyyaml serializer to handle xmlrpclib.Binary objects
Function set_param Set param on the ROS parameter server using a YAML value.
Function set_param_raw Set param on the Parameter Server. Unlike L{set_param()}, this takes in a Python value to set instead of YAML.
Function upload_params Upload params to the Parameter Server :param values: key/value dictionary, where keys are parameter names and values are parameter values, dict :param ns: namespace to load parameters into, str
Function yamlmain Command-line main routine. Loads in one or more input files
Constant NAME Undocumented
Constant NS Undocumented
Variable pattern Undocumented
Function _fullusage Prints rosparam usage
Function _get_caller_id No summary
Function _pretty_print Pretty print get value :param value: value to print :param indent: indent level, used for recursive calls, str
Function _rosparam_cmd_delete rosparam delete param
Function _rosparam_cmd_get_dump rosparam get param rosparam dump file.yaml [namespace]
Function _rosparam_cmd_get_param Download a parameter tree and print to screen :param param: parameter name to retrieve from Parameter
Function _rosparam_cmd_list rosparam load file.yaml [namespace] rosparam set param value
Function _rosparam_cmd_set_load rosparam load file.yaml [namespace] rosparam set param value
Function _set_optparse_neg_args Undocumented
NAME: str =

Undocumented

Value
'rosparam'
NS: str =

Undocumented

Value
'_ns'
def represent_xml_binary(loader, data):

Adds a pyyaml serializer to handle xmlrpclib.Binary objects

def represent_foo(loader, data):

Undocumented

def construct_yaml_binary(loader, node):

Overrides pyaml's constructor for binary data. Wraps binary data in xmlrpclib.Binary container instead of straight string representation.

def construct_angle_radians(loader, node):

python-yaml utility for converting rad(num) into float value

def construct_angle_degrees(loader, node):

python-yaml utility for converting deg(num) into float value

def _get_caller_id():
Returns
caller ID for rosparam ROS client calls, str
def print_params(params, ns):

Print contents of param dictionary to screen

def load_file(filename, default_namespace=None, verbose=False):

Load the YAML document from the specified file

Parameters
filenamename of filename, str
default_namespacenamespace to load filename into, str
verboseUndocumented
Returns
list of parameter dictionary and corresponding namespaces for each YAML document in the file
Raises
Unknown exceptionRosParamException: if unable to load contents of filename
def load_str(str, filename, default_namespace=None, verbose=False):

Load the YAML document as a string

Parameters
strYAML text, str
filenamename of filename, only used for debugging, str
default_namespacenamespace to load filename into, str
verboseUndocumented
Returns
list of parameter dictionary and corresponding namespaces for each YAML document in the file, [(dict, str)...]
def get_param_server():

Undocumented

def get_param(param):

Download a parameter from Parameter Server

Parameters
paramparameter name to retrieve from parameter server. If param is a parameter namespace, entire parameter subtree will be downloaded, str
def _pretty_print(value, indent=''):

Pretty print get value :param value: value to print :param indent: indent level, used for recursive calls, str

def _rosparam_cmd_get_param(param, pretty=False, verbose=False):

Download a parameter tree and print to screen :param param: parameter name to retrieve from Parameter

Server. If param is a parameter namespace, entire parameter subtree will be downloaded, str
def dump_params(filename, param, verbose=False):

Download a parameter tree from the Parameter Server and store in a yaml file

Parameters
filenamename of file to save YAML representation, str
paramname of parameter/namespace to dump, str
verboseprint verbose output for debugging, bool
def delete_param(param, verbose=False):

Delete a parameter from the Parameter Server

Parameters
paramparameter name, str
verboseprint verbose output for debugging, bool
def set_param_raw(param, value, verbose=False):

Set param on the Parameter Server. Unlike L{set_param()}, this takes in a Python value to set instead of YAML.

Parameters
paramparameter name, str
valueUndocumented
verboseUndocumented
value XmlRpcLegalValuevalue to upload, XmlRpcLegalValue
def set_param(param, value, verbose=False):

Set param on the ROS parameter server using a YAML value.

Parameters
paramparameter name, str
valueyaml-encoded value, str
verboseUndocumented
def upload_params(ns, values, verbose=False):

Upload params to the Parameter Server :param values: key/value dictionary, where keys are parameter names and values are parameter values, dict :param ns: namespace to load parameters into, str

def list_params(ns):

Get list of parameters in ns

Parameters
nsnamespace to match, str
def _rosparam_cmd_get_dump(cmd, argv):

Process command line for rosparam get/dump, e.g.::
rosparam get param rosparam dump file.yaml [namespace]

Parameters
cmdcommand ('get' or 'dump'), str
argvcommand-line args, str
def _set_optparse_neg_args(parser, argv):

Undocumented

def _rosparam_cmd_set_load(cmd, argv):

Process command line for rosparam set/load, e.g.::
rosparam load file.yaml [namespace] rosparam set param value

Parameters
cmdcommand name, str
argvcommand-line args, str
def _rosparam_cmd_list(argv):

Process command line for rosparam set/load, e.g.::
rosparam load file.yaml [namespace] rosparam set param value

Parameters
argvcommand-line args, str
def _rosparam_cmd_delete(argv):

Process command line for rosparam delete, e.g.::
rosparam delete param

Parameters
argvcommand-line args, str
cmdcommand name, str
def _fullusage():

Prints rosparam usage

def yamlmain(argv=None):

Command-line main routine. Loads in one or more input files

Parameters
argvcommand-line arguments or None to use sys.argv, [str]
pattern =

Undocumented