25611 Commits

Author SHA1 Message Date
Konrad
8c6dfc840b TECS: Fix bug to reset airspeed derivative and energy rate low pass filters at every time step. 2022-12-21 09:04:19 +01:00
Konrad
7a3e0f53c2 TECS: Replaced old tecs by cleaned up version. 2022-12-21 09:04:19 +01:00
Konrad
991689d3cd TECS: Add new tecs library in parallel to old tecs in the position control library for comparison. 2022-12-21 09:04:19 +01:00
Konrad
c64e111d8e TECS: Rearranged the TECS library into submodules. 2022-12-21 09:04:19 +01:00
Daniel Agar
54a32eb2f7
ekf2: EV overhaul yaw and position fusion (#20501)
- move EV yaw and EV position to new state machines
 - EV yaw and EV pos now configured via EKF2_EV_CTRL (migrated from EKF2_AID_MASK)
 - new EV position offset estimator to enable EV position while GPS position is active (no more EV pos delta fusion)
 - yaw_align now strictly means north (no more rotate external vision aid mask)
 - automatic switching between EV yaw, and yaw align north based on GPS quality
2022-12-20 10:23:56 -05:00
Silvan Fuhrer
20342216e2
Airspeed Selector: use better density source and only save scale parameter if valid (#20764)
* AirspeedSelector: use vehicle_air_data.rho for calculating groundspeed-wind CAS

Previously the vehicle_air_data.temperature and pressure was used, instead of the
density field directly.
Only makes a difference if there is an airspeed sensor connected to provide
the air temperature.

* AirspeedSelector: only safe estimated scale in param if airspeed is valid

* AirspeedSelector: remove 0.01 cliff for saving learned scale to param

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-20 15:52:54 +01:00
Igor Misic
52275923ad adsb: add support for callsign 2022-12-20 08:18:09 +01:00
Eric Katzfey
678607117a
Qurt UART ESC driver support (#20784) 2022-12-20 01:25:12 -05:00
PX4 BuildBot
da7d52e302 Update submodule libevents to latest Tue Dec 20 00:39:10 UTC 2022
- libevents in PX4/Firmware (26f3fea7ebb328ef58d4d592dae0559c91f13c1c): 0c8bc543db
    - libevents current upstream: 8d9c555127
    - Changes: 0c8bc543db...8d9c555127

    8d9c555 2022-12-13 Beat Küng - README: clarify use of component ID
2022-12-20 01:24:15 -05:00
Silvan Fuhrer
9c66f1b14a
AirspeedValidator: Remvoe airspeed variance after boot check (#20678)
This checks was introduced to catch the (unlikely) case of the driver publishing
a stale value that is not actually from a current measurement right after boot.
This was done by declaring it invalid if there is no update of the measurement
within the first 10s after boot.
Practice though has shown that around 0, many airspeed sensors have such a low
resolution that the reported airspeed value is often at the exact same value
for longer periods of time on totally healthy sensors, and thus we trigger
some false positive failure detections.
Given that this failure mode (driver publishing stale data) is quite rare (if
it doesn't receive new data it should stop publishing), I remove this check
here again.
When in aerodynamic flight mode and armed, there is still the data stuck
check that can trigger if there is no update for 2s.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-19 11:36:48 +01:00
Igor Misic
df441ac202 drivers/gps: add param for enabling protocols at i2c interface 2022-12-19 08:52:36 +01:00
Eric Katzfey
b0580d88e1 Added muorb aggregator from DSP to Apps direction 2022-12-16 19:43:00 -05:00
RomanBapst
ffdf186598 vtol_att_control: reset transition timer states when starting a transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-16 11:36:00 +03:00
JaeyoungLim
9db133b13d Remove angular velocity controller module 2022-12-16 07:52:20 +01:00
RomanBapst
48e8477799 vtol_att_control: disable maximum height for quadchute by default
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-15 15:40:53 +03:00
RomanBapst
9ed51ba8ed quadchute: introduced parameter to specify maximum height
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-15 15:40:53 +03:00
Marcell Rausch
6c7702b906
mavlink: Keep sending GPS_RAW_INT/GPS2_RAW.hpp streams on GPS failure
* GPS_RAW_INT: Only send no gps messages if gps has ever been present
 * GPS2_RAW: Keep in sync with GPS_RAW_INT

Signed-off-by: Marcell Rausch <marcell@auterion.com>
2022-12-14 09:12:39 -05:00
Beat Küng
5217bedd4b commander: make SYS_HAS_MAG a count param and ensure system has N calibrated + enabled mags 2022-12-14 07:55:04 +01:00
Daniel Agar
4d318ebd30 mavlink: add initial mavlink OPEN_DRONE_ID_SYSTEM stream 2022-12-13 19:39:27 -05:00
Daniel Agar
696eeb9a49
ekf2: update EV height state machine (small piece of EV overhaul)
- respect new EKF2_EV_CTRL parameter for VPOS usage
  - EV hgt rotate EV position before usage (there's often a small offset in frames)
  - EV hgt reset use proper EV velocity body frame
  - try to keep EV hgt and EV vel state machines consistent
  - small incremental piece of https://github.com/PX4/PX4-Autopilot/pull/19128
2022-12-13 13:29:18 -05:00
Daniel Agar
805ffa9d0b ekf2: push mag cal reset to delayed time horizon 2022-12-13 10:24:02 -05:00
PX4 BuildBot
8b02b6b661 Update submodule mavlink to latest Tue Dec 13 12:38:57 UTC 2022
- mavlink in PX4/Firmware (8e1e5c4faa7749f6bc16650c7452af249a7dcc3a): 0811208443
    - mavlink current upstream: 0c7792edfe
    - Changes: 0811208443...0c7792edfe

    0c7792ed 2022-12-08 olliw42 - Gimbal Device: Adding more invalid and bitmask attributes (II) (#1927)
771926e6 2022-12-07 olliw42 - gimbal manager cap flags: resolve duplication mistake
2bc32222 2022-12-07 olliw42 - add gimbal device flags to low word of gimbal manager flags (#1928)
2022-12-13 09:06:14 -05:00
Roman Bapst
257d4e473b
fixed tailsitter transitions (#20756)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-13 10:38:38 +01:00
Eric Katzfey
e17ddcc0e5
Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt)
 - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
2022-12-12 22:02:23 -05:00
Peter van der Perk
33e39d68f7
DroneCAN SocketCAN driver add FMU support 2022-12-12 20:06:13 -05:00
bresch
41abf695a8 ekf2: use more efficient covariance update computation
KSK' is faster to compute than KHP and is mathematically equivalent
2022-12-12 12:31:54 -05:00
dirksavage88
5b667cf4ba Uavcannode hygrometer support: temp and humidity
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2022-12-12 10:54:08 -05:00
Eric Katzfey
a5e4295029
lib/drivers: device drivers library for Qurt platform (#20741) 2022-12-10 19:31:06 -05:00
Zachary Lowell
e4f641e9b5
Qurt qshell implementation (#20736) 2022-12-09 16:49:41 -05:00
Daniel Agar
8cf13d50a8
ekf2: EKFGSF_yaw minor cleanup (#20510)
- don't store unnecessary IMU copy in class, pass it through where required
 - remove custom pi constants
 - remove unused fields from ahrs_ekf_gsf (vel_NE, fuse_gps, accel_dt)
 - explicitly initialize everything in header
 - apply PX4 code style
 - set GPS velocity before yaw estimator update, not after
2022-12-09 13:24:00 -05:00
Daniel Agar
f3884d5835
Update world_magnetic_model to latest Fri Dec 9 11:14:09 UTC 2022
Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-12-09 11:40:30 -05:00
Daniel Agar
8114aad983
initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
2022-12-08 23:03:44 -05:00
Roman Bapst
cfb670fbb3
Refactor quadchute logic (#20704)
* moved computation of _time_since_trans_start into base class

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* refactor quadchute logic
- move entired logic into VtolType class
- split into smaller functions

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* Update src/modules/vtol_att_control/vtol_type.h

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-08 11:56:20 +03:00
Daniel Agar
2b1d8c1d8e
mavlink switch to common dialect by default and update to latest 2022-12-07 15:46:04 -05:00
Daniel Agar
72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
Beniamino Pozzan
5a2e41c4e4 microdds_client: add XRCE_DDS_KEY parameter
Multiple agents can connect to the same client

For sitl builds, if the intance number is different from zero,
  XRCE_DDS_KEY is set to the instance number and
  the microdds_client is automatically started
    with namespace
      px4_"instance_number"
    and udp port 8888
If the instance number is equal to zero
  XRCE_DDS_KEY is left untouched and
  the microdds_client is automatically started
    without namespace
    and udp port 8888

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Beniamino Pozzan
a92897fb58 microdds_client: add namespace to partecipant name
The partecipant name is modified into
"client_namespace"/px4_micro_xrce_dds

For sitl builds the microdds_client is automatically started
with namespace
px4_"instance_number"
and udp port
8888+"intance_number"

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Daniel Agar
8eb2a0a3ec ekf2: delete orientation_covariances_euler()
- usage replaced with now public calcRotVecVariances()
2022-12-07 12:41:27 -05:00
Mathieu Bresciani
a187bb3b80
ekf2: predict covariance before predicting state (#20715)
* To predict the covariance, the jacobian from the previous to the current state is required.
2022-12-07 09:34:19 -05:00
Daniel Agar
c12d9124bd
Update submodule GPS drivers to latest Wed Dec 7 12:38:31 UTC 2022
- GPS drivers in PX4/Firmware (4eb0a0598048df07c213659944b2720ee42e1cc2): b49a6c2573
    - GPS drivers current upstream: b76fc1df45
    - Changes: b49a6c2573...b76fc1df45

    b76fc1d 2022-11-21 qst0528 - ashtech: fix position accuracy loss caused by misplaced integer cast (#118)

Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-12-07 09:16:31 -05:00
PX4 BuildBot
b3cebc6686 Update submodule libevents to latest Wed Dec 7 00:39:06 UTC 2022
- libevents in PX4/Firmware (ff161d5eca5ee3e605840dc05642984985fcbf5a): 179f86a8fc
    - libevents current upstream: 0c8bc543db
    - Changes: 179f86a8fc...0c8bc543db

    0c8bc54 2022-11-07 Beat Küng - README: fix typo
ca1cce0 2022-11-04 Beat Küng - README: add note for usage of UNIT's
2022-12-06 19:39:37 -05:00
Silvan Fuhrer
2b8295e30f FW Position control: switch from L1 to NPFG guidance by default
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-06 12:54:58 -05:00
Zachary Lowell
91acd494a3
Qurt uORB communicator fixes (#20705)
- there was an issue sending a message from slpi to apps. Seems the code was stuck in an loop and crashed when the message was sent from slpi to apps
2022-12-06 10:33:19 -05:00
Thomas Stastny
2da10183f3 welford mean: remove old comments 2022-12-06 08:59:12 -05:00
Silvan Fuhrer
ac28c6b7e2
VTOL: take home_position into account for ground clearance (#20683)
* VTOL: take home_position into account for ground clearance

For approximating distance to ground in case there is no valid distance sensor
data, subtract the home position altitude from the local position altitude.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-12-06 13:19:35 +01:00
bresch
8e3517fae0 DataValidator: fix unexpected failover
Instead of always starting with instance 0 (potentially an internal
mag), first take the current sensor as reference to compare the other
ones against it.
The issue is that otherwise we can end up in a
situation where a switch occurs because the currently used sensor isn't
much better than a sensor with a lower index: because the selected one
isn't much better, we cannot "fail-over" to it and get stuck on another
sensor, triggering a fail-over.
2022-12-06 08:16:23 +01:00
Thomas Stastny
c5dc1221b6 failure detector: use multiplication instead of division
Co-authored-by: Daniel Agar <daniel@agar.ca>
2022-11-30 14:51:07 -05:00
Thomas Stastny
4e8381e8cf failure detector: negative guard sqrt in std dev calc 2022-11-30 14:51:07 -05:00
Thomas Stastny
eb80e0410c failure detector: fix imbalanced prop metric time interval 2022-11-30 14:51:07 -05:00
Daniel Agar
89b81b0bd6
create Welford mean Vector with covariance and improve precision with Kahan summation (#20676)
- WelfordMeanVector now computes covariance
 - use Kahan summation for Welford mean (but continue using float32 for actual mean, etc)
 - WelfordMean and WelfordMeanVector handle initial value and count roll over
 - Welford mean count rollover at 16 bit max to prevent numerical issues and shift weight to newer samples
 - sensors/vehicle_imu: update Welford mean usage (now simplified with resets removed)
    - fix vehicle_imu_status accel var, now properly rotated with full covariance matrix
 - gyro_calibration: update Welford mean usage
2022-11-30 14:50:13 -05:00