Hello everyone,
to control mobile robots, I am using MQTT for wireless communication between the host machine and the robots in the field. The motion commands that are sent to the robot over MQTT set the PWM to control the motors. The motion response of the robot usually lies in the range of 5-100ms (the time the robot reacts to the new command), but very often it drops to 200-300ms, which causes a big momentum and leads to an overshoot.
I've tested response time with the following tests:
1. The robot subscribes to the echo request channel and creates a timestamp before sending it to the echo response channel as soon as a new request arrives. In this case, the latency is 4 to 10 ms.
2. The robot gets a new motion command, prints the command to stdout with the timestamp, or sets the PWM duty cycle. Around 40% of the time, the latency exceeds 100 ms and ranges from 4 ms to 300 ms.
As far as I understand, CYW43 should send the incoming data to RP2040 over SPI to perform actions that lie in the responsibility of the RP2040 chip, and the delay could occur as a result of some polling timeout. Are there any configurations or specific implementations I'm missing that could help reduce the delay?
If you could help me, that would be really, really great.
to control mobile robots, I am using MQTT for wireless communication between the host machine and the robots in the field. The motion commands that are sent to the robot over MQTT set the PWM to control the motors. The motion response of the robot usually lies in the range of 5-100ms (the time the robot reacts to the new command), but very often it drops to 200-300ms, which causes a big momentum and leads to an overshoot.
I've tested response time with the following tests:
1. The robot subscribes to the echo request channel and creates a timestamp before sending it to the echo response channel as soon as a new request arrives. In this case, the latency is 4 to 10 ms.
2. The robot gets a new motion command, prints the command to stdout with the timestamp, or sets the PWM duty cycle. Around 40% of the time, the latency exceeds 100 ms and ranges from 4 ms to 300 ms.
As far as I understand, CYW43 should send the incoming data to RP2040 over SPI to perform actions that lie in the responsibility of the RP2040 chip, and the delay could occur as a result of some polling timeout. Are there any configurations or specific implementations I'm missing that could help reduce the delay?
If you could help me, that would be really, really great.
Statistics: Posted by Timossis — Tue Apr 29, 2025 10:17 am