Matthias Grob
75c63aee2a
Fix confusion between trajectory_setpoint and vehicle_local_postion_setpoint
2022-10-17 16:18:00 -04:00
Daniel Agar
743200df22
mavlink: move mavlink dialect selection to kconfig
2022-10-17 16:16:36 -04:00
Daniel Agar
d792a3ff5b
simulator_mavlink: use existing development/common mavlink generation if available
2022-10-17 16:16:36 -04:00
Hamish Willee
2a9801f191
Default mavlink dialect should be common.xml
2022-10-17 16:16:36 -04:00
bresch
8b9ac2d7f3
ekf2: remove old mag 3D fusion auto-code
2022-10-17 16:14:56 -04:00
bresch
77a36219c6
ekf2_test: compare 3D mag fusion sympy vs symforce
2022-10-17 16:14:56 -04:00
bresch
b92cbe12a0
ekf2: migrate mag 3D fusion to symforce
...
ekf2: merge mag 3d innov var, Hx and Kx computation to reduce flash
Slightly less code produced, almost no performance change
ekf2_mag3D: do not pre-compute Kalman gains
The vector of Kalaman gains is not too expensive to compute using
matrix-vector multiplication. Pre-generating it using CSE takes a lot of
flash space for little benefit.
2022-10-17 16:14:56 -04:00
Silvan Fuhrer
5ea8c6e507
FlightTaskAuto: remove unused _getTargetVelocityXY()
...
Inclusive velocity_valid field in position_setpoint message that's then
no longer needed.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Silvan Fuhrer
42c613a0c7
position_setpoint.msg: remove unused alt_valid
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Silvan Fuhrer
42dd9b5063
position_setpoint.msg: remove unused velocity_frame field
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Daniel Agar
0d6766d14d
limit vehicle_command subscription updates per cycle
...
- this is a precaution to eliminate the possibility of getting stuck in
a loop trying to keep up with a high rate publication that could be
coming from a higher priority task
2022-10-17 16:10:51 -04:00
Daniel Agar
677f3e9294
sensors/vehicle_optical_flow: limit gyro updates and generation lost error per cycle
...
- in the worst case scenario printing the error message can take longer than the next gyro publication, so combined with an infinite loop you could get stuck here
2022-10-17 13:45:04 -04:00
Alex Klimaj
8545164869
sensors/vehicle_optical_flow: only get gyro if optical flow delta angle not available ( #20416 )
2022-10-17 10:23:36 -04:00
Daniel Agar
116bb6049f
ekf2: fusion helper consistency
...
- yaw fusion use measurementUpdate()
- fuseVelPosHeight() respect _accel_bias_inhibit (like measurementUpdate())
2022-10-17 10:17:31 -04:00
Silvan Fuhrer
7bc90c7f00
FW rate controller gains: put default for all IMAX gains to 0.4
...
The previous default for yaw and roll was 0.2, which is very low, and for wheel was
1, which is very high. A value of 0.4 makes sense to me for all axes.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer
4bbe8f3c0d
FW rate controller gains: open up some limitis for the rate controller gains
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer
e2d1e79614
FW rate controller gains: reduce max FW_YR_I from 50 to 1
...
I guess this was a left over from times where the controller had a completely different structure,
a value of 50 is well outside of reasonable range (50x the default).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer
ea44c89366
FW rate controller gains: reduce max FF gains to 1
...
The previous max of 10 for the FF gains seems a bit very high for me, well outside
of reasonable reange.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
bresch
458e5a6b0e
ekf2: update change indicator
2022-10-14 11:42:23 -04:00
bresch
1b4092abbb
symforce: temporarily remove custom cmake command
...
otherwise the generated files are removed with make clean
2022-10-14 11:42:23 -04:00
bresch
a8a3107c05
ekf2: remove old covariance prediction code
2022-10-14 11:42:23 -04:00
bresch
df084d65e3
ekf2_test: compare covariance prediction sympy vs symforce
2022-10-14 11:42:23 -04:00
bresch
a4e511b90e
ekf2: migrate covariance prediction to SymForce
2022-10-14 11:42:23 -04:00
Beat Küng
3c290d812d
commander: use printRejectMode() also for rtl, takeoff, land & mission commands
2022-10-13 16:05:25 -04:00
Beat Küng
d542ffc10c
refactor vehicle_status_flags: rename to failsafe_flags
2022-10-13 16:05:25 -04:00
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