-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java error when 'make px4_sitl jmavsim' ubuntu on macbook pro m1 VM #19783
Comments
UPDATE:
|
same issue on same setup :/ |
Same issues above trying to run jmavsim on M1 native. I have tried multiple JDKs. I was able to get the simulator to start using Eclipse Adoptium 17.0.3... but after the sim loads... I get a sequence of these messages 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 @442675e1 on thread J3D-Renderer-1 and the simulator won't arm. |
Have a look if this PR helps: PX4/jMAVSim#132 |
This worked! Thanks @julianoes! I am now getting the following exception...
and then this one... a few times ....
But I am guessing the second one is the reflection error indicated in the troubleshooting guide. In any case, it runs the simulator and does not appear to cause problems with the operation. It does have a timeout issue if QGroundControl is not running... but other than that... this PR fixes the running of the simulator on M1. |
Ah ok, then just ignore that warning. @ThomasDebrunner should we merge that PR for M1 then? |
Have you tested it? It builds on a RC version of JOGL, I haven't seen any regressions, so I guess we could merge it |
@cryptik has used it. I don't have an M1 myself. |
@ThomasDebrunner I was able to get it running on my M1, but I realize now I am using JMavSIM and not Gazebo. Not sure if that makes a difference? |
jMAVSim is what we're talking about here. It is based on some Java libraries that were not available for arm64 previously but now are with that PR. |
What about the future of the PR ? |
I am tring to install the PX4 software and just get the simulator to open following the getting started docs.
At the point of running make px4_sitl jmavsim however i get some java warnings and the build idles forever.
Log:
[0/1] cd /home/parallels/PX4-Autopilot...s/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/parallels/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
program: jmavsim
model: none
world: none
src_path: /home/parallels/PX4-Autopilot
build_path: /home/parallels/PX4-Autopilot/build/px4_sitl_default
empty model, setting iris as default
SITL COMMAND: "/home/parallels/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/parallels/PX4-Autopilot/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/home/parallels/PX4-Autopilot"/test_data
Creating symlink /home/parallels/PX4-Autopilot/build/px4_sitl_default/etc -> /home/parallels/PX4-Autopilot/build/px4_si
| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /| |
| | / /^\ \ ___ |
_| / / |_/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=10016
INFO [param] selected parameter default file eeprom/parameters_10016
[param] parameter file not found, creating eeprom/parameters_10016
SYS_AUTOCONFIG: curr: 0 -> new: 1
SYS_AUTOSTART: curr: 0 -> new: 10016
CAL_ACC0_ID: curr: 0 -> new: 1310988
CAL_GYRO0_ID: curr: 0 -> new: 1310988
CAL_ACC1_ID: curr: 0 -> new: 1310996
CAL_GYRO1_ID: curr: 0 -> new: 1310996
CAL_ACC2_ID: curr: 0 -> new: 1311004
CAL_GYRO2_ID: curr: 0 -> new: 1311004
CAL_MAG0_ID: curr: 0 -> new: 197388
CAL_MAG1_ID: curr: 0 -> new: 197644
INFO [dataman] data manager file './dataman' size is 7866640 bytes
PX4 SIM HOST: localhost
INFO [simulator] Waiting for simulator to accept connection on TCP port 4560
Buildfile: /home/parallels/PX4-Autopilot/Tools/jMAVSim/build.xml
make_dirs:
[mkdir] Created dir: /home/parallels/PX4-Autopilot/Tools/jMAVSim/out/production/jMAVSim
compile:
[javac] Compiling 76 source files to /home/parallels/PX4-Autopilot/Tools/jMAVSim/out/production/jMAVSim
create_run_jar:
[jar] Building jar: /home/parallels/PX4-Autopilot/Tools/jMAVSim/out/production/jmavsim_run.jar
copy_res:
[copy] Copying 22 files to /home/parallels/PX4-Autopilot/Tools/jMAVSim/out/production
BUILD SUCCESSFUL
Total time: 1 second
Options parsed, starting Sim.
Starting GUI...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (rsrc:j3dcore.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
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:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /home/parallels/PX4-Autopilot/Tools/jMAVSim/out/production/natives/linux-aarch64//libgluegen_rt.so
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2640)
at java.base/java.lang.Runtime.load0(Runtime.java:745)
at java.base/java.lang.System.load(System.java:1873)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:625)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
at com.jogamp.common.os.Platform$1.run(Platform.java:321)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.jogamp.common.os.Platform.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(GLProfile.java:154)
at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:83)
at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:66)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at jogamp.opengl.ThreadingImpl.(ThreadingImpl.java:66)
at com.jogamp.opengl.Threading.disableSingleThreading(Threading.java:164)
at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:129)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858)
at javax.media.j3d.VirtualUniverse.(VirtualUniverse.java:267)
at me.drton.jmavsim.Visualizer3D.(Visualizer3D.java:194)
at me.drton.jmavsim.Simulator.(Simulator.java:193)
at me.drton.jmavsim.Simulator.main(Simulator.java:944)
... 5 more
The text was updated successfully, but these errors were encountered: