Line Following Custom Robot in Webots using ROS2

WIsh to get started with ROS2 on an interesting project…!!? Here’s an interesting Hello World project of ROS2… Line Following Custom Robot…!! This project will take you through the basics of everything, from ROS2 services, publishers, subscribers to ROS2 launch file setup. The project is implemented in a very user-friendly robotics physics simulator called Webots. It implements the concept of a master and slave where the master publishes msgs on a topic and the slave subscribes to them. Here a custom robot is made to follow a line. 3 sensors in front of the robot detects the color below it, using which we know the difference between the black and the blue color and make sure that the robot follows the black color. Using rqt_graph (visualization of nodes and topics) we can see that the master node subscribes to the sensor topics and does calculations and publishes to /cmd_vel topic which gets subscribed to by the slave node. Here the slave node acts as the bridge between Webots and ROS2 and the master node is like the brain written in ROS2.
Following is the Youtube Link:

Following is the project implementation link:
https://github.com/cyberbotics/webots_ros2/tree/master/webots_ros2_tutorials

1 Like