41667 Commits

Author SHA1 Message Date
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
Zachary Lowell
643eed51cb
Qurt lightweight parameter implementation (#20735) 2022-12-09 09:55:49 -08: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
41fa53605c
boards: rebuild STM32H7 bootloaders and px4-io-v2 2022-12-09 11:02:21 -05:00
Peter van der Perk
5b7a2230fc Update NuttX kernel 2022-12-09 06:36:40 -05:00
Peter van der Perk
3b5f0e21bc Add Sysview support in conjunction with PX4 cpuload note driver 2022-12-09 06:36:40 -05:00
Beat Küng
a502146d73 board_hw_rev_ver: fix hex printf 2022-12-09 07:52:50 +01:00
Beat Küng
8bde2a7a28 board_hw_rev_ver.c: check for 'rv == OK' before reading the revision
Otherwise a potential failure reading the hw version can get overwritten.
2022-12-09 07:52:50 +01: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
f2c71a8874 microdds_client: added environment variable for defining namespace
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -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
db791fa317 Update submodule sitl_gazebo to latest Wed Dec 7 12:38:25 UTC 2022
- sitl_gazebo in PX4/Firmware (b3cebc6686b0d8f86e4ecdc78c4b379509b510cb): b38e701ec4
    - sitl_gazebo current upstream: 1b56329b73
    - Changes: b38e701ec4...1b56329b73

    1b56329 2022-11-22 Frederic Taillandier - adding a gazebo position sniffer to get position at a high rate from another program (#928)
2022-12-07 09:16:00 -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
PX4 BuildBot
9c8bf0b4e0 Update submodule apps to latest Tue Dec 6 23:41:48 UTC 2022
- apps in PX4/Firmware (351bd1768a4a862f81b2a262225e945c0e4fe4fa): e04333c986
    - apps current upstream: a489381b49
    - Changes: e04333c986...a489381b49

    a489381b4 2022-10-17 Peter van der Perk - [REJECTED] Backport 0d06c1c netinit:Network Monitor add a polled option
7b7cd332e 2022-09-12 Peter van der Perk - [REJECTED] Backport dbcb783671cee8a8c97b5909d9eb818c3864ca93 FAT DMA fix
2022-12-06 19:37:39 -05:00
Daniel Agar
c1c4c96c88
boards: flywoo_gn-f405 NuttX upgrade fixes 2022-12-06 19:35:30 -05:00
Daniel Agar
4f99ac209c
gitmodules update NuttX to 10.3.0+ 2022-12-06 18:40:58 -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
Daniel Agar
f12dbb3ff7
boards: px4_fmu-v5_test disable common distance sensors to save flash 2022-12-06 11:39:25 -05:00
Daniel Agar
91a43c3bce
boards: px4_fmu-v5_uavcanv0periph disable camera_feedback to save flash 2022-12-06 10:48:56 -05:00
Daniel Agar
9b20228ffb
boards: modalai_voxl2-io NuttX upgrade fixes and sync with px4-io-v2 2022-12-06 10:45:30 -05:00
Daniel Agar
a191509b27
boards: raspberrypi_pico NuttX upgrade fixes 2022-12-06 10:40:27 -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
Beat Küng
1ea026961e jmavsim_run.sh: add module exports to avoid access errors
With openjdk 17.0.5 2022-10-18, jmavsim fails to start due to missing
exports. This was previously a warning and turned into an error now.

Caught AppContextInfo(Bug 1004) InaccessibleObjectException: Unable to make public static sun.awt.AppContext sun.awt.AppContext.getAppContext() accessible: module java.desktop does not "exports sun.awt" to unnamed module @2c767a52 on thread J3D-Renderer-1
    [0]: java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
    [1]: java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    [2]: java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
    [3]: java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
    [4]: com.jogamp.nativewindow.awt.AppContextInfo$1$1.run(AppContextInfo.java:40)
    [5]: com.jogamp.common.util.UnsafeUtil.doWithoutIllegalAccessLogger(UnsafeUtil.java:219)
    [6]: com.jogamp.nativewindow.awt.AppContextInfo$1.run(AppContextInfo.java:34)
    [7]: java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
    [8]: com.jogamp.nativewindow.awt.AppContextInfo.<clinit>(AppContextInfo.java:31)
    [9]: com.jogamp.nativewindow.awt.JAWTWindow.<init>(JAWTWindow.java:128)
    [10]: jogamp.nativewindow.jawt.x11.X11JAWTWindow.<init>(X11JAWTWindow.java:60)
    [11]: java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [12]: java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    [13]: java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [14]: java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    [15]: java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    [16]: jogamp.nativewindow.NativeWindowFactoryImpl.getAWTNativeWindow(NativeWindowFactoryImpl.java:105)
    [17]: jogamp.nativewindow.NativeWindowFactoryImpl.getNativeWindowImpl(NativeWindowFactoryImpl.java:66)
    [18]: com.jogamp.nativewindow.NativeWindowFactory.getNativeWindow(NativeWindowFactory.java:654)
    [19]: javax.media.j3d.JoglPipeline$QueryCanvas.addNotify(JoglPipeline.java:8604)
    [20]: java.desktop/java.awt.Container.addNotify(Container.java:2804)
    [21]: java.desktop/java.awt.Window.addNotify(Window.java:791)
    [22]: java.desktop/java.awt.Frame.addNotify(Frame.java:495)
    [23]: java.desktop/java.awt.Window.show(Window.java:1053)
    [24]: java.desktop/java.awt.Component.show(Component.java:1728)
    [25]: java.desktop/java.awt.Component.setVisible(Component.java:1675)
    [26]: java.desktop/java.awt.Window.setVisible(Window.java:1036)
    [27]: javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8379)
    [28]: javax.media.j3d.Renderer.doWork(Renderer.java:496)
    [29]: javax.media.j3d.J3dThread.run(J3dThread.java:271)
Caught AppContextInfo(Bug 1004) IllegalAccessException: class com.jogamp.nativewindow.awt.AppContextInfo cannot access class sun.awt.AppContext (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @2c767a52 on thread J3D-Renderer-1
    [0]: java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
    [1]: java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
    [2]: java.base/java.lang.reflect.Method.invoke(Method.java:560)
    [3]: com.jogamp.nativewindow.awt.AppContextInfo.fetchAppContext(AppContextInfo.java:191)
    [4]: com.jogamp.nativewindow.awt.AppContextInfo.update(AppContextInfo.java:135)
    [5]: com.jogamp.nativewindow.awt.AppContextInfo.<init>(AppContextInfo.java:50)
    [6]: com.jogamp.nativewindow.awt.JAWTWindow.<init>(JAWTWindow.java:128)
    [7]: jogamp.nativewindow.jawt.x11.X11JAWTWindow.<init>(X11JAWTWindow.java:60)
    [8]: java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [9]: java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    [10]: java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [11]: java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    [12]: java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    [13]: jogamp.nativewindow.NativeWindowFactoryImpl.getAWTNativeWindow(NativeWindowFactoryImpl.java:105)
    [14]: jogamp.nativewindow.NativeWindowFactoryImpl.getNativeWindowImpl(NativeWindowFactoryImpl.java:66)
    [15]: com.jogamp.nativewindow.NativeWindowFactory.getNativeWindow(NativeWindowFactory.java:654)
    [16]: javax.media.j3d.JoglPipeline$QueryCanvas.addNotify(JoglPipeline.java:8604)
    [17]: java.desktop/java.awt.Container.addNotify(Container.java:2804)
    [18]: java.desktop/java.awt.Window.addNotify(Window.java:791)
    [19]: java.desktop/java.awt.Frame.addNotify(Frame.java:495)
    [20]: java.desktop/java.awt.Window.show(Window.java:1053)
    [21]: java.desktop/java.awt.Component.show(Component.java:1728)
    [22]: java.desktop/java.awt.Component.setVisible(Component.java:1675)
    [23]: java.desktop/java.awt.Window.setVisible(Window.java:1036)
    [24]: javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8379)
    [25]: javax.media.j3d.Renderer.doWork(Renderer.java:496)
    [26]: javax.media.j3d.J3dThread.run(J3dThread.java:271)
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: class javax.media.j3d.JoglPipeline cannot access class sun.awt.X11GraphicsDevice (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @2c767a52
        at javax.media.j3d.JoglPipeline.getScreen(JoglPipeline.java:8553)
        at javax.media.j3d.Screen3D.<init>(Screen3D.java:354)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1124)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1026)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:990)
        at me.drton.jmavsim.Visualizer3D$CustomCanvas3D.<init>(Visualizer3D.java:909)
        at me.drton.jmavsim.Visualizer3D.<init>(Visualizer3D.java:196)
        at me.drton.jmavsim.Simulator.<init>(Simulator.java:193)
        at me.drton.jmavsim.Simulator.main(Simulator.java:944)
        ... 5 more
Caused by: java.lang.IllegalAccessException: class javax.media.j3d.JoglPipeline cannot access class sun.awt.X11GraphicsDevice (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @2c767a52
        at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
        at java.base/java.lang.reflect.Method.invoke(Method.java:560)
        at javax.media.j3d.JoglPipeline.getScreen(JoglPipeline.java:8551)
        ... 13 more
2022-12-06 09:00:05 -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
Peter van der Perk
f1ff47c088 nxp_ucans32k146:Use DMA on I2C 2022-12-06 06:50:46 -05:00
Peter van der Perk
45244e610f NXP MR-CANHUBK3 Support 2022-12-06 06:49:28 -05:00
MAD-CRAZY-MAN
7f01e3962f thepeach_k1/r1: Copyright Amendment, Rename HW comment Correctly. 2022-12-06 06:43:46 -05:00
MAD-CRAZY-MAN
5fc10971ff update by NuttX 10.3+ 2022-12-06 06:43:46 -05:00
MAD-CRAZY-MAN
21093b829b boards: Add ThePeach K1/R1 2022-12-06 06:43:46 -05: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>
v1.14.0-beta1
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
bresch
5155346d60 ekf2: do not use gnss data when no lock 2022-11-30 08:50:34 -05:00
Jaeyoung Lim
65577a4f89 Fix invalid offboard setpoints for fw pos control
This commit fixes a regression that disables offboard control
2022-11-30 09:14:57 +01:00
bresch
5d7faefa84 ekf2: don't add invalid GNSS samples to the buffer 2022-11-30 00:22:15 -05:00
Silvan Fuhrer
0c923bda4e FW Attitude Control: fix integral resetting
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-29 18:36:15 +01:00
alexklimaj
b78b896498 Adjust min and max can bootloader timing for ardupilot compatibility 2022-11-29 10:21:28 -05:00
Matthias Grob
9e776741d9 battery: allow for external state of charge injection 2022-11-29 09:27:50 +01:00
Matthias Grob
babe93c3bf rc_update: adapt throttle trim calibration for [-1,1]
This is fully backwards compatible: If the throttle trim is set to
the minimum then it's the legacy calibration and gets
interpreted such that there is no trim and behavior remains as before.
If the trim is set to a different value than the minimum then it gets
used like with all other channels which was unsupported before.
2022-11-28 19:25:55 +01:00