px4 javasim仿真

px4 javasim仿真,第1张

px4 javasim仿真

接运行会卡在这里

然后就去Tools文件夹下面运行了./jmavsim_run.sh ,看看为什么模拟器没跑起来

./jmavsim_run.sh 
./jmavsim_run.sh: line 59: ant: command not found

安装ant

sudo apt-get install ant

运行继续报错

$ ./jmavsim_run.sh 
Buildfile: /home/liangtaofeng/1.12/PX4-Autopilot/Tools/jMAVSim/build.xml

make_dirs:
    [mkdir] Created dir: /home/liangtaofeng/1.12/PX4-Autopilot/Tools/jMAVSim/out/production/jMAVSim

compile:
    [javac] Compiling 76 source files to /home/liangtaofeng/1.12/PX4-Autopilot/Tools/jMAVSim/out/production/jMAVSim

create_run_jar:
      [jar] Building jar: /home/liangtaofeng/1.12/PX4-Autopilot/Tools/jMAVSim/out/production/jmavsim_run.jar

copy_res:
     [copy] Copying 18 files to /home/liangtaofeng/1.12/PX4-Autopilot/Tools/jMAVSim/out/production

BUILD SUCCESSFUL
Total time: 1 second
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:566)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.UnsatisfiedlinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
	at java.base/java.lang.Runtime.load0(Runtime.java:768)
	at java.base/java.lang.System.load(System.java:1837)
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
	at java.base/java.lang.System.loadLibrary(System.java:1873)
	at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
	at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
	at java.desktop/java.awt.Toolkit.(Toolkit.java:1429)
	at java.desktop/java.awt.Component.(Component.java:621)
	at me.drton.jmavsim.Simulator.(Simulator.java:189)
	at me.drton.jmavsim.Simulator.main(Simulator.java:939)
	... 5 more

参照这个网页

sudo apt install openjdk-11-jdk

然后终于可以出来了


然后可以在qgc里面画个航迹模拟飞一圈

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5710953.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存