rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.names Namespace Reference

Stand-ins for `rospy.names` in ROS2. More...

Functions

 get_name ()
 Returns fully resolved name of local node.
 
 get_namespace ()
 Returns namespace of local node.
 
 remap_name (name, caller_id=None, resolved=True)
 Returns a remapped topic/service name.
 
 resolve_name (name, caller_id=None)
 Resolve a ROS name to its global, canonical form.
 

Variables

 get_caller_id = get_name
 Backwards compatibility.
 

Detailed Description

Stand-ins for `rospy.names` in ROS2.

Function Documentation

◆ get_name()

rosros.rospify.names.get_name ( )

Returns fully resolved name of local node.

Definition at line 17 of file names.py.

◆ get_namespace()

rosros.rospify.names.get_namespace ( )

Returns namespace of local node.

Definition at line 26 of file names.py.

◆ remap_name()

rosros.rospify.names.remap_name (   name,
  caller_id = None,
  resolved = True 
)

Returns a remapped topic/service name.

Parameters
namename to remap
caller_idnamespace to resolve a relative or private name under, by default current node namespace
resolvedignored (does nothing in ROS1 also)
Returns
remapped name resolved to namespace, or original if not mapped

Definition at line 39 of file names.py.

◆ resolve_name()

rosros.rospify.names.resolve_name (   name,
  caller_id = None 
)

Resolve a ROS name to its global, canonical form.

Private ~names are resolved relative to the node name.

Parameters
namename to resolve.
caller_idnode name to resolve relative to. To resolve to local namespace, omit this parameter (or use None)
Returns
Resolved name. If name is empty/None, resolve_name returns parent namespace.

Definition at line 54 of file names.py.

Variable Documentation

◆ get_caller_id

rosros.rospify.names.get_caller_id = get_name

Backwards compatibility.

Definition at line 23 of file names.py.