MQTT/Ethernet message throttling at control cycle of <0.03 (1 message every 30ms) #9996
Open
1 task done
Labels
Status: Awaiting triage
Issue is waiting for triage
Board
Olimex esp32-EVB-IND
Device Description
Default esp32-evb-ind connected using LAN link-local only with Static IP connected to laptop
Hardware Configuration
Only LAN Cable conncted
Version
v3.0.0
IDE Name
Arduino IDE
Operating System
Ubuntu 22
Flash frequency
80MHz
PSRAM enabled
yes
Upload speed
115200
Description
I am using the olimex esp32-evb-ind to execute the position,velocity and acceleration of a robotic arm. The path is generated on a cpu and the coordinates are then sent to the esp32 over ethernet cable.
When sending data over a control cycle of 0.04 (1 point generated every 0.04s or 40ms). The communication time from the cpu to esp32 is avg around 4ms (RTT) ie 2ms for communication
<style type="text/css"></style>
But if i reducee the control cycle to below 0.03, eg at 0.01, there seems to be significant lag and pile-up of messages causing constant lag
<style type="text/css"></style>
I tried controlling the background processes by creating the mqtt callback task to pin to a core using xTaskCreatePinnedToCore. Such that it was run on core 0 as well as core 1, but the lag seems to remain.
Also the lag seems to be more on control cycle of 0.02 and 0.03 - <style type="text/css"></style>
I tried changing the message data size, sending in json format or as encoded byte format, but there seems to be almost no difference in the processing time.
Is this a limitation with the cpu processing capabilities of the esp32 that its not able to process points at such high frequencies.
The esp32 DOIT kit which runs WROOM-32 is able to achieve faster times with uart at a baud rate of 4000000. It seems counterintuitive that uart is faster here than ethernet or mqtt over LAN.
I have connected the esp32 over a link-local only lan setup and no router, the ping times are around 0.3ms.
Sketch
Debug Message
Other Steps to Reproduce
Try publishing messages over MQTT at a rate of 10ms or 20ms or 30ms.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: