EzRover is a framework for building and programming inexpensive differential drive robots. The framework includes closed loop speed control, pose estimation and go to goal behavior. Behaviors can be added in JavaScript. The first hardware instantiation uses an ESP32cam, an L9110S DC Motor Driver and a cheap Robot Car chassis.
image size; smaller images, especially 640x480 and below, produce better frame rates
number of frame buffers allocated. There should be at least 2 buffers allocated. This is only possible for lower resolution modes and with PRAM available.
The clock rate. It turns out a lower clock rate can enhance framerate on low resolutions, perhaps because all the work the sensor does can be done within a single frame. See https://github.com/espressif/esp32-camera/issues/15
experiment with combinations of image size, frame buffers and clock rate to optimize frame rate
do this with and without factoring in the transfer of the images, so that we see the raw rate and the overhead imparted by transferring to the web UI.
Review partition table settings to make sure they support the configuration. If possible leave memory for OTA, as that would be a much nicer way of programming the board.
Add a compile flag to fix the frame size, number of buffers allocated and the clock rate to the chose parameters
Hide the camera properties UI when the image properties are fixed.
Hard code the camera properties endpoint to return the fixed properties.
Donkeycar uses 160x120, so that might be what we want here. However 640x480 is much better quality for FPV, so maybe we want a way to switch between these two mode.
Camera frame rate is influences by
NOTE: the way memory is partitioned is important to make sure there is enough available for multiple frame buffers. The ESP32-Cam example sketches us the 'Huge APP' partition scheme. So we should make sure we've made enough memory available for our system to have multiple frame buffers. See https://iotespresso.com/how-to-set-partitions-in-esp32/ See this for how to set partition table in platformio https://community.platformio.org/t/partion-scheme-no-ota-with-platformio/13102/8 See relevant PlatformIO docs https://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
Tasks;
Donkeycar uses 160x120, so that might be what we want here. However 640x480 is much better quality for FPV, so maybe we want a way to switch between these two mode.