Skip to content
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

Commander: always allow to switch to LAND mode, also if requirements are not met #23580

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Aug 20, 2024

Solved Problem

The manual trigger of "Land" mode is often done in emergencies, when you want the vehicle to stop the current operation and land ("come down") at the current spot. As it is though an auto flight mode, the Land mode gets rejected when e.g. local position is invalid. In these scenarios the only option for the pilot is to land the vehicle manually, which is a more complex action than clicking on a single button. And for VTOL there comes additional complexity should the pilot have to land it manually, as in that case he/she has to also trigger the transition manually. If in Land/Descend mode the transition to Hover is automatically done.

Solution

For now hard-coded that the switching into Land does never get rejected. We maybe want to hide it behind a param or an extra field in the mavlink messages (see #Alternatives).

Changelog Entry

For release notes:

Feature: Commander: always allow to switch to LAND mode, also if requirements are not met

Alternatives

  • we could make a parameter "always allow to manually switch to Land mode" and link the forcing of the mode to it
  • add "force" flag to mavlink messages MAV_CMD_DO_SET_MODE and MAV_CMD_NAV_LAND

Context

Screenrecording of simulation of targeted use case:

  • VTOL flying GPS denied, dead-reckons for a while until position accuracy too low (COM_POS_FS_EPH)
  • to prevent failsafe action, user switches to manual Altitude mode
  • to land vehicle, user click on "Land" button --> mode is not rejected but system immediately switches to the Land failsafe, which is Descend

Note: requires this fix: #23578

QGC_VTOL_Land_GPS_denied.mp4

@KonradRudin
Copy link
Contributor

This is only needed because QGC cannot distinguish between LAND and Descend and we can't set DESCEND right? because the proper way would be to actually try to switch to the descend mode directly from AMC, right?

@sfuhrer
Copy link
Contributor Author

sfuhrer commented Sep 3, 2024

This is only needed because QGC cannot distinguish between LAND and Descend and we can't set DESCEND right? because the proper way would be to actually try to switch to the descend mode directly from AMC, right?

Basically yes, though it's not only in QGC where the interface for switching into Descend is missing, but also in Mavlink and PX4 (where the state machine is built up such that it can only be entered as a fall-back flight flight).

My argument with this PR is that the mayor intent of a pilot that is triggering a "Land" is to "come down roughly at the current position", which is still fulfilled by Descend.

Special handling for LAND mode: always allow to switch into it such that if used
as emergency mode it is always available. When triggering it the user generally wants
the vehicle to descend immediately, and if that means to switch to DESCEND it is fine.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer force-pushed the pr-commander-always-allow-land-main branch from bfa0cd6 to a4dc889 Compare September 3, 2024 08:12
@sfuhrer sfuhrer marked this pull request as ready for review September 3, 2024 08:13
@sfuhrer sfuhrer merged commit 6fa6360 into main Sep 3, 2024
55 checks passed
@sfuhrer sfuhrer deleted the pr-commander-always-allow-land-main branch September 3, 2024 16:10
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.

3 participants