Commit Graph

43016 Commits

Author SHA1 Message Date
Daniel Agar e79737a38d ekf2: create simple estimator aid source base class and extract zero velocity update 2023-10-18 20:23:56 -04:00
Frederik Markus 7ac50a20b0
Tools/simulation/gz: initial AVL automation tool (#22204)
This is a tool that can be used to generate advanced lift drag plugin parameters automatically using AVL. Rather than having to create .avl files yourself, pass them to AVL, read out the correct parameters and place them in the Advanced Lift Drag plugin, this tool will do all that for you and generate a complete advanced_lift_drag plugin sdf containing all necessary parameters for any vehicle. All that is required is to specify what the physical geometries of the vehicle are. The scripts are adaptable enough to support a self-selected number of control surfaces.

---------

Co-authored-by: frederik <frederik@auterion.com>
2023-10-18 15:33:50 -04:00
Peter van der Perk 019d232911 Add Zenoh pico support 2023-10-18 15:30:36 -04:00
Peter van der Perk 5137ca1ccc cmake: fix kconfig cache when setting to 0 or n 2023-10-18 15:30:36 -04:00
Daniel Agar 408c30de13
ekf2: delete redundant aid src status getters 2023-10-18 15:21:51 -04:00
Daniel Agar bdaf0acfca
ekf2: fully disable yaw estimator EKFGSF_yaw with CONFIG_EKF2_GNSS (#22233) 2023-10-18 13:30:17 -04:00
Julian Oes fefdad83bf mavlink: fix MAVLink message forwarding
This switches from the horribly intertwined ringbuffer implementation to
the new VariableLengthRingbuffer implementation.

By ditching the previous implementation, we fix MAVLink message
forwarding, which didn't work reliably. The reason it didn't work is
that multiple mavlink messages could be added but only one of them was
sent out because the buffer didn't keep track of the messages properly
and only read the first one.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-18 12:26:47 -04:00
Julian Oes da34e5e2c8 lib: add variable length ringbuffer
This adds a reusable class for a FIFO ringbuffer that accepts variable
length packets. It is using the Ringbuffer class internally.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-18 12:26:47 -04:00
Julian Oes 7d0a8aa638 lib: add FIFO ringbuffer class
This adds a reusable class for a simple FIFO ringbuffer.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-18 12:26:47 -04:00
Daniel Agar 3d238b0275
ekf2: add kconfig to disable gravity fusion (#22231) 2023-10-18 10:50:51 -04:00
Daniel Agar 6eae9fb371 ekf2: fix barometer kconfig 2023-10-18 09:43:27 -04:00
KonradRudin 988705831d
Check mission climb always on current mission item (#22230)
* mission_base: reset inactivation index when user set a new mission index, or mission is reset.

* mission_base: check Climb required always on current mission item
2023-10-18 07:59:20 +02:00
Jukka Laitinen e8a0a0772e Disable I2C interface in ICM42688P sensor when it is initialized
This prevents accidental misconfiguration via I2C if there are
multiple SPI devices on the same bus. The device may hear it's i2c address
and write some register, while there is data transfer ongoing with another
device.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-10-17 11:07:21 -04:00
Ville Juven d83b9f3c38 WorkItemSingleShot: Disable priority inheritance for signaling semaphore
WorkItemSingleShot::_sem is a signaling semaphore, disable PI for it.

Set CONFIG_DEBUG_ASSERTIONS=y and the kernel panics due to the semaphore
having no holder, disabling PI fixes this.
2023-10-17 10:08:25 -04:00
Ville Juven 5578b629a3 blockingqueue.hpp: Disable priority inheritance for signaling semaphores
The head/tail semaphores are not used as lock but rather as resource
counters and thus relate more as signaling semaphores. Disable PI for
them.

I run my code with CONFIG_DEBUG_ASSERTIONS=y and the kernel panics due
to the semaphore having no holder, disabling PI fixes this.
2023-10-17 10:08:25 -04:00
Niklas Hauser f45b960eee [mavlink] Use separate mutex for event buffer
This prevents the mavlink transmit loop from waiting on the module mutex
thus not stopping transmissions when the mutex is already taken.

This can happen when calling `mavlink status` from the mavlink shell,
where `Mavlink::get_status_all_instances()` takes the mutex and then
prints the status via pipes to the mavlink transmit buffer.
If that pipe cannot be emptied a deadlock happens.

Since the MavlinkReceiver thread also waits on the module mutex, both
reception and transmission of Mavlink packets are then prevented thus
disabling communications entirely.
2023-10-17 10:05:46 -04:00
Daniel Agar 48e09a4dea ekf2: move predict covariance IMU inhibit check to function 2023-10-17 09:58:10 -04:00
Daniel Agar 0b44852094 ekf2: move accel bias check out of fixCovarianceErrors 2023-10-17 09:58:10 -04:00
bresch 1c9373e83b update baro static pressure compensation tuning script
Field name changed in vehicle_gps_position
2023-10-16 09:45:28 -04:00
Andrei Korigodskii eeb9c5256a boards: add support for Matek H743 Slim V3
IMUs were replaced in V3 with 2x ICM42688P. This configuration should
work with all revisions of Matek F743 Slim board, including V1, V1.5
and interim variant of V3 (ICM42688P + ICM42605).

Signed-off-by: Andrei Korigodskii <akorigod@gmail.com>
2023-10-13 20:59:59 -04:00
Daniel Agar 9676af2fe6 ekf2: predict covariance avoid explicit temporary nextP 2023-10-13 20:57:33 -04:00
Daniel Honies 476b5d5594
fix macos compile issues (#22173)
* fix macos compile issues

* remove unused variable
2023-10-12 09:13:19 +13:00
Daniel Agar d2b3e7fe16
ekf2: new kconfig to enable/disable GNSS (enabled by default) 2023-10-11 14:02:34 -04:00
jmackay2 2d78383296 Add the capability to use Gazebo Harmonic if it is installed 2023-10-11 10:21:09 -04:00
vlad-serbanica af84c2ca7f mavlink_main: increase raw gps latency 2023-10-11 09:53:59 -04:00
bresch ec15fe3d90 ekf2-derivation: fix terrain and yaw estimator derivations
fix compatibility issues with symforce-0.9.0
2023-10-11 09:49:17 -04:00
bresch cf1c6a8b84 ekf2-derivation: remove old wind covariance derivation 2023-10-11 09:49:17 -04:00
RomanBapst 176c9a71e6 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-10-11 12:05:24 +03:00
RomanBapst b50a23beb0 vtol: make sure transition airpseed is above weight compensated minimum airspeed
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-10-11 12:05:24 +03:00
ZeroOne 6dfede0806
fix lightware_laser_serial: prevent potential heap buffer overflow (#22202)
In the lightware_parser function, LW_PARSE_STATE2_GOT_DIGIT0 state can be repeated unexpectedly without proper parserbuf_index or state checking. This behavior will trigger a heap buffer overflow vulnerability by allowing to write some data. And the writable size is sizeof(unsigned).
2023-10-11 07:01:09 +02:00
Daniel Agar 5352a64042
ekf2: symforce derivation allow optionally disabling mag and wind states 2023-10-10 17:31:11 -04:00
Daniel Agar b5f3d089c4 ekf2: mag_fusion remove direct state index usage 2023-10-10 09:18:04 -04:00
Daniel Agar cf4c565e4a ekf2: mag_fusion.cpp cleanup includes 2023-10-10 09:18:04 -04:00
Daniel Agar c85840c4dd ekf2: mag_fusion only set fault status flags if mag_3D updating all states
- other parts of the system are blanket checking for any fault status
   flag
2023-10-10 09:18:04 -04:00
Daniel Agar e58ceba4b1 ekf2: mag_fusion consolidate duplicate error handling 2023-10-10 09:18:04 -04:00
Serkan Mazlum 585687b766
generate_dds_topics.py: simplify repeated code (#22156) 2023-10-10 08:12:55 +02:00
bresch 5e986f6997 wind_est: correctly include sideslip in initialization model 2023-10-09 21:03:38 -04:00
bresch fc32820e19 ekf2: initialize wind covariance using symforce 2023-10-09 21:03:38 -04:00
Daniel Agar 28d58a947f ekf2: cleanup more optional mag (CONFIG_EKF2_MAGNETOMETER) 2023-10-09 10:18:02 -04:00
Daniel Agar 5f87f3a046 ekf2: drag fusion add aid source status topic 2023-10-09 09:26:28 -04:00
Daniel Agar 028733e1c7 ekf2: add kconfig to disable wind estimation (off by default) 2023-10-09 09:22:29 -04:00
Silvan Fuhrer c41de22a05 batteryCheck: add new battery threshold for arming (COM_ARM_BAT_MIN)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-10-09 07:40:48 +02:00
Silvan Fuhrer b7f8ee8ee7 batteryCheck: improve user notification for low battery events
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-10-09 07:40:48 +02:00
Hamish Willee bc19ccdd1f Update commander_params.c - RC loss is manual control loss 2023-10-09 07:35:06 +02:00
Beniamino Pozzan 83841d1ad1 [gz-bridge] fix GZ timeout for slow starting simulations
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2023-10-07 12:27:52 -04:00
Mathieu Bresciani 05fd8c5976
EKF2: centralized auto-generated state (#22183)
* ekf2_derivation: use single source of state definition

The state is defined as an ordered dictionary of group elements and
everything else is generated using that state definition

* ekf2: generated state sample add const reference getter

---------

Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2023-10-06 10:28:21 -04:00
Beat Küng 2e1d5687f9 fix events: use px4_add_library instead of add_library
Fixes `make uorb_graphs`
2023-10-06 10:24:23 -04:00
Julian Oes aa87b2ef4d cubepilot: fix 4. Orange+ variant
There was a missing then, and missing SPI definitions.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-10-06 08:02:03 +13:00
Mathieu Bresciani d61743412c
ekf2: fix flow gyro bias corrections (#22145)
* ekf2-flow: fix flow gyro bias compensation
* ekf2-flow: apply flow gyro bias when used
* ekf2: log optical flow gyro bias
* ekf2: optical flow control always use provided flow gyro (with bias applied)
* ekf2-flow: log flow gyro and gyro reference
* ekf2-flow: support senrors with XY flow gyro

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
2023-10-05 10:51:30 -04:00
Daniel Mesham e00b35e142 boards: default to custom participant for uXRCE-DDS client on Skynode 2023-10-05 08:03:21 +02:00