We use GitHub issues only to discuss PX4 bugs and new features. For
questions about using PX4 or related components, please use PX4 Discuss.
when i ran make px4_sitl jmavsim
`[0/1] cd /home/coamc/Firmware/build/px.../coamc/Firmware/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/coamc/Firmware/build/px4_sitl_default/bin/px4
debugger: none
program: jmavsim
model: none
src_path: /home/coamc/Firmware
build_path: /home/coamc/Firmware/build/px4_sitl_default
empty model, setting iris as default
SITL COMMAND: "/home/coamc/Firmware/build/px4_sitl_default/bin/px4" "/home/coamc/Firmware"/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t "/home/coamc/Firmware"/test_data
INFO [px4] Creating symlink /home/coamc/Firmware/ROMFS/px4fmu_common -> /home/coamc/Firmware/build/px4_sitl_default/tmp/rootfs/etc
0 WARNING: setRealtimeSched failed (not run as root?)
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ ___ |
_| \/ \/ |_/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
SYS_AUTOSTART: curr: 0 -> new: 10016
BAT_N_CELLS: curr: 0 -> new: 3
CAL_ACC0_ID: curr: 0 -> new: 1311244
CAL_ACC_PRIME: curr: 0 -> new: 1311244
CAL_GYRO0_ID: curr: 0 -> new: 2294028
CAL_GYRO_PRIME: curr: 0 -> new: 2294028
CAL_MAG0_ID: curr: 0 -> new: 197388
CAL_MAG_PRIME: curr: 0 -> new: 197388
CAL_BARO_PRIME: curr: 0 -> new: 6620172
COM_DISARM_LAND: curr: 2.0000 -> new: 0.1000
COM_OBL_ACT: curr: 0 -> new: 2
COM_OF_LOSS_T: curr: 0.0000 -> new: 5.0000
COM_RC_IN_MODE: curr: 0 -> new: 1
EKF2_ANGERR_INIT: curr: 0.1000 -> new: 0.0100
EKF2_GBIAS_INIT: curr: 0.1000 -> new: 0.0100
EKF2_REQ_GPS_H: curr: 10.0000 -> new: 0.5000
MC_PITCH_P: curr: 6.5000 -> new: 6.0000
MC_PITCHRATE_P: curr: 0.1500 -> new: 0.2000
MC_ROLL_P: curr: 6.5000 -> new: 6.0000
MC_ROLLRATE_P: curr: 0.1500 -> new: 0.2000
MPC_HOLD_MAX_Z: curr: 0.6000 -> new: 2.0000
MPC_Z_VEL_I: curr: 0.1000 -> new: 0.1500
MPC_Z_VEL_P: curr: 0.2000 -> new: 0.6000
MPC_XY_P: curr: 0.9500 -> new: 0.8000
MPC_XY_VEL_P: curr: 0.0900 -> new: 0.2000
MPC_XY_VEL_D: curr: 0.0100 -> new: 0.0160
MPC_JERK_MIN: curr: 8.0000 -> new: 10.0000
MPC_ACC_HOR_MAX: curr: 5.0000 -> new: 3.0000
NAV_ACC_RAD: curr: 10.0000 -> new: 2.0000
NAV_DLL_ACT: curr: 0 -> new: 2
RTL_DESCEND_ALT: curr: 30.0000 -> new: 5.0000
RTL_LAND_DELAY: curr: -1.0000 -> new: 5.0000
RTL_RETURN_ALT: curr: 60.0000 -> new: 30.0000
SDLOG_MODE: curr: 0 -> new: 1
SDLOG_PROFILE: curr: 3 -> new: 131
SDLOG_DIRS_MAX: curr: 0 -> new: 7
SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
TRIG_INTERFACE: curr: 4 -> new: 3
make_dirs:
compile:
create_run_jar:
copy_res:
BUILD SUCCESSFUL
Total time: 0 seconds
Exception in thread "main" java.lang.UnsupportedClassVersionError: me/drton/jmavsim/Simulator has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:59)
INFO [px4_work_queue] creating: wq:hp_default, priority: 87, stack: 16384 bytes
INFO [px4_work_queue] creating: wq:att_pos_ctrl, priority: 88, stack: 16384 bytes
INFO [px4_work_queue] creating: wq:rate_ctrl, priority: 99, stack: 16384 bytes
INFO [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 14570 remote port 14550
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] Opened full log file: ./log/2019-09-16/06_05_24.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO [px4] Startup script returned successfully
pxh> `
but no jMAVsim interface display
and when i run make px4_sitl gazebo report error
`[2/6] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- Using C++17 compiler
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- thread
-- filesystem
-- chrono
-- date_time
-- atomic
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- thread
-- system
-- filesystem
-- program_options
-- regex
-- iostreams
-- date_time
-- chrono
-- atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Boost version: 1.65.1
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.2.5
-- Checking for module 'uuid'
-- Found uuid, version 2.31.1
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Checking for module 'libswscale'
-- Found libswscale, version 4.8.100
-- Checking for module 'libavdevice >= 56.4.100'
-- Found libavdevice , version 57.10.100
-- Checking for module 'libavformat'
-- Found libavformat, version 57.83.100
-- Checking for module 'libavcodec'
-- Found libavcodec, version 57.107.100
-- Checking for module 'libavutil'
-- Found libavutil, version 55.78.100
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.4
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.1.7
-- Checking for module 'libzip'
-- Found libzip, version 1.1.2
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.0.0")
Gazebo version: 9.11
-- Configuring done
-- Generating done
-- Build files have been written to: /home/coamc/Firmware/build/px4_sitl_default/build_gazebo
[3/6] Performing build step for 'sitl_gazebo'
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build
cd /home/coamc/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/coamc/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/61] Generating /home/coamc/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
FAILED: /home/coamc/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
cd /home/coamc/Firmware/Tools/sitl_gazebo && rm -f /home/coamc/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && /usr/bin/python /home/coamc/Firmware/Tools/sitl_gazebo/scripts/xacro.py -o /home/coamc/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf /home/coamc/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro enable_mavlink_interface:=true enable_ground_truth:=false enable_wind:=false enable_logging:=false rotors_description_dir:=/home/coamc/Firmware/Tools/sitl_gazebo/models/rotors_description send_vision_estimation:=true send_odometry:=false && gz sdf -p /home/coamc/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf >> /home/coamc/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && rm -f /home/coamc/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf
gz: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol: _ZN8ignition10fuel_tools12ClientConfig12SetUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
[2/61] Building CXX object CMakeFiles/sensor_msgs.dir/Pressure.pb.cc.o
[3/61] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o
[4/61] Building CXX object CMakeFiles/std_msgs.dir/Int32.pb.cc.o
[5/61] Building CXX object CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o
[6/61] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[7/61] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/geo_mag_declination.cpp.o
[8/61] Building CXX object CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
[9/61] Building CXX object CMakeFiles/gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o
[10/61] Building CXX object CMakeFiles/gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o
[11/61] Building CXX object CMakeFiles/gazebo_sonar_plugin.dir/src/gazebo_sonar_plugin.cpp.o
[12/61] Building CXX object CMakeFiles/gazebo_barometer_plugin.dir/src/gazebo_barometer_plugin.cpp.o
[13/61] Building CXX object CMakeFiles/gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o
[14/61] Building CXX object CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o
[15/61] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/gazebo_magnetometer_plugin.cpp.o
[16/61] Building CXX object CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
[17/61] Building CXX object CMakeFiles/gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
[18/61] Building CXX object CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:200: recipe for target 'px4_sitl' failed
make: * [px4_sitl] Error 1
`
I want to ask what went wrong.
Thanks!
i use ubuntu 18.04/ros melodic
For jMAVSim:
Check this https://dev.px4.io/master/en/simulation/jmavsim.html#troubleshooting
For Gazebo:
gz: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol: _ZN8ignition10fuel_tools12ClientConfig12SetUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
It looks like a ignition dependency mismatch. According to this, try:
sudo apt upgrade libignition-math2
sorry to bother you
i try to change Java version to 8 or 9 or 10
it raise
Exception in thread "main" java.lang.UnsupportedClassVersionError: me/drton/jmavsim/Simulator has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
but if i change Java version to 11
it raise
`BUILD SUCCESSFUL
Total time: 0 seconds
INFO [px4_work_queue] creating: wq:hp_default, priority: 87, stack: 16384 bytes
INFO [px4_work_queue] creating: wq:att_pos_ctrl, priority: 88, stack: 16384 bytes
INFO [px4_work_queue] creating: wq:rate_ctrl, priority: 99, stack: 16384 bytes
Options parsed, starting Sim.
Starting GUI...
INFO [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 14570 remote port 14550
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] Opened full log file: ./log/2019-09-16/08_28_47.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO [px4] Startup script returned successfully
pxh> 9月 16, 2019 4:28:47 下午 java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
3D [dev] 1.6.0-pre12-daily-experimental daily
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
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
The build succeeded but jmavsim is not up and running.
jmavsim interface is not up
i wonder why
thanks foe your answer
Have you done these steps?
sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out
Have you done these steps?
sudo apt install openjdk-8-jdk sudo update-alternatives --config java # choose 8 rm -rf Tools/jMAVSim/out
yes, but when i use java8, it can,t be used until i change to java11
when i use java8. it shows:
Exception in thread "main" java.lang.UnsupportedClassVersionError: me/drton/jmavsim/Simulator has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Have you done the step rm -rf Tools/jMAVSim/out as well when you switch java version?
Using clean Ubuntu 18 LTS
using https://docs.qgroundcontrol.com/en/getting_started/download_and_install.html
using https://github.com/PX4/Devguide/blob/master/en/setup/dev_env_linux_ubuntu.md
using https://github.com/PX4/Devguide/blob/master/en/setup/building_px4.md
i found in this issue I had to apply
sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose Java v8
rm -rf Tools/jMAVSim/out
$ make px4_sitl jmavsim
which results in (shaved)
0 WARNING: setRealTimeSched failed (not run as root?)
BUILD SUCCESFUL
Options parsed, starting Sim.
Starting GUI...
Exception in thread "main" java.lang.reflect.InvocationTargetException
Caused by: java.awt.AWTERROR: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
I found I had to apply another change with this instruction:
This can be done by editing the accessibility.properties file for OpenJDK:
sudo vim /etc/java-8-openjdk/accessibility.properties
Comment out the following line:
assistive_technologies=org.GNOME.Accessibility.AtkWrapper
This where the steps for me to get jMAVSIM running. Hope this helps.
Thanks, it's also mentioned here:
https://dev.px4.io/master/en/simulation/jmavsim.html#javaawtawterror-assistive-technology-not-found-orggnomeaccessibilityatkwrapper