Skip to content

AUTO_LAND: Require fully valid local position again #25280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbjd
Copy link
Contributor

@mbjd mbjd commented Jul 24, 2025

Solved Problem

The current mode requirements allow FlightTaskAuto to start with invalid local position. But regardless of failsafe_flags.local_position_invalid_relaxed, FlightTask populates its _position with NaN when it is invalid in the proper sense. This then leads to various problems such as:

  • erroneously disallowed nudging due to the MPC_LAND_RADIUS check returning NaN
  • not even publishing a trajectory setpoint from FlightModeManager::generateTrajectorySetpoint due to another position validity check that does not know the concept of local_position_invalid_relaxed

Solution

This reverts the mode requirements to valid local position again. This causes the existing FlightTaskDescend to be engaged when position goes invalid, so that nudging inputs are still executed, even at the cost of losing any position stabilisation.

This reverts commit 2f69f3f, PR #23917.

Longer term, the functionality aimed at in #23917 should probably be made available with a separate FlightTask that works with invalid position, but valid velocity estimates.

FlightTaskAuto does not properly support the case of invalid but
!invalid_relaxed local position yet. This reverts the mode requirements
to valid local position again, until we support it in FlightTaskAuto or
a separate FlightTask for this specific case.

This reverts commit 2f69f3f, PR #23917.
@mbjd mbjd requested review from MaEtUgR, RomanBapst and sfuhrer July 24, 2025 07:35
@hamishwillee
Copy link
Contributor

If this changes, may need update to https://docs.px4.io/main/en/flight_modes_mc/land.html (usually the top info section)

@mbjd
Copy link
Contributor Author

mbjd commented Jul 24, 2025

  • Mode requires at least a valid local position estimate (does not require a global position).
    • Flying vehicles can't switch to this mode without valid local position.
    • Flying vehicles will failsafe if they lose the position estimate.

The docs make no mention of the mode supporting invalid but not invalid_relaxed local position, also there was no docs update accompanying the original #23917. Therefore I think the docs are actually more correct after the proposed change than before it :)

@mbjd mbjd changed the title Require fully valid local position for AUTO_LAND again FlightTaskAuto: Require fully valid local position again Jul 24, 2025
@mbjd mbjd changed the title FlightTaskAuto: Require fully valid local position again AUTO_LAND: Require fully valid local position again Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants