488 Commits

Author SHA1 Message Date
Silvan Fuhrer
635f64a2e5 Commander: remove permanent stabilization option for fixed-wing flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Alessandro Simovic
fb71e7587c failure_detector: add motor/ESC failure detection 2022-05-12 07:58:56 +02:00
Daniel Agar
c772e5230f
commander: remove compile time dependencies on non-commander parameters
- this allows builds with mavlink fully disabled
 - move commander MAN_ARM_GESTURE, RC_MAP_ARM_SW, MC_AIRMODE checks to manual_control
2022-05-11 10:14:23 -04:00
Silvan Fuhrer
5d6c8c986d Commander: high wind speed handling updates
- add logic for detecting high wind speed in Commander,
and handle it toghether with wind speed warning
- trigger and enforce RTL if COM_WIND_MAX is breached

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-09 19:09:40 +02:00
Silvan Fuhrer
1aad82f87d Commander: add max flight time RTL
Adds COM_FLT_TIME_MAX param and logic in Commander to enforce RTL when
flight time is above this value. User can only override to LAND mode,
but not proceed flight beyond that.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-09 19:09:40 +02:00
Matthias Grob
b3776134b8 Commander: ensure diconnected battery is cleared from bit field 2022-05-06 10:32:27 -04:00
Alex Mikhalev
45dff7f71a commander: Add prearm check for flight termination 2022-04-25 11:57:37 -04:00
Junwoo Hwang
af839c828d Set Tune's Volume for Power-Off in Commander to default volume of tune_control message 2022-04-25 11:47:43 -04:00
bresch
3c6b72c33b commander: improve set_in_air_position
- set local home using global pos and global home
- set local home using GNSS pos and global home
- set global home using global ref of local frame and local home
2022-04-19 15:29:25 +02:00
bresch
d2f2ba59a4 commander: refactor home position setter
- always try to set local or global home position when possible
- set global home with GNSS position if global pos from EKF isn't
  available
- reset home when significantly moved from home before takeoff (checking
  lpos or gpos or GNSS)
- reset home on takeoff transition
- reset home on mavlink arm command
- remove "home required accuracy" parameters, rely on validity flags
2022-04-19 15:29:25 +02:00
Thomas Debrunner
f6bdc42977 param-reset: Add option to reset all configurable params, but not the ones that store vehicle information 2022-04-14 07:57:48 +02:00
Matthias Grob
f968a5947d ArmStateMachine: port arming_state_names into the class 2022-04-06 10:02:14 +02:00
Matthias Grob
074080c816 Commander: separate out arm state machine to class
Pure refactoring and just the first step to avoid conflicts on the way.
2022-04-06 10:02:14 +02:00
Igor Misic
80aef942cd safety and safety button: refactoring #19413 2022-04-05 07:57:37 +02:00
Daniel Agar
8c3ba7adb4 commander: silence GPS no longer validity PX4_WARN 2022-04-04 14:43:11 -04:00
Daniel Agar
0c31f63896 sensors: add baro calibration and cleanup
- sensor_baro.msg use SI (pressure in Pascals)
 - update all barometer drivers to publish directly and remove PX4Barometer helper
 - introduce baro cal (offset) mainly as a mechanism to adjust
relative priority
 - commander: add simple baro cal that sets baro offsets to align with
GPS altitude (if available)
 - create new sensors_status.msg to generalize sensor reporting
2022-03-26 16:08:41 -04:00
Daniel Agar
875a2cc423 commander: remove loop counters and update UI LED control to use monotonic time 2022-03-24 22:43:26 -04:00
Daniel Agar
879622547c commander: only process one vehicle_command/action_request per cycle
- things like arming requests can be dependent on current nav state
that might requested by a previous command, but the state machine
transition will only happen after command processing
2022-03-24 22:43:26 -04:00
Jonas Perolini
e31304d7d5
Quadchute param update (#19351)
New parameter for actions after a quadchute (COM_QC_ACT)

Co-authored-by: Jonas <jonas.perolini@rigi.tech>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-03-24 10:27:32 +01:00
Matthias Grob
e6ed595651 Commander: make last_fail_time_us parameter a reference instead of pointer 2022-03-23 15:04:48 -04:00
Matthias Grob
eee4aaee4f Commander: remove dynamic position velocity probation period 2022-03-23 15:04:48 -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
Matthias Grob
db1fb6acf7 Commander: no battery time based RTL when already landed 2022-03-23 10:49:38 +01:00
Matthias Grob
b85c4ec475 Commander: rename land detection subscription for consistency 2022-03-23 10:49:38 +01:00
bresch
182980526f commander: allow rearming grace period for arming switch only 2022-03-09 08:42:21 +01:00
Daniel Agar
11f617ca9b ekf2: default to in air and not at rest
- this is a more conservative default if a vehicle isn't set (no land detector running)
 - handled horizontal preflight failures in commander when disarmed
rather than overloading xy_valid and v_xy_valid flags
 - ekf2 no longer depend on arming or standby status
2022-02-22 16:59:10 -05: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
Roman Bapst
6de5d24e00
Added VTOL Takeoff navigation mode (#19027)
* Commander: added support for MAIN_STATE_AUTO_VTOL_TAKEOFF
* navigator: added support for vtol_takeoff navigation mode
2022-02-15 14:56:57 +01:00
Matthias Grob
ae0bb8371d Commander: message planned battery action with warning together 2022-01-31 20:27:06 -05:00
Matthias Grob
405852b5c8 Commander: only disallow RC override during battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob
5ec21835a4 Commander: ensure low battery failsafe flying unatended without GPS 2022-01-31 20:27:06 -05:00
Matthias Grob
1911ec0085 Commander: fix user messageing for low battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob
955aad0dfb Commander: consistent hysteresis initialization 2022-01-31 20:27:06 -05:00
Matthias Grob
d10f9030ad Commander: add delay before executing low battery failsafe action 2022-01-31 20:27:06 -05:00
Matthias Grob
3af315f2c3 Commander: change battery failsafe to return action instead of executing 2022-01-31 20:27:06 -05:00
Matthias Grob
8eed43b515 Commander: put battery warning and failsafe action in separate functions 2022-01-31 20:27:06 -05:00
Daniel Agar
ad447ab223 commander: respect control mode for prearm requirements
- preflight tolerate ekf2 warnings if not in an attitude/velocity/position mode (eg manual or acro)
2022-01-31 09:48:37 -05:00
Daniel Agar
3f25349eb9 commander: don't reject VEHICLE_CMD_DO_SET_ACTUATOR 2022-01-25 18:44:58 -05:00
Claudio Micheli
8a01135a93 Commander: more changes to use events with escs and battery failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Claudio Micheli
d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Julian Oes
b3d830dd11 Mantis: move power off tune to commander
This way we don't allocate inside the interrupt context.
2022-01-10 23:04:10 -05:00
Julian Oes
aa007dadee commander: fix emergency power off
From what I can see the CONFIG_BOARDCTL_POWEROFF is not really used
anywhere, however, the BOARD_HAS_POWER_CONTROL is something that is set,
e.g. for the Mantis, to allow power off.
2022-01-10 23:04:10 -05:00
Julian Oes
6301fa35c1 commander: add command to power off 2022-01-10 23:04:10 -05:00
Daniel Agar
71d8b15b73 commander: fix COM_HOME_EN missing case
- VEHICLE_CMD_COMPONENT_ARM_DISARM is yet another path that calls set_home_position()
2022-01-09 20:52:07 -05:00
Beat Küng
8e04934eab commander: consider COM_MOT_TEST_EN for COMMAND_ACTUATOR_TEST as well 2021-12-24 20:06:13 -05:00
Daniel Agar
7d7d707db9 commander: add COM_HOME_EN parameter to enable/disable home position 2021-12-23 15:46:31 -05:00
Matthias Grob
f68ae39840 Commander: avoid RC actions during calibration 2021-12-22 09:08:23 -05:00
Thomas Debrunner
eb69f15d3a health-flags: Increase health flags to 64 bit bit field to support extended sys status mavlink message
Add SYS_STATUS flag for parachute
2021-12-14 09:41:12 -05:00
Daniel Agar
986cf288da
dataman: remove obsolete persistence and reset reason 2021-12-12 12:06:35 -05:00
Thomas Debrunner
8db7a6225b geo: Moved the map_projection_* functions and state into a self-contained C++ class 2021-12-06 14:30:14 +01:00