23 Commits

Author SHA1 Message Date
Silvan Fuhrer
6b3e3aa363 Commander: improve param description of COM_POSCTL_NAVL and rename Manual-->Stabilized
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-29 10:56:04 +02:00
Silvan Fuhrer
e0bb56b6a7
Commander: Failsafe: set clear condition for action Land like for RTL (#23569)
For many failsafes, it is possible to select RTL and Land as actions.
In this commit I synchronize the clear condition for these two action
options, to always only clear on Disarm or manual mode change.
Reasoning is that for the user RTL and Land is a similar action and
I would thus expect them to be as similar as possible. And I in general
would rather not clear a failsafe state instead of too often clearing it.

Example: GF failsafe with action Land --> even if the drone is marginally
within the GF again, I want it to proceed with the Landing unless
I manually intervene.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-22 14:03:24 +02:00
bresch
25fcb3c913 comander: trigger failsafe when navigator reports failure 2024-08-14 11:08:02 +02:00
Matthias Grob
e06629bfe5 failsafe: unhealthy battery during spoolup leads to disarm
battery failures can occur upon arming when the load gets sgnificant.
In that case the safest thing to do is prevent a takeoff before anything
worse happens.
2024-07-30 14:37:11 +02:00
Silvan Fuhrer
6373d8d243
commander: low flight time failsafe: set UserTakeoverAllowed::Auto to enter Hold first (#22887)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-03-14 16:30:06 +01:00
Silvan Fuhrer
00cc68baa1
Commander: make low remaining flight time configurable and fix clearing condition (#22863)
* Commander: make low remaining flight time configurable and do not clear

- add _ACT param to disable/warning/RTL this feature
- publish rtl flight time estimate also in RTL, and thus fix re-validation
- make failure message clearer, distinguish from battery low

* battery check: add hysteresis for declaring battery_low_remaining_time false again


---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: KonradRudin <98741601+KonradRudin@users.noreply.github.com>
2024-03-12 12:56:01 +01:00
Silvan Fuhrer
2865bbb8ab Geofence: rework messaging and notification
- do reporting of breaching in-air only in geofenceCheck
- remove geofence_violation_reason_t
- replace geofence_breached field in GeofenceResult.msg with 3 fields
(one for each GF type: max dist, max alt, custom geofence)
- the warning message after breaching a GF is only done by Commander,
and it's specific to the GF type failure

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-22 21:45:02 -05:00
bresch
3acc29410a failsafe: disarm if battery failure is detected during spoolup 2023-11-07 17:38:06 -05:00
Silvan Fuhrer
54d26e084a
Commander: windCheck: add COM_WIND_MAX_ACT param to set high wind failsafe action (#21373)
Has options *None where the check is disabled, and *Warning, where only a warning is
published (which replaces the high wind warning from the COM_WIND_WARN limit).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-06 11:58:21 +01:00
Konrad
679a532e61 failsafe: When rtl_time_estimate failsafe is triggered, only disable it when the user changes the mode, or it is disarmed. 2023-09-13 16:19:08 +02:00
Beniamino Pozzan
957a06a780 Fix enum for COM_RC_IN_MODE in failsafe
add enum RcInMode

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-06-19 08:04:43 +02:00
Beat Küng
83c8c79af5
commander failsafe: add API to defer failsafes 2023-02-07 19:27:51 -05:00
Silvan Fuhrer
9b3a28dff5 Commander: add local_position_accuracy_low flag, incl. warning and RTL
Set this flag to true if local position is valid but accuracy low, such that
the operator can be warned before system switches to position-failure failsafe.
Additionally, switch to RTL if currently in Mission or Loiter to try to reach home
or fly out of GNSS-denied area.

Set low accuracy threshold to 50m by default for FW and VTOL.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 16:47:11 +01:00
Beat Küng
b1709743f7 commander: add wind or flight time limit exceeded mode requirement
This prevents switching into any of these modes once the condition is set.
2023-02-01 08:48:09 +01:00
Daniel Agar
bd9d09663f
commander: avoid uint64 timestamp implicit float conversions
- 64 bit time in microseconds stored in a 32 bit float quickly becomes problematic
 - fixes https://github.com/PX4/PX4-Autopilot/issues/20944
2023-01-19 17:48:40 -05:00
Silvan Fuhrer
303b879748 VTOL/Commander: rename transition_failsafe to vtol_fixed_wing_system_failure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-13 19:02:21 +03:00
murata,katsutoshi
d821404e4f
commander: failsafe define enums for actions (#20880) 2023-01-07 10:10:57 -05:00
Damien SIX
9246d38667
commander: fix offboard disarm failsafe 2022-11-09 08:20:45 +01:00
Beat Küng
d542ffc10c refactor vehicle_status_flags: rename to failsafe_flags 2022-10-13 16:05:25 -04:00
Beat Küng
38d3739b6d refactor commander: rename rc_signal_lost -> manual_control_signal_lost, data_link_lost -> gcs_connection_lost 2022-10-11 22:31:20 -04:00
mcsauder
ebc88afe46 Apply Google Style to Commander Private methods, rename geofence message geofence_violation to primary_geofence_breached. 2022-10-11 22:31:20 -04:00
Beat Küng
455b885f86 commander: use new failsafe state machine and add user intention class 2022-10-11 22:31:20 -04:00
Beat Küng
a04230faa1 commander: add failsafe state machine with webassembly simulation
to run the simulation:
install sdk: https://emscripten.org/docs/getting_started/downloads.html
make run_failsafe_web_server
open http://0.0.0.0:8000/

Co-authored-by: Konrad <konrad@auterion.com>
2022-10-11 22:31:20 -04:00