You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
offboard: give watchdog grace period from when setpoints start
process_heartbeat() stops setpoint streaming when the vehicle is not in
offboard mode more than 3 seconds after _last_started. However,
_last_started is only ever written in start(), so before the first
start() it is still default-initialized (epoch 0) and the 3-second
guard is always satisfied: any heartbeat arriving between the first
set_*() and start() resets the setpoint state, and start() then fails
with NoSetpointSet.
In real-time use the window between set_*() and start() is rarely hit
at 1 Hz heartbeats. In lockstep simulation with a speed factor this
becomes frequent: at 30x, PX4's heartbeats arrive every ~33 ms of wall
time, and the PX4 SITL integration tests failed on
Offboard::start() roughly one run in three.
Stamp _last_started whenever streaming transitions out of NotActive, so
the watchdog's grace period covers the gap between the first setpoint
and start(), as intended by the existing 'don't stop too eagerly'
comment.
We also rename _last_started because the name isn't quite right.
Signed-off-by: Julian Oes <julian@oes.ch>
0 commit comments