Support for ROS Names
See: U{http://wiki.ros.org/Names}
Function | canonicalize |
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 |
Get mapping table with unresolved names |
Function | get |
Get mapping table with resolved names |
Function | global |
Validator that checks for valid, global graph resource name. @return: parameter value @rtype: str |
Function | initialize |
Initialize the remapping table based on provide node name. |
Function | isstring |
Undocumented |
Function | reload |
Re-initialize the name remapping table. |
Function | resolve |
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 |
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 |
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 |
Undocumented |
Function | valid |
Undocumented |
Function | _set |
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 |
Undocumented |
Variable | _caller |
Undocumented |
Variable | _mappings |
Undocumented |
Variable | _resolved |
Undocumented |
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
Get mapping table with unresolved names
@return: command-line remappings {name: name} @rtype: {str: str}
Get mapping table with resolved names
@return: command-line remappings {name: name} @rtype: {str: str}
Initialize the remapping table based on provide node name.
@param node_name: name of node (caller ID) @type node_name: str
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]
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
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
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
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