module documentation

Support for ROS Names

See: U{http://wiki.ros.org/Names}

Function canonicalize_name Put name in canonical form. Double slashes '//' are removed and name is returned without any trailing slash, e.g. /foo/bar @param name: ROS name @type name: str
Function get_mappings Get mapping table with unresolved names
Function get_resolved_mappings Get mapping table with resolved names
Function global_name Validator that checks for valid, global graph resource name. @return: parameter value @rtype: str
Function initialize_mappings Initialize the remapping table based on provide node name.
Function isstring Undocumented
Function reload_mappings Re-initialize the name remapping table.
Function resolve_name_without_node_name The need for this function is complicated -- Topics and Services can be created before init_node is called. In general, this is okay, unless the name is a ~name, in which case we have to raise an ValueError...
Function scoped_name Convert the global caller_id to a relative name within the namespace. For example, for namespace '/foo' and name '/foo/bar/name', the return value will be 'bar/name'
Function valid_name Validator that resolves names and also ensures that they are not empty @param param_name: name @type param_name: str @param resolve: if True/omitted, the name will be resolved to
Function valid_name_validator_resolved Undocumented
Function valid_name_validator_unresolved Undocumented
Function _set_caller_id Internal API. Set the global name (i.e. caller_id) and namespace. Methods can check what the name of the current node is by calling get_caller_id.
Variable _caller_id Undocumented
Variable _caller_namespace Undocumented
Variable _mappings Undocumented
Variable _resolved_mappings Undocumented
def canonicalize_name(name):

Put name in canonical form. Double slashes '//' are removed and name is returned without any trailing slash, e.g. /foo/bar @param name: ROS name @type name: str

def get_mappings():

Get mapping table with unresolved names

@return: command-line remappings {name: name} @rtype: {str: str}

def get_resolved_mappings():

Get mapping table with resolved names

@return: command-line remappings {name: name} @rtype: {str: str}

def global_name(param_name):

Validator that checks for valid, global graph resource name. @return: parameter value @rtype: str

def initialize_mappings(node_name):

Initialize the remapping table based on provide node name.

@param node_name: name of node (caller ID) @type node_name: str

def isstring(s):

Undocumented

def reload_mappings(argv):

Re-initialize the name remapping table.

@param argv: Command line arguments to this program. ROS reads
these arguments to find renaming params.

@type argv: [str]

def resolve_name_without_node_name(name):

The need for this function is complicated -- Topics and Services can be created before init_node is called. In general, this is okay, unless the name is a ~name, in which case we have to raise an ValueError

@param name: ROS name to resolve @type name: str @raise ValueError: if name is a ~name @raise ROSInitException: if name is remapped to a ~name

def scoped_name(caller_id, name):

Convert the global caller_id to a relative name within the namespace. For example, for namespace '/foo' and name '/foo/bar/name', the return value will be 'bar/name'

WARNING: scoped_name does not validate that name is actually within the supplied namespace. @param caller_id: caller ID, in canonical form @type caller_id: str @param name: name to scope @type name: str @return: name scoped to the caller_id's namespace. @rtype: str

def valid_name(param_name, resolve=True):

Validator that resolves names and also ensures that they are not empty @param param_name: name @type param_name: str @param resolve: if True/omitted, the name will be resolved to

a global form. Otherwise, no resolution occurs.

@type resolve: bool @return: resolved parameter value @rtype: str

def valid_name_validator_resolved(param_name, param_value, caller_id):

Undocumented

def valid_name_validator_unresolved(param_name, param_value, caller_id):

Undocumented

def _set_caller_id(caller_id):

Internal API. Set the global name (i.e. caller_id) and namespace. Methods can check what the name of the current node is by calling get_caller_id.

The caller_id is important as it is the first parameter to any API call on a remote node. Invoked by ROSNode constructor @param caller_id: new caller ID @type caller_id: str

_caller_id =

Undocumented

_caller_namespace =

Undocumented

_mappings =

Undocumented

_resolved_mappings: dict =

Undocumented