Comments (17)
Actually, updating the following jar's resolve the issue correctly:
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/jogl-all.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/gluegen-rt.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal.jar
from jmavsim.
Actually, updating the following jar's resolve the issue correctly:
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/jogl-all.jar wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/gluegen-rt.jar wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal.jar
Download the latest build versions of ·gluegen, joal, and jogl and replace them.
Here are the links:
- https://jogamp.org/chuck/view/fwd/job/gluegen/952/
- https://jogamp.org/chuck/view/fwd/job/joal/670/
- https://jogamp.org/chuck/view/fwd/job/jogl/1519/
Unzip these three compressed files,
- replace the relevant JAR files in the directory "PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/lib/"
- add the relevant libraries to the directory "PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/out/production/".
Now you should be able to run it without any issues.
from jmavsim.
I have the same error on a Raspberry Pi with Raspbian stretch.
from jmavsim.
I also cannot load this lib, Firmware/jMAVSim/out/production/libgluegen-rt.so
, when running make px4_sitl jmavsim
on the Pinebook.
from jmavsim.
Also having this same error when running make px4_sitl jmavsim
, anyone managed to resolve?
from jmavsim.
@efischer91 have you managed to resolve this? I am experiencing the same issue on Ubuntu 18.04 on a Jetson Nano
from jmavsim.
@efischer91 have you managed to resolve this? I am experiencing the same issue on Ubuntu 18.04 on a Jetson Nano
Unfortunately no.
from jmavsim.
I have the same error...
I operate at Raspberry Pi 3B board and use Ubuntu mate 18.04
Passed 2 years.. No one can even help us?....
from jmavsim.
I have the same error...
I operate at Raspberry Pi 3B board and use Ubuntu mate 18.04
Passed 2 years.. No one can even help us?....
hey guys ! I find the solution !!!
https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20200104/apk/
Download the gluegen file that matches your device.
My workstation is RPi 3B, so I download the aarch64 version.
After unzip copy "libgluegen_rt.so" file from "gluegen-2.4-b938-20210111-linux-aarch64\gluegen-2.4-b938-20210111-linux-aarch64\lib" to your missing file's folder.(In this path, if there is no matching folder, try to use the command "mkdir + folder name" to generate a new folder to continue copying)
from jmavsim.
I have the same error...
I operate at Raspberry Pi 3B board and use Ubuntu mate 18.04
Passed 2 years.. No one can even help us?....hey guys ! I find the solution !!!
https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20200104/apk/
Download the gluegen file that matches your device.
My workstation is RPi 3B, so I download the aarch64 version.
After unzip copy "libgluegen_rt.so" file from "gluegen-2.4-b938-20210111-linux-aarch64\gluegen-2.4-b938-20210111-linux-aarch64\lib" to your missing file's folder.(In this path, if there is no matching folder, try to use the command "mkdir + folder name" to generate a new folder to continue copying)
I did exactly as your way, but I got another problem.
The error is changed from 'Can't load library' to 'invalid ELF header'.
If you solved this problem, please let me know..
Thanks.
from jmavsim.
I am building jMAVSim for linux/aarch64. I was able to get past most of the libgluegen_rt issues by downloading the aarch64 jar files from the following location:
https://jogamp.org/deployment/archive/rc/v2.4.0/jar/
However, while it gets past the initial error indicating that it can't find libraries, with a different one as follows:
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.UnsatisfiedLinkError: Couldn't load library 'gluegen_rt' generically including [], nor as [/usr/java/packages/lib/libgluegen_rt.so, /usr/lib64/libgluegen_rt.so, /lib64/libgluegen_rt.so, /usr/lib/libgluegen_rt.so, /usr/lib/libgluegen_rt.so, /home/umex/Documents/tools/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/out/production/libgluegen_rt.so, /home/umex/Documents/tools/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/out/production/natives/linux-aarch64/libgluegen_rt.so]
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:634)
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 com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:83)
at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:66)
at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at jogamp.opengl.ThreadingImpl.<clinit>(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.<clinit>(VirtualUniverse.java:267)
at me.drton.jmavsim.Visualizer3D.<init>(Visualizer3D.java:194)
at me.drton.jmavsim.Simulator.<init>(Simulator.java:193)
at me.drton.jmavsim.Simulator.main(Simulator.java:944)
The .so files are there... and I can see them copied during the build, however, I still get the error. I am hoping this is just a classpath issue, but I am not sure what the next step would be to fix this.
from jmavsim.
Update on the above, the aarch64 jar files are there... but I don't see the .so files in the ./out/production
or ./out/production/natives
folder. There is no natives folder. I am not sure how the make file generates this folder and why it's not doing it for the aarch64
so files.
from jmavsim.
Another update... after copying the right jar files from the jogamp
website, the build.xml file needs to be updated (...still learning here). Specifically here:
<attribute name="Rsrc-Class-Path" value="./ annotations.jar gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-aarch64.jar gluegen-rt-natives-linux-i586.jar gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-windows-amd64.jar gluegen-rt-natives-windows-i586.jar gluegen-rt.jar j3dcore.jar j3dutils.jar
joal-natives-linux-amd64.jar joal-natives-linux-aarch64.jar joal-natives-linux-i586.jar
joal-natives-macosx-universal.jar joal-natives-windows-amd64.jar joal-natives-windows-i586.jar joal.jar
jogl-all-natives-linux-amd64.jar jogl-all-natives-linux-aarch64.jar jogl-all-natives-linux-i586.jar
jogl-all-natives-macosx-universal.jar jogl-all-natives-windows-amd64.jar jogl-all-natives-windows-i586.jar
jogl-all.jar jssc.jar vecmath.jar"/>
and here:
<zipfileset dir="lib" includes="gluegen-rt-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="joal-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="jogl-all-natives-linux-aarch64.jar"/>
after the above updates, run a make clean
and then make px4_sitl_default jmavsim
and the simulator GUI will work just fine.
from jmavsim.
Hey @cryptik, I followed your steps above (I'm also using px4) by doing:
- Downloading jars:
cd PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/lib/
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/gluegen-rt-natives-linux-aarch64.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal-natives-linux-aarch64.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/jogl-all-natives-linux-aarch64.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal-natives-linux-aarch64.jar
- Modifying the build.xml file (here is the snippet you referenced):
<target name="create_run_jar" depends="compile" description="Creates standalone runnable JAR file including dependencies.">
<jar destfile="${build.dir}/jmavsim_run.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="me.drton.jmavsim.Simulator"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ annotations.jar gluegen-rt-natives-linux-amd64.jar gluegen-rt-natives-linux-aarch64.jar gluegen-rt-natives-linux-i586.jar gluegen-rt-natives-macosx-universal.jar gluegen-rt-natives-windows-amd64.jar gluegen-rt-natives-windows-i586.jar gluegen-rt.jar j3dcore.jar j3dutils.jar joal-natives-linux-amd64.jar joal-natives-linux-aarch64.jar joal-natives-linux-i586.jar joal-natives-macosx-universal.jar joal-natives-windows-amd64.jar joal-natives-windows-i586.jar joal.jar jogl-all-natives-linux-amd64.jar jogl-all-natives-linux-aarch64.jar jogl-all-natives-linux-i586.jar jogl-all-natives-macosx-universal.jar jogl-all-natives-windows-amd64.jar jogl-all-natives-windows-i586.jar jogl-all.jar jssc.jar vecmath.jar"/>
</manifest>
<fileset dir="${classes.dir}"/>
<zipfileset src="jar-in-jar-loader.zip"/>
<zipfileset dir="lib" includes="annotations.jar"/>
<zipfileset dir="lib" includes="gluegen-rt.jar"/>
<zipfileset dir="lib" includes="j3dcore.jar"/>
<zipfileset dir="lib" includes="j3dutils.jar"/>
<zipfileset dir="lib" includes="joal.jar"/>
<zipfileset dir="lib" includes="jogl-all.jar"/>
<zipfileset dir="lib" includes="jssc.jar"/>
<zipfileset dir="lib" includes="vecmath.jar"/>
<zipgroupfileset dir="lib" includes="forms_rt.jar"/>
<!-- OS-specific jars (can exclude any you don't need) -->
<zipfileset dir="lib" includes="gluegen-rt-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="joal-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="jogl-all-natives-linux-aarch64.jar"/>
- Followed by a clean build:
cd PX4-Autopilot/
make clean
make px4_sitl_default jmavsim
However, I then run in to a separate error:
INFO [dataman] data manager file './dataman' size is 7866640 bytes
etc/init.d-posix/rcS: 39: [: Illegal number:
INFO [init] jMAVSim simulator
INFO [simulator_mavlink] using TCP on remote host localhost port 4560
WARN [simulator_mavlink] Please ensure port 4560 is not blocked by a firewall.
INFO [simulator_mavlink] Resolved host 'localhost' to address: 127.0.0.1
INFO [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
Buildfile: /home/austinriffle/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/build.xml
make_dirs:
compile:
create_run_jar:
copy_res:
BUILD SUCCESSFUL
Total time: 0 seconds
Options parsed, starting Sim.
Starting GUI...
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.InternalError: XXX0 profile[2]: GL2 -> profileImpl GL3bc !!! not mapped
at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2098)
at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1976)
at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1895)
at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1861)
at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80)
at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:239)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:225)
at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2324)
at com.jogamp.opengl.GLProfile.get(GLProfile.java:1042)
at com.jogamp.opengl.GLProfile.get(GLProfile.java:1071)
at com.jogamp.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:824)
at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:131)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267)
at me.drton.jmavsim.Visualizer3D.<init>(Visualizer3D.java:194)
at me.drton.jmavsim.Simulator.<init>(Simulator.java:193)
at me.drton.jmavsim.Simulator.main(Simulator.java:944)
... 5 more
Did you (or anyone else for that matter) encounter this java.lang.InternalError
error, and have any advice for a solution?
from jmavsim.
As info, if anyone else runs into the above error, I resolved it by doing:
export LIBGL_ALWAYS_SOFTWARE=1
according to here:
https://groups.google.com/g/jaamsim-users/c/tJW48U0Vi9k?pli=1
There's probably a way to fix it with a driver update or something similar that will allow us to leverage hardware, but for now this works. If I find another solution I will update.
from jmavsim.
Thanks above @ ALL In addition to the steps of @1qingfeng-1. Since my ubuntu run on the CPU of the Mac M series, there are the following changes Used in
/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/build.xml:
<zipfileset dir="lib" includes="gluegen-rt-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="joal-natives-linux-aarch64.jar"/>
<zipfileset dir="lib" includes="jogl-all-natives-linux-aarch64.jar"/>
The corresponding resources are as follows:
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/jogl-all-natives-linux-aarch64.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/gluegen-rt-natives-linux-aarch64.jar
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal-natives-linux-aarch64.jar.jar
from jmavsim.
Actually, updating the following jar's resolve the issue correctly:
wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/jogl-all.jar wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/gluegen-rt.jar wget https://jogamp.org/deployment/archive/rc/v2.4.0/jar/joal.jar
Download the latest build versions of ·gluegen, joal, and jogl and replace them. Here are the links:
- https://jogamp.org/chuck/view/fwd/job/gluegen/952/
- https://jogamp.org/chuck/view/fwd/job/joal/670/
- https://jogamp.org/chuck/view/fwd/job/jogl/1519/
Unzip these three compressed files,
- replace the relevant JAR files in the directory "PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/lib/"
- add the relevant libraries to the directory "PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/out/production/".
Now you should be able to run it without any issues.
It did work for me.
from jmavsim.
Related Issues (20)
- Port busy when run JmavSim in HITL Mode In cygwin HOT 4
- windCurrent & windDeviation
- px4_task_spawn_cmd: failed to set sched policy HOT 3
- Communication unexpectedly lost in both the terminal and while using QGroundControl
- make px4_sitl jmavsim misbehaving. (OSX)
- Not able to change location
- New PX4 firmware + jMAVSim fails to build on Windows 10 HOT 4
- java.lang.IllegalAccessException when running/building on Ubuntu 20.04 HOT 5
- Proposal: Replacing ExecutorService to achieve more stable timing in the update loop HOT 3
- JMAVSim Failing To Start: java.lang.reflect.InvocationTargetException
- How do I change the environment background in jmavsim? HOT 1
- I had a problem when I was doing multi-machine emulation, and when I opened an instance, I kept getting stuck here
- Unable to launch JMAVSim in Windows - Could not create the Java Virtual Machine
- Can't get jMAVSim to work HOT 8
- "getting required buffer size failed" on jmavsim simulation on Windows 10
- Problem with OpenGL version. JMAVSim (from Windows Cygwin Toolchain) on Windows 10
- Yuneec 520: HITL simulator keep crashing into land after takeoff HOT 8
- jMAVsim fails with Java 11 HOT 9
- Forward traffic to UDP port 14540 in HITL mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmavsim.