25604 Commits

Author SHA1 Message Date
Daniel Agar
2de990fd4b estimator_aid_source split GNSS pos (3d) -> pos (2d) + hgt
- per estimator air source status only keep a single set of flags and
timestamp that applies to the entire source
2022-10-13 11:28:50 -04:00
bresch
bdd043f27f ekf2: fix sideslip fusion sign 2022-10-12 16:14:47 +02:00
bresch
53865118fb ekf2: remove old sideslip fusion code 2022-10-12 09:55:35 -04:00
bresch
f7c749c9cd ekf2_test: compare sideslip fusion of Sympy and SymForce 2022-10-12 09:55:35 -04:00
bresch
d0f92bfbd5 ekf2_test: create helper functions for auto-generated code diff 2022-10-12 09:55:35 -04:00
bresch
5f54f6fcda ekf2: migrate sideslip fusion to SymForce
- split fusion into update (compute innov and innov_var) and actual fusion to the state vector
- use estimator_aid_source_1d struct to group the data
2022-10-12 09:55:35 -04:00
Beat Küng
f7819f5dba commander: reorder update calls
Moves the arming checks before the command handling.
This reduces the chance of race conditions. However it does not prevent
them! The SDK will need to check when offboard is ready to run/arm to fix
this.
Specifically this is for sitl offboard tests, where offboard_control_mode
is updated and immediately after a mode switch into offboard is commanded.
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
Beat Küng
e2d8ca73a5 commander: add unit tests for failsafe state machine 2022-10-11 22:31:20 -04:00
Beat Küng
3d1da597dd commander: run arming checks on _offboard_control_mode_sub update 2022-10-11 22:31:20 -04:00
Beat Küng
6ee2252b8c events: handle events being generated before a mavlink module started
- do not print dropped events warnings
- make sure current sequence is still sent with reset flag
2022-10-11 22:31:20 -04:00
Beat Küng
acaa50a448 geofence: add and report reason for violation 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
693af897b3 commander: check if battery was already disconnected on arming
If so, don't report.
Happens e.g. with USB powered pixhawk.
2022-10-11 22:31:20 -04:00
Beat Küng
24142bc014 commander: RcCalibrationChecks: avoid param access on each cycle
reduces cpu usage a bit
2022-10-11 22:31:20 -04:00
Beat Küng
c72c580a0b commander: run arming checks @ 10Hz
Required for things like RC loss.
2022-10-11 22:31:20 -04:00
Beat Küng
6fda555cba commander: move ownership of vehicle_status_flags_s to HealthAndArmingChecks 2022-10-11 22:31:20 -04:00
Beat Küng
500a896a56 commander: print reason for mode rejection & report for GCS switches as well 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
ae6377dfa0 mission_result: remove unused fields 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
82911e48be fix commander: check estimator type & avoid timestamp wrap-around
Before it was possible that the publication timestamp was never than 'now',
leading to wrap-around.
2022-10-11 22:31:20 -04:00
Beat Küng
27f8298bb9 fix commander: add local position requirement to NAVIGATION_STATE_AUTO_LAND 2022-10-11 22:31:20 -04:00
Beat Küng
57c7b5e843 flight_mode_manager: reduce error verbosity & remove mode switching
While disarmed, commander allows to be in any mode now.
2022-10-11 22:31:20 -04:00
Beat Küng
31dfdea12e commander: remove state_machine_helper tests 2022-10-11 22:31:20 -04:00
Beat Küng
e9387cac1d mavlink: move get_px4_custom_mode to px4_custom_mode.h 2022-10-11 22:31:20 -04:00
Silvan Fuhrer
9159f020cb mavlink local_position_ned: always publish on update, not just when xy and v_xy valid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-11 00:47:32 -04:00
Daniel Agar
ce609144b0
simulation/gz_bridge: fix implicit floating-point conversions 2022-10-09 14:11:19 -04:00
Daniel Agar
9010029e0d lib/drivers/device: Device.hpp fully init devid
- constructor use available setters
2022-10-09 13:49:39 -04:00
Daniel Agar
f3964513c7 sensors: fix accel/gyro/mag calibration offset units 2022-10-09 13:02:38 -04:00
Daniel Agar
ee4821ed0a
commander: relax COM_ARM_MAG_ANG default to minimize false positives
- this check is mainly intended for catching blatant setup problems like a magnetometer that's mounted 90 or 180 degrees off
2022-10-09 12:41:06 -04:00
alexklimaj
064f3f86bc Increase mag calibration max_var_allowed 2022-10-06 08:44:36 -04:00
Hamish Willee
022aa13aa1 mpu9250_i2c - also needs docs update 2022-10-05 20:26:25 -04:00
Hamish Willee
6d612b1ba4 MPU9250 driver doc incorrect 2022-10-05 20:26:25 -04:00
Daniel Agar
8cc39096cb
load_mon: NuttX cpuload use system times for calculation
- this is to minimize the impact of any load_mon scheduling jitter in the sampled load percentage
2022-10-05 14:21:38 -04:00
Daniel Agar
5f0a539633 gps_blending: fix blending init to best instance
- output GPS publication defaults to best input instance
 - blended states are explicitly cleared and then populated with
weighted blend
2022-10-05 10:26:48 -04:00
Matthias Grob
46e6e83e14 Commander: allow disarmin not-landed boat like rover
This is a hotfix and a boat should never even detect a takeoff
in normal operation.
2022-10-05 09:07:18 -04:00
Beat Küng
dafead6f20 logger: add compressed events metadata file if it exists in the ROMFS
Allows to decode events not (yet) on main.
The file is currently ~15KB.
2022-10-05 07:44:55 +02:00
Beat Küng
02035d94aa metadata: sort json output
ensures the files don't change arbitrarily
2022-10-05 07:44:55 +02:00
modaltb
06a0aedbdb
modalai_esc: directly using deadband param value instead of converting it to RPM 2022-10-04 20:14:59 -04:00
Thomas Debrunner
0af87ec745 mavlink: initial OPEN_DRONE_ID_BASIC_ID/OPEN_DRONE_ID_LOCATION support 2022-10-04 14:40:59 -04:00
pandafeng1999
e4b4df4e5d
drivers/distance_sensor/gy_us42: add the specified i2c address 2022-10-04 11:35:45 -04:00
Matthias Grob
f96507bb22 vtol_takeoff: fix comment typo 2022-10-04 10:01:04 -04:00
Julian Oes
5c77bbcb4c ms5611: ignore reading 0
This prevents publishing a negative pressure which leads to a NAN
altitude estimate further down the line.
2022-10-04 09:37:53 -04:00
Beat Küng
04b1cbb423 vtol_att_control: standard: also do blending for FW controls
So that the sum of the control is always 1.
2022-10-04 09:54:11 +02:00
Silvan Fuhrer
6db92b4011 ControlAllocation: remove actuator trim value from actuator_sp to calculate allocated control
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-04 07:51:25 +02:00
Zachary Lowell
4520186878
qurt: replacing qurt threads with pthread 2022-10-03 18:01:04 -04:00
bresch
4b687beb3b ekf2: remove old airspeed fusion code 2022-10-03 10:59:42 -04:00
bresch
299e6058e3 ekf2_test: test airspeed symforce vs sympy generated code 2022-10-03 10:59:42 -04:00