A ROS subscriber is a node entity that receives messages of a specified type from a named topic. Publishers and subscribers remain decoupled: middleware delivers matching messages without requiring either side to know the other's location. section 4.4 section 4.2
A subscriber connects four practical pieces:
- Topic name: identifies the logical channel, such as detected_objects or my_topic. section 4.4 section 4.2
- Message type: must match the publisher's type, such as ObjectList or std_msgs/msg/String. section 4.4 section 4.2
- Callback: runs when a message arrives and receives the message content as an argument. section 4.2 section 4.4
- Middleware and node: manage delivery and allow nodes to communicate across different deployments. section 4.2 section 4.4
A minimal rclpy subscriber
A Python node creates a subscription with the message class, topic name, callback, and queue-depth argument: self.subscription_ = self.create_subscription(String, 'my_topic', self.sub_callback, 10). The callback logs msg.data, while rclpy.spin(node) keeps the node processing incoming messages. section 4.4
Figure 4.5 A ROS graph consists of multiple independent nodes that communicate by publishing and subscribing to topics, relying on the middleware to deliver messages based on shared topic names and message types.
Use the ROS graph view to see independent nodes connected through topic names and message types, with middleware providing delivery. section 4.4






