Skip to content

fix(uxrce_dds_client): drain rx buffer by time budget instead of fixe…#27422

Open
SofianElmotiem wants to merge 2 commits into
PX4:mainfrom
SofianElmotiem:SofianElmotiem/fix-uxrce-dds-rx-buffer-overrun
Open

fix(uxrce_dds_client): drain rx buffer by time budget instead of fixe…#27422
SofianElmotiem wants to merge 2 commits into
PX4:mainfrom
SofianElmotiem:SofianElmotiem/fix-uxrce-dds-rx-buffer-overrun

Conversation

@SofianElmotiem
Copy link
Copy Markdown
Contributor

fix(uxrce_dds_client): drain rx buffer by time budget instead of fixed iterations

at high inbound topic rates like 100hz the old 10 iteration cap wasnt
enough to drain the udp rx buffer, causing the xrce session to silently
break and stop publishing data

Solved Problem

Fixes #27388

Solution

replaced the fixed 10 iteration drain loop with a 3ms time-budget loop.
at 100hz inbound (e.g. vehicle_visual_odometry for SLAM) the udp receive
buffer fills faster than 10 iterations can drain it. the session then
loses track of state and silently stops publishing. draining until the
buffer is empty or the budget expires fixes this without starving other
work on the queue.

Changelog Entry

Bugfix: uxrce_dds_client stops publishing data at high inbound topic
rates (e.g. 100 Hz vehicle_visual_odometry) UDP rx buffer overrun
now handled correctly

Test coverage

Reproduced by reporter in issue #27388 confirmed working at 100Hz
after reducing to 10Hz as a workaround. reporter to validate fix on
hardware.

Context

#27388

…d iterations

at high inbound topic rates like 100hz the old 10 iteration cap wasnt
enough to drain the udp rx buffer, causing the xrce session to silently
break and stop publishing data

Signed-off-by: SofianElmotiem <sofianelmotiem@gmail.com>
@github-actions github-actions Bot added kind:bug Something is broken or behaving incorrectly. scope:offboard Offboard mode, external setpoints, companion-computer control, or offboard failsafe behavior. scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something is broken or behaving incorrectly. scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. scope:offboard Offboard mode, external setpoints, companion-computer control, or offboard failsafe behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] uxrce_dds_client stops publishing data after random uptime, requires flight controller reboot to recover

1 participant