fix(fw_mode_manager/navigator): use the correct waypoint switching distance (#27571)

* fix(fw_mode_manager/navigator): use the correct switch distance

Before https://github.com/PX4/PX4-Autopilot/pull/24056, the fixed-wing
position controller used to publish the acceptance radius (calculated
depending on params and state by DirectionalGuidance::switchDistance) in
the position controller status.

The refactor migrated that to individual lateral/longitudinal topics,
but left the receiving code in the navigator unchanged. As a
consequence, fixed-wing vehicles now rely on NAV_ACC_RAD for the
acceptance radius, rather than the adaptively calculated switchDistance.

As NAV_ACC_RAD is only 10m by default this leads to overshoot,
especially on tight corners.

Fix by reintroducing the publication (now from FixedWingModeManager
through fixed_wing_lateral_guidance_status) and using it in navigator. 

* fix(navigator_main): only listen to position controller status if rover

rover_ackermann is the only remaining publisher after #24056

* style(msg): improve field description

 - @INVALID NaN
 - Describe relation with NAV_ACC_RAD

* style(fw_mode_manager): remove stale include

* docs(navigator): clarify acceptance logic in param description
This commit is contained in:
Balduin
2026-06-04 17:51:17 +02:00
committed by GitHub
parent 890c65e69d
commit 07bac1389c
6 changed files with 21 additions and 8 deletions

View File

@@ -9,5 +9,6 @@ float32 bearing_feas # [@range 0,1] bearing feasibility
float32 bearing_feas_on_track # [@range 0,1] on-track bearing feasibility
float32 signed_track_error # [m] signed track error
float32 track_error_bound # [m] track error bound
float32 switch_distance # [m] [@range 0, INF] [@INVALID NaN] distance from the current waypoint at which the navigator should advance to the next one (turn anticipation). If below NAV_ACC_RAD, the parameter value is used instead.
float32 adapted_period # [s] adapted period (if auto-tuning enabled)
uint8 wind_est_valid # [boolean] true = wind estimate is valid and/or being used by controller (also indicates if wind estimate usage is disabled despite being valid)