Warning: do not use this library. It is unstable and most of the routines here have been superseded by other libraries (e.g. genmsg). These routines will likely be deleted in future releases.
Function | anonymous |
Generate a ROS-legal 'anonymous' name |
Function | canonicalize |
Put name in canonical form. Extra slashes '//' are removed and name is returned without any trailing slash, e.g. /foo/bar @param name: ROS name @type name: str |
Function | get |
@param env: environment dictionary (defaults to os.environ) @type env: dict @param argv: command-line arguments (defaults to sys.argv) @type argv: [str] @return: ROS namespace of current program @rtype: str... |
Function | is |
Test if name is a global graph resource name. |
Function | is |
Validates that name is a legal base name for a graph resource. A base name has no namespace context, e.g. "node_name". |
Function | is |
Check if name is a legal ROS name for graph resources (alphabetical character followed by alphanumeric, underscore, or forward slashes). This constraint is currently not being enforced, but may start getting enforced in later versions of ROS. |
Function | is |
Validates that name is a legal resource base name. A base name has no package context, e.g. "String". |
Function | is |
Check if name is a legal ROS name for filesystem resources (alphabetical character followed by alphanumeric, underscore, or forward slashes). This constraint is currently not being enforced, but may start getting enforced in later versions of ROS. |
Function | is |
Test if name is a private graph resource name. |
Function | isstring |
Undocumented |
Function | load |
Load name mappings encoded in command-line arguments. This will filter out any parameter assignment mappings (see roslib.param.load_param_mappings()). |
Function | make |
Resolve a local name to the caller ID based on ROS environment settings (i.e. ROS_NAMESPACE) |
Function | make |
Convert name to a global name with a trailing namespace separator. |
Function | namespace |
Get the namespace of name. The namespace is returned with a trailing slash in order to favor easy concatenation and easier use within the global context. |
Function | ns |
Join a namespace and name. If name is unjoinable (i.e. ~private or /global) it will be returned without joining |
Function | package |
Split a name into its package and resource name parts, e.g. 'std_msgs/String -> std_msgs, String' |
Function | resolve |
Resolve a ROS name to its global, canonical form. Private ~names are resolved relative to the node name. |
Function | resource |
Convert package name + resource into a fully qualified resource name |
Function | resource |
pkg/typeName -> typeName, typeName -> typeName |
Function | resource |
pkg/typeName -> pkg, typeName -> None |
Constant | ANYTYPE |
Undocumented |
Constant | BASE |
Undocumented |
Constant | BASE |
Undocumented |
Constant | GLOBALNS |
Undocumented |
Constant | NAME |
Undocumented |
Constant | PRIV |
Undocumented |
Constant | PRN |
Undocumented |
Constant | REMAP |
Undocumented |
Constant | RESOURCE |
Undocumented |
Constant | SEP |
Undocumented |
Function | _is |
Undocumented |
Put name in canonical form. Extra slashes '//' are removed and name is returned without any trailing slash, e.g. /foo/bar @param name: ROS name @type name: str
@param env: environment dictionary (defaults to os.environ) @type env: dict @param argv: command-line arguments (defaults to sys.argv) @type argv: [str] @return: ROS namespace of current program @rtype: str
Test if name is a global graph resource name.
@param name: must be a legal name in canonical form @type name: str @return: True if name is a globally referenced name (i.e. /ns/name) @rtype: bool
Validates that name is a legal base name for a graph resource. A base name has no namespace context, e.g. "node_name".
Check if name is a legal ROS name for graph resources (alphabetical character followed by alphanumeric, underscore, or forward slashes). This constraint is currently not being enforced, but may start getting enforced in later versions of ROS.
@param name: Name @type name: str
Validates that name is a legal resource base name. A base name has no package context, e.g. "String".
Check if name is a legal ROS name for filesystem resources (alphabetical character followed by alphanumeric, underscore, or forward slashes). This constraint is currently not being enforced, but may start getting enforced in later versions of ROS.
@param name: Name @type name: str
Test if name is a private graph resource name.
@param name: must be a legal name in canonical form @type name: str @return bool: True if name is a privately referenced name (i.e. ~name)
Load name mappings encoded in command-line arguments. This will filter out any parameter assignment mappings (see roslib.param.load_param_mappings()).
@param argv: command-line arguments @type argv: [str] @return: name->name remappings. @rtype: dict {str: str}
Resolve a local name to the caller ID based on ROS environment settings (i.e. ROS_NAMESPACE)
@param name: local name to calculate caller ID from, e.g. 'camera', 'node' @type name: str @return: caller ID based on supplied local name @rtype: str
Convert name to a global name with a trailing namespace separator.
@param name: ROS resource name. Cannot be a ~name. @type name: str @return str: name as a global name, e.g. 'foo' -> '/foo/'.
This does NOT resolve a name.
@rtype: str @raise ValueError: if name is a ~name
Get the namespace of name. The namespace is returned with a trailing slash in order to favor easy concatenation and easier use within the global context.
- @param name: name to return the namespace of. Must be a legal
- name. NOTE: an empty name will return the global namespace.
@type name: str @return str: Namespace of name. For example, '/wg/node1' returns '/wg/'. The
global namespace is '/'.
@rtype: str @raise ValueError: if name is invalid
Join a namespace and name. If name is unjoinable (i.e. ~private or /global) it will be returned without joining
@param ns: namespace ('/' and '~' are both legal). If ns is the empty string, name will be returned. @type ns: str @param name str: a legal name @return str: name concatenated to ns, or name if it is
unjoinable.
@rtype: str
Split a name into its package and resource name parts, e.g. 'std_msgs/String -> std_msgs, String'
@param name: package resource name, e.g. 'std_msgs/String' @type name: str @return: package name, resource name @rtype: str @raise ValueError: if name is invalid
Resolve a ROS name to its global, canonical form. Private ~names are resolved relative to the node name.
@param name: name to resolve. @type name: str @param namespace_: node name to resolve relative to. @type namespace_: str @param remappings: Map of resolved remappings. Use None to indicate no remapping. @return: Resolved name. If name is empty/None, resolve_name returns parent namespace_. If namespace_ is empty/None, @rtype: str
Convert package name + resource into a fully qualified resource name
@param res_pkg_name: name of package resource is located in @type res_pkg_name: str @param name: resource base name @type name: str @param my_pkg: name of package resource is being referred to
in. If specified, name will be returned in local form if res_pkg_name is my_pkg
@type my_pkg: str @return: name for resource @rtype: str
pkg/typeName -> typeName, typeName -> typeName
Convert fully qualified resource name into the package-less resource name @param name: package resource name, e.g. 'std_msgs/String' @type name: str @return: resource name sans package-name scope @rtype: str