Posts

Showing posts from June, 2025

CREATING A PUBLISHER AND SUBSCRIBER NODES USING PYTHON

Image
  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 . Setting up a package Basic Understanding of ROS concepts(nodes, topic, messages). Basic knowledge on ROS Publisher-Subscriber Node in python In this case you will notice some small changes due to the language changes. 1. Create two ROS2 Run the below commands in terminal: cd ~ / ros2_ws / src # Create publisher package ros2 pkg create - - build - typ...