Coming from the wonderful ROS framework, I’d like to get more familiar with ROS2 through a project.
I would like to build a versatile and useful mobile platform using the ESP32-cam module, leveraging the very low cost of it, the camera it comes with, and some extra bits and pieces to have a sort of “spy-bot”. It could have many other interesting uses (RC car, camera turret, model train controller…). I fully realize that the camera resolution will be low and update rate will be probably slow, but I’d like to try. The ESP32-cam module can control an H-bridge to actuate two motors, serve the camera image over WiFi and possibly do OTA updates…
These projects have done what I aim for, but without ROS2:
- GitHub - ANM-P4F/ESP32-CAM-ROBOT: In this project, I would like to show you how to make a simple surveillance robot with esp32-cam module
- ESP32 Camera Robot - FPV : 6 Steps - Instructables
- ESP32 CAM Based Surveillance Robot using Arduino IDE
I think using ROS2 framework would allow to build interesting applications by offloading the heavy computation to a computer. It would also allow to extend the hardware, such as using a game controller to control the platform.
I have researched ways to do this and I’ve found two options:
- The micro-ROS has been ported to ESP32 and can cross-compile functional programs. However, there are no examples on how to add an external library such as the epressif ESP32-camera library.
- micro-ROS for Arduino would be another option, as adding the camera library should be painless, but micro-ROS for Arduino does not support ESP32. There is a branch for that, however I have not tested it.
I could test the first approach, adding my own publishers and subscribers, but I was unsuccessful in adding the camera library. I do not want to rewrite the tested and functional library as part of this project if possible. I could not find any examples that add external libraries to a micro-ROS project and the file structure is too complex for me to navigate and understand.
I have not tested the second method yet.
My question is: at this point, what is the most promising method? Are there any resources that show how to add a library to micro-ROS or is the Arduino method perhaps easier?