1.2.2 Build your own ROS Application – Publisher and subscriber nodes

Course subject(s) Module 1. ROS Essentials

This time, we will take a look at two different classes of ROS nodes: publishers and subscribers.

Publisher Nodes

A ROS node that generates information is called a publisher. A publisher sends information to nodes via topics. With robotics often these publishers are connected with sensors like cameras, encoders etc.

If you use the rosnode info command you can see with which topics a node is connected and if these are outbound or inbound connections.

Subscriber Nodes

A ROS node that receives information is called a subscriber. It’s subscribed to information in a topic and uses topic callback functions to process the received information. With robotics, subscribers typically monitor system states such as triggering an alert when the robot reaches joint limits.

You can again use the rosnode info command to find information about a subscriber node. Don’t forget to source your workspace!

Creative Commons License
Hello (Real) World with ROS - Robot Operating System by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/hello-real-world-with-ros-robot-operating-systems//.
Back to top