Ros Esp32cam Diffdrive

This is a ROS 2 & Micro-ROS project to control an RC tank with differential drive (skid steering) with an ESP32-CAM module.

Internet of Things (IoT)CMIT

Abstract

Ros Esp32cam Diffdrive is an open-source Internet of Things (IoT) project. This is a ROS 2 & Micro-ROS project to control an RC tank with differential drive (skid steering) with an ESP32-CAM module. It is built using C, ESP32. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.

1. Introduction

This is a ROS 2 & micro-ROS project to control an RC tank with differential drive (skid steering) with an ESP32-CAM module. I'm using an XBox 360 gamepad connected to a PC running Ubuntu 20.04 and ROS 2 Foxy as teleoperation input. This data is then sent via Wi-Fi to an ESP32-CAM microcontroller running micro-ROS which transforms the input to PWM signals controlling the 2 motors.

At a later stage, the video of the ESP32-CAM module should be sent back to ROS 2 for further processing or display.

However, it will probably fail on more recent versions of Ubuntu and ROS2, since the developers now recommend using a micro-ROS component for ESP-IDF on the micro-ROS iron branch instead.

2. Objective

This is a ROS 2 & Micro-ROS project to control an RC tank with differential drive (skid steering) with an ESP32-CAM module.

This project demonstrates how C, ESP32 can be applied to a real-world Internet of Things (IoT) problem.

4. Technology Stack

CESP32

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Arduino IDE / PlatformIO or a C compiler (gcc)
  • Target board where applicable
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/Reinbert/ros_esp32cam_diffdrive.git
cd ros_esp32cam_diffdrive
# Source the ROS 2 installation, if you haven't added it to your .bashrc file.
source /opt/ros/foxy/setup.bash

# Create a workspace and download the micro-ROS tools
mkdir microros_ws
cd microros_ws
git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup

# Update dependencies using rosdep
sudo apt update && rosdep update
rosdep install --from-path src --ignore-src -y

# Install pip
sudo apt-get install python3-pip

# Build micro-ROS tools and source them
colcon build
source install/local_setup.bash

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add a mobile dashboard using Blynk or Firebase
  • Store readings in a cloud database for history charts
  • Add alerts via SMS / Telegram when thresholds are crossed

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Which microcontroller / board and sensors are used and why?
  2. How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
  3. Where is the sensor data stored and visualised?
  4. How is power consumption managed?
  5. How would you secure the device and its communication?

9. Source Code & License

This project is developed by Reinbert and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Internet of Things (IoT) Internship