48 Commits

Author SHA1 Message Date
Beat Küng
9b7a8d4568 vehicle_status_flags: add group 'Other' 2022-10-11 22:31:20 -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
e4bb219d10 vehicle_status_flags: cleanup message, move non-failsafe flags to vehicle_status 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
Beat Küng
f197c8884d commander: move esc checks to arming check 2022-09-01 17:07:23 -04:00
Beat Küng
f17f38197d commander: move estimator checks to arming check 2022-09-01 17:07:23 -04:00
Beat Küng
cfe3d793bf commander: move battery handling into arming checks 2022-09-01 17:07:23 -04:00
Beat Küng
6d1fb92eb7 commander: rework arming checks to use the events interface 2022-08-25 22:02:15 -04:00
Daniel Agar
e99da22cbe delete CBRK_VELPOSERR circuit breaker 2022-07-12 13:51:13 -04:00
Matthias Grob
c59809b14a Commander: remove system_sensors_initialized
and system_hotplug_timeout. They're not in use for over 2 years.
Instead control LED with preflight checks.
2022-06-15 14:02:00 -04:00
Alessandro Simovic
fb71e7587c failure_detector: add motor/ESC failure detection 2022-05-12 07:58:56 +02:00
Alex Mikhalev
45dff7f71a commander: Add prearm check for flight termination 2022-04-25 11:57:37 -04:00
Silvan Fuhrer
a7ddaf08c4 vehicle_status_flags.msg: remove condition_ prefix to reduce message size
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-23 10:37:51 -04:00
Silvan Fuhrer
c30f2b9493 vehicle_status_flags.msg: remove unused condition_system_returned_to_home
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-23 10:37:51 -04:00
Daniel Agar
1d7791dad6 commander: monitor GPS validity and EKF2 dead reckoning
- ekf2: expose dead reckoning as control status flags
 - commander:
    - add GPS validity check
    - in AUTO MISSION if dependent on GPS then a loss of GPS will
2022-02-22 09:46:21 -05:00
Matthias Grob
f68ae39840 Commander: avoid RC actions during calibration 2021-12-22 09:08:23 -05:00
Matthias Grob
3193b554ca Add optional preflight check for healthy MAVLink parachute system 2021-11-19 17:15:04 +01:00
Nicolas Martin
b24e5fc0af clean remaining offboard_control_signal_found_once
offboard_control_signal_found_once is not used any more
2021-09-28 09:25:04 -04:00
Claudio Micheli
371fa98579 Commander/preflight checks: Add monitoring to ESC failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Michael Schaeuble
f9af1bbe2d PreFlightCheck: Check if SD card is present only once and store the result
statfs accesses the file-system and can be blocking for an extended period. Since the SD card check is part of the preflight checks in the main thread of commander, it could block its execution and cause various issues. The SD card is only mounted in rcS during boot so the state will not change after the first check.
2021-03-30 08:20:49 +02:00
Daniel Agar
d0c9a5fc93
OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint)
 - FlightTaskOffboard not needed at all
 - bypass position_setpoint_triplet entirely (start removing extraneous fields)
 - simplify offboard_control_mode to map to supported control modes
2021-03-05 09:39:46 -05:00
Daniel Agar
6633ff5089 commander: vehicle_status_flags add attitude and angular velocity 2021-02-05 20:11:13 +01:00
Julian Oes
874c6f385b commander: unify offboard timeouts
The implementation before this change had two timeouts, a hard-coded
timeout of 0.5 seconds as well as a by param configurable timeout with
certain failsafe actions set.

This change aims to fix two problems:
1. The hard-coded offboard timeout can be triggered easily with sped up
   lockstep simulation. Since i t is hard-coded it can't be adapted to
   the speed factor.
2. The offboard signal can time out but no action will be taken just
   yet. This means we end up in an in-between stage where no warning or
   failsafe action has happened yet, even though certain flags are set
   to a timeout state.

This patch aims to fix this by unifying the two timeouts to the existing
configurable param. The convoluted double timeout logic is replaced by a
simple hysteresis.

For anyone that has previously not changed the default timeout param (0),
the param will now be changed to 0.5 seconds which reflects the
previously hardcoded time. For anyone with a specific timeout
configured, the behaviour should remain the same.

Also, going forward, timeouts lower than 0.5 seconds should be possible.
2020-03-04 09:35:14 +01:00
Silvan Fuhrer
4fa64f686a pre arm check: add circuit breaker for the VTOL arming in fixed-wing mode prevention
Added a new circuit breaker that, if set, enables arming in fixed-wing mode for VTOLs.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-01-28 00:30:24 +01:00
Daniel Agar
253296eec7 vehicle_status_flags: remove unused circuit_breaker_engaged_gpsfailure_check 2020-01-08 12:29:50 -05:00
Claudio Micheli
2eb9fb9ed6 Commander: move esc_status as local variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
8a2d05be4f Improved code comment for condition_escs_error topic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
187a025dfe Commander: added esc_status prearm checks
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
03637fa6f1 Added topics to esc_status and vehicle_status_flags.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
f4a4dab65a Commander: Improved logic for OA prearm checks.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli
107746ded5 Added obstacle avoidance healthiness topic in vehicle status msg.
This allows to perform pre-arm checks and prevent arming if obstacle avoidance is enabled but not yet running.
Added a print once flag to prevent excessive message spamming in QGC.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Daniel Agar
6396e486bd commander cleanup battery failsafe handling 2018-08-21 02:38:51 -04:00
TSC21
86baa6a90a beautify some identation 2018-08-09 13:40:48 +02:00
TSC21
e932030d88 add timestamp field to uORB msgs; sync timestamp whenever possible 2018-08-09 13:40:48 +02:00
Philipp Oettershagen
6f1f414b49 Subsystem_info status flags & checks : Initial commit, updating the health flags in a centralized way mostly in commander and the votedSensorsUpdate function. 2018-06-06 18:54:24 +02:00
Daniel Agar
082126610d commander status flags delete condition_system_prearm_error_reported
- this flag often results in hiding useful information, or adding
   useless information to the mavlink console
2018-04-16 20:43:33 -04:00
Daniel Agar
458db2e508 vehicle_global_position remove redundant evh and evv
- vehicle_status_flags condition_global_velocity_valid is also unnecessary
2018-03-05 13:20:28 -05:00
Daniel Agar
50e96b24b0 commander remove unused differential pressure check 2018-02-19 15:28:47 +01:00
Daniel Agar
4e45d7959c commander remove gps receiver checks 2018-02-19 15:28:47 +01:00
Daniel Agar
8b0ba3c34c commander log full status flags 2018-01-28 19:28:32 +01:00
Daniel Agar
17e17d79dd commander delete unused vtol_transition_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
d0fba8bf8b commander delete unused data_link_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
c0be801b5c commander delete unused rc_signal_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
5a6cde41d5 commander delete unused gps_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
ca804a2308 commander delete unused sensors check 2017-12-27 02:41:10 +08:00
Simone Guscetti
2c2addad53 Add new message vehicle_status_flags for the commander status_flags 2017-02-04 21:13:59 +01:00