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>
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>
- sitl_gazebo in PX4/Firmware (b3cebc6686): 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)
- 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
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
* 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>
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.
- 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
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.
In review it was requested to have a different name for
manual_control_setpoint.z because of the adjusted range.
I started to investigate what naming is most intuitive and found
that most people recognize the stick axes as roll, pitch, yaw, throttle.
It comes at no surprise because other autopilots
and APIs seem to share this convention.
While changing the code I realized that even within the code base
the axes are usually assigned to a variable with that name or
have comments next to the assignment clarifying the axes
using these names.
To be consistent with all other axes of stick input and avoid future
rescaling confusion.
Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range
according to the message specs now [-1000,1000].