"make px4_sitl jmavsim" but report " No rule to make target '../../Tools/jMAVSim/.git' "

#1

xxx@xxx-ubantu18.042bit64-virtual-machine:~/src/Firmware$ make px4_sitl jmavsim

[  0%] Built target lockstep_scheduler
Scanning dependencies of target git_jmavsim
[  0%] Generating ../../logs
make[4]: *** No rule to make target '../../Tools/jMAVSim/.git', needed by 'platforms/posix/git_init__home_xxx_src_Firmware_Tools_jMAVSim.stamp'.  Stop.
CMakeFiles/Makefile2:12569: recipe for target 'platforms/posix/CMakeFiles/git_jmavsim.dir/all' failed
make[3]: *** [platforms/posix/CMakeFiles/git_jmavsim.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
[  0%] Built target logs_symlink
[  2%] Built target df_driver_framework
[  2%] Built target uorb_headers
CMakeFiles/Makefile2:19946: recipe for target 'platforms/posix/CMakeFiles/jmavsim.dir/rule' failed
make[2]: *** [platforms/posix/CMakeFiles/jmavsim.dir/rule] Error 2
Makefile:6231: recipe for target 'jmavsim' failed
make[1]: *** [jmavsim] Error 2
Makefile:200: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 2

xxx@xxx-ubantu18.042bit64-virtual-machine:~/src/Firmware$

#2

Have you tried to do make clean or even make distclean?

1 Like
#3

Thank you very much!
“make clean” worked but now it looks sotp at the piont as follow:

-- Found PY_jinja2: /usr/lib/python2.7/dist-packages/jinja2  
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-17-ge175118

Could you please help me fix it?
Best Regards!

#4

That’s all? No other output?

1 Like
#5

Now it goes to

-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-17-ge175118
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shelley/src/Firmware/build/px4_sitl_default
Scanning dependencies of target logs_symlink
Scanning dependencies of target lockstep_scheduler
Scanning dependencies of target git_jmavsim
[  0%] Generating ../../logs
......
......
INFO  [simulator] Waiting for simulator to connect on TCP port 4560
INFO  [px4_work_queue] creating: wq:hp_default, priority: 87, 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  [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO  [logger] Opened full log file: ./log/2019-07-08/08_18_33.ulg
INFO  [px4] Startup script returned successfully
pxh> Buildfile: /home/shelley/src/Firmware/Tools/jMAVSim/build.xml

make_dirs:
    [mkdir] Created dir: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

compile:
    [javac] Compiling 76 source files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

create_run_jar:
      [jar] Building jar: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jmavsim_run.jar

copy_res:
     [copy] Copying 17 files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production

BUILD SUCCESSFUL
Total time: 3 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!
#6
1 Like
#7

Thank you very much!
It works after executing commands as follows.

@julianoes

julianoes commented 27 days ago

For Ubuntu, you can fall back to Java 8 quite easily:

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

Now it built successfully but how to run jmavsim?

[100%] Built target px4
SITL ARGS
sitl_bin: /home/shelley/src/Firmware/build/px4_sitl_default/bin/px4
debugger: none
program: jmavsim
model: none
src_path: /home/shelley/src/Firmware
build_path: /home/shelley/src/Firmware/build/px4_sitl_default
empty model, setting iris as default
SITL COMMAND: "/home/shelley/src/Firmware/build/px4_sitl_default/bin/px4" "/home/shelley/src/Firmware"/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t "/home/shelley/src/Firmware"/test_data
INFO  [px4] PX4 daemon already running for instance 0 (Resource temporarily unavailable)
[100%] Built target jmavsim
shelley@yxl-u18-virtual-machine:~/src/Firmware$ cd Tools
shelley@yxl-u18-virtual-machine:~/src/Firmware/Tools$ ./jmavsim_run.sh
Buildfile: /home/shelley/src/Firmware/Tools/jMAVSim/build.xml

make_dirs:
    [mkdir] Created dir: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

compile:
    [javac] Compiling 76 source files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

create_run_jar:
      [jar] Building jar: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jmavsim_run.jar

copy_res:
     [copy] Copying 17 files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production

BUILD SUCCESSFUL
Total time: 4 seconds
Options parsed, starting Sim.
Starting GUI...
3D [dev] 1.6.0-pre12-daily-experimental daily

libEGL warning: DRI2: failed to authenticate
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0x7fa7cc0234d0, refCount 1, unCloseable false]
shelley@yxl-u18-virtual-machine:~/src/Firmware/Tools$ 

It stopped at

libEGL warning: DRI2: failed to authenticate

And can not connect to QGC automatically.
Could you please tell me how to connect jMAVSim to QGC?

Thanks & Best Regards!

#9

What sort of thing are you working on? Is this inside docker or inside a VM or on an arm cpu?

1 Like
#10

I’m working on a vehicle with board pixhawl 2.4.8 which need to be controlled by QGC. So I want to run the simulator jmavsim and gazebo with px4 firmware to test the configuration I set on the board.
Is it correct?

It is inside an ubuntu VM running on Windows10.

Thank you very much for replying.

Best Regards

#11

Given this, my feeling is that something with the display drivers or GPU support is not working as it should in your VM. Which VM are you using? Is it up-to-date? Do you have the guest additions installed (if Virtualbox)?

1 Like
#12

VMware® Workstation 15 Pro
15.1.0 build-13591040
It is up-to-date.
I haven’t the guest additions installed.

#13

If there are guest additions, I’d try that.

1 Like
#14

Thank you very much,Julian.
I’ll ask for your help after I install the guest additions.

#15

Thank you very much,Julian.
Jmavsim can run normally now after I removed Firmware folder and git clone Firmware again.

shelley@yxl-u18-virtual-machine:~/src/Firmware$ make px4_sitl jmavsim
-- PX4 config file: /home/shelley/src/Firmware/boards/px4/sitl/default.cmake
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- PX4 version: v1.9.1
-- cmake build type: RelWithDebInfo
-- The CXX compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.15") 
-- Found PY_jinja2: /usr/lib/python2.7/dist-packages/jinja2  
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shelley/src/Firmware/build/px4_sitl_default
Scanning dependencies of target git_jmavsim
Scanning dependencies of target lockstep_scheduler
Scanning dependencies of target logs_symlink
Scanning dependencies of target uorb_headers
[  0%] git submodule Tools/jMAVSim
[  1%] Generating ../../logs
[  1%] Generating uORB topic headers
......
BUILD SUCCESSFUL
Total time: 3 seconds
Options parsed, starting Sim.
Starting GUI...
3D [dev] 1.6.0-pre12-daily-experimental daily

libEGL warning: DRI2: failed to authenticate
INFO  [simulator] Waiting for simulator to connect on TCP port 4560
Buildfile: /home/shelley/src/Firmware/Tools/jMAVSim/build.xml

make_dirs:
    [mkdir] Created dir: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

compile:
    [javac] Compiling 74 source files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jMAVSim

create_run_jar:
      [jar] Building jar: /home/shelley/src/Firmware/Tools/jMAVSim/out/production/jmavsim_run.jar

copy_res:
     [copy] Copying 17 files to /home/shelley/src/Firmware/Tools/jMAVSim/out/production

BUILD SUCCESSFUL
Total time: 3 seconds
Options parsed, starting Sim.
Starting GUI...
3D [dev] 1.6.0-pre12-daily-experimental daily

libEGL warning: DRI2: failed to authenticate
INFO  [simulator] Simulator connected on TCP port 4560.
Init MAVLink
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-07-10/03_40_37.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [ecl/EKF] EKF aligned, (pressure height, IMU buf: 22, OBS buf: 14)
INFO  [ecl/EKF] EKF GPS checks passed (WGS-84 origin set)
INFO  [ecl/EKF] EKF commencing GPS fusion
INFO  [mavlink] partner IP: 127.0.0.1
INFO  [logger] closed logfile, bytes written: 49000092
INFO  [logger] Start file log (type: full)
INFO  [logger] Opened full log file: ./log/2019-07-10/04_08_46.ulg
INFO  [commander] Takeoff detected
Wind deviation is now +006.00000; +008.00000; +001.00000; 
INFO  [commander] Landing detected
INFO  [logger] closed logfile, bytes written: 104517471
INFO  [ekf2] Mag sensor ID changed to 196616
1 Like
#16

Great! Thanks for reporting back.

1 Like
#17

Julian, you are really helpful!
Thanks a lot!

1 Like