rospy overview: Initialization and Shutdown | Messages | Publishers and Subscribers | Services | Parameter Server | Logging | Names and Node Information | Time | Exceptions | tf/Overview | tf/Tutorials | Python Style Guide

The most common API routines for getting information about your node and working with names are described below.

Accessing node information

rospy.get_name()

  • Get the fully-qualified name of this node

rospy.get_namespace()

  • Get the namespace of this node

rospy.get_node_uri()

  • Get the XMLRPC URI of this node

Manipulating Names

Advanced users: For a node-independent library for manipulating ROS names, please see rospy.names and rosgraph.names.

rospy.resolve_name(name, caller_id=None)

  • Resolve a ROS name to its global, canonical form. Private ~names are resolved relative to the node name. To resolve a name relative to a different node name (aka "caller ID"), use the caller_id parameter. To resolve to local namespace, omit this parameter (or use None)

Wiki: rospy/Overview/Names and Node Information (last edited 2016-10-03 17:11:07 by jarvisschultz)