[Documentation] [TitleIndex] [WordIndex


The ROS Master provides naming and registration services to the rest of the nodes in the ROS system. It tracks publishers and subscribers to topics as well as services. The role of the Master is to enable individual ROS nodes to locate one another. Once these nodes have located each other they communicate with each other peer-to-peer.

The Master also provides the Parameter Server.

The Master is most commonly run using the roscore command, which loads the ROS Master along with other essential components.


Advanced Users Only

The ROS Master provides an XMLRPC-based API, which ROS client libraries, such as roscpp and rospy, call to store and retrieve information. For a detailed API listing, please see the Master API page. Most ROS users will not need to interact with this API directly.

Master Name Service Example

For instance, let's say we have two Nodes; a Camera node and an Image_viewer node. A typical sequence of events would start with Camera notifying the master that it wants to publish images on the topic "images":

ROS_master_example_english_1.png DIA version

Now, Camera publishes images to the "images" topic, but nobody is subscribing to that topic yet so no data is actually sent. Now, Image_viewer wants to subscribe to the topic "images" to see if there's maybe some images there:

ROS_master_example_english_2.png DIA version

Now that the topic "images" has both a publisher and a subscriber, the master node notifies Camera and Image_viewer about each others existence so that they can start transferring images to one another:

ROS_master_example_english_3.png DIA version


In ROS 1.1, the implementation of the ROS Master is provided by the rosmaster package. Prior to this release, the Master was part of the rospy package.

2024-07-06 12:32