Main Content

Differential drive robot using ROS2, micro-ROS and ESP32

In this project, we had build a differential drive robot using EPS32 microcontroller. ROS2 humble is used for controlling the robot. Micro-ROS is uses for connecting ESP32 to ROS2 running computer.

Softwares used
- Ubuntu 22.04
- ROS2 humble (Install ros2 humble by following this link)
- Arduino IDE
- Basic knowledge on ROS2 concepts (Follow this youtube playlist, if you are beginner in ROS2)
- Setup micro-ROS libraries on arduino IDE for ESP32 and install micro- ROS agent on your computer by following this tutorial.(IMPORTANT)

- ESP32 subscribes /cmd_vel topic published from computer using teleop_twist_keyboard
- /cmd_vel topic contains required linear and angular velocities of the robot.
- Linear and angular velocities are converted to right wheel and left wheel velocities using differential drive kinematics equations.
- Motor speed is controlled using PID controller. PID controller is implemented on ESP32 by taking feedback from wheel encoders.
- Wheel Odometry is published from ESP32.”

Link to article