feat(FWModeManager): runway takeoff set yaw setpoint to bearing to takeoff waypoint#27859
feat(FWModeManager): runway takeoff set yaw setpoint to bearing to takeoff waypoint#27859sfuhrer wants to merge 1 commit into
Conversation
|
@ryanjAA what's your opinion here? Bring back |
…keoff WP Signed-off-by: Silvan <silvan@auterion.com>
d4008af to
3df0a39
Compare
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 48 byte (0 %)]px4_fmu-v6x [Total VM Diff: 56 byte (0 %)]Updated: 2026-07-10T09:32:55 |
|
@sfuhrer I’m fine not bringing RWTO_HDG back, but I don’t think we should merge the constant-bearing version. Feeding the wheel controller sp.course_setpoint (which is already returned by navigateLine rather than the raw takeoff_bearing) Before #24056 , runway takeoff ran NPFG line guidance and passed _npfg.getBearing() into the yaw/wheel controller (sp.course_setpoint is the current equivalent I think). The raw takeoff_bearing only commands the tangent of the takeoff line. It will correct an initial heading error, but after a lateral disturbance, wheel bias (which we often see), GNSS shift, wind, it has no mechanism to recapture the line. the aircraft can continue parallel to it. On our large planes with a long ground roll, that matters. A good thing we always tell people is to think about how much a 3° error over 200m is… i.e. ~10.5m laterally.. Another point, #24056 also removed RWTO_NPFG_PERIOD, so using sp.course_setpoint restores the old command structure but not necessarily the exact old ground-roll tuning. I don’t think that means we need the RWTO_HDG toggle back, but we should verify that the normal NPFG period gives acceptable wheel-steering response or decide whether a ground-specific period is still needed. My vote: hardcode line tracking on, with no RWTO_HDG parameter: fw_runway_control.wheel_steering_yaw_setpoint = sp.course_setpoint; Before merging, can we run SITL cases with an initial heading error, a lateral displacement or wheel bias introduced during the roll, and crosswind? I’d specifically want yo ensure cross-track convergence, wheel saturation, and whether the corrected-course command introduces any oscillation. This is also the right primitive for future taxi/ground-steering waypoint support (which we will push soon from prev version). The mode manager generates a path-corrected course and the wheel controller tracks it. |
|
I agree with @ryanjAA - but this PR is already a strict improvement compared to the current behavior isn't it? For larger vehicles with longer runway time it's probably not ideal, but for smaller ones it's probably already sufficient. If there's time to implement the line tracking though then it would probably be the best solution |
|
I went back and forth between line tracking and bearing tracking. In the end I preferred bearing for the sake of simplicity. The line tracking brings NPFG back into the control loop, which is optimized for the flying state and not separately tunable. |
Solved Problem
In older PX4 versions we used to steer the vehicle towards the takeoff waypoint with the wheel controller. This got removed in #24056. Since then the wheel controller just tracks the heading it was initialized with. When the vehicle is well aligned with runway center line it may get off the runway during the takeoff.
Solution
Set the wheel controller heading setpoint to the bearing from "takeoff start" point (measurement) to "takeoff waypoint" (planned).

Changelog Entry
For release notes:
Alternatives
RWTO_HDG) to chose between 0 = hold initial airframe heading, 1 = track heading towards the takeoff waypoint. I would prefer to avoid adding back a setting that few people really ever cared about.DirectionalGuidance::guideToPath()Test coverage
Untested.
Context
Related links, screenshot before/after, video