CREATING A PUBLISHER AND SUBSCRIBER NODES USING PYTHON

Introduction. In ROS2(Robot Operating System 2), a node is the smallest executable unit that performs computation. It is essentially a process that communicates with other nodes to exchange data (via topics, services, or actions) and perform tasks in a robotic system. ROS 2 publishers and subscribers are the basic communication mechanism between nodes using topics. They can be created by either using python or C++ language. But in this blog we will be creating both the publisher and subscriber nodes using python. Prerequisites ROS installed. installing ros2 ROS2 workspace set up. creating a workspace Package setup. https://docs.ros.org/en/jazzy/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html Basic Understanding of ROS concepts(nodes, topic, messages). https://docs.ros.org/en/jazzy/Tutorials/Beginner-CLI-Tools.html Publisher-Subscriber Node in python In this case you will notice some small changes due to the language changes. 1. Create two ...