ESP32-CAM Video on ROS

ESP32-CAM on ROS

Install the Micro-RTSP in Platformio (use the add library to a project tool)

https://github.com/geeksville/Micro-RTSP

The github version altough the same number is not the same installed by add library to a project tool, in platformio.

So dont mix the samples or you will get some linking errors.

This error can be the result of a bad powering, or bad board configuration (because there are more than one model of ESP32-CAM)

[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004

To fix it, it is a configuration issue, in setup(), try to change

cam.init(esp32cam_config);

to

cam.init(esp32cam_aithinker_config);

or to:

cam.init(esp32cam_ttgo_t_config);

 

The file folowing file have the configurarion for each model:

.pio/libdeps/esp32can/Micro-RTSP/OV3640.cpp

If we reduce the .frame_size we can make a more fluid video.

Change from

.frame_size = FRAMESIZE_SVGA,

To

.frame_size = FRAMESIZE_QVGA,

Its a good improvement

There are chances of some serial monitor issues,

Check, if  cannot see any output in platformio serial monitor.

 

Stream URL

rtsp://[IPADDRESS]:8554/mjpeg/1

In VLC choose :network-caching=0 in VLC

There are some issues with performance with ROS compared with VLC

For ESP32-Cam we need the following firmware

https://github.com/inaciose/esp32-cam-rtsp

 

For ROS we may use the following packages

http://wiki.ros.org/video_stream_opencv

sudo apt install ros-noetic-video-stream-opencv

Or

https://github.com/inaciose/sibot_video

Clone and catkin_make