Jmavsim doesn't work normally

I have built the envirnment for px4,but the jmavsim can’t still work normally
louzq@louzq-HP-Pavilion-Power-Laptop-15-cb0xx:~/src/Firmware$ sudo make px4_sitl_default jmavsim
[sudo] louzq 的密码:
[0/1] cd /home/louzq/src/Firmware/buil…zq/src/Firmware/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/louzq/src/Firmware/build/px4_sitl_default/bin/px4
debugger: none
program: jmavsim
model: none
src_path: /home/louzq/src/Firmware
build_path: /home/louzq/src/Firmware/build/px4_sitl_default
empty model, setting iris as default
SITL COMMAND: “/home/louzq/src/Firmware/build/px4_sitl_default/bin/px4” “/home/louzq/src/Firmware”/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t “/home/louzq/src/Firmware”/test_data
INFO [px4] Creating symlink /home/louzq/src/Firmware/ROMFS/px4fmu_common -> /home/louzq/src/Firmware/build/px4_sitl_default/tmp/rootfs/etc


| ___ \ \ \ / / / |
| |/ / \ 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: 1376264
CAL_ACC1_ID: curr: 0 -> new: 1310728
CAL_ACC_PRIME: curr: 0 -> new: 1376264
CAL_GYRO0_ID: curr: 0 -> new: 2293768
CAL_GYRO_PRIME: curr: 0 -> new: 2293768
CAL_MAG0_ID: curr: 0 -> new: 196616
CAL_MAG_PRIME: curr: 0 -> new: 196616
COM_DISARM_LAND: curr: -1.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
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.0200 -> 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: 10.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_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

  • RTL_DESCEND_ALT: curr: 5.0000 -> new: 10.0000
  • RTL_LAND_DELAY: curr: 5.0000 -> new: 0.0000
    PWM_MAX: curr: 2000 -> new: 1950
    PWM_MIN: curr: 1000 -> new: 1075
    Buildfile: /home/louzq/src/Firmware/Tools/jMAVSim/build.xml
    INFO [dataman] Unknown restart, data manager file ‘./dataman’ size is 11798680 bytes
    INFO [simulator] Waiting for simulator to connect on TCP port 4560

make_dirs:

compile:

create_run_jar:

copy_res:

BUILD SUCCESSFUL
Total time: 0 seconds
Options parsed, starting Sim.
Starting GUI…
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!

I came here to ask exactly the same question. Newbie, just getting started with PX4, trying to follow the documentation, but cannot get the simulator running with the same errors.

Looks like the version of Java is key. I have OpenJDK-11 installed. From other posts, it looks like Java 8 is required.

Yes, correct. To switch to Java 8:

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out
1 Like

Issue to track this: https://github.com/PX4/jMAVSim/issues/96