# Make posix jmavsim error

**URL:** <https://discuss.px4.io/t/make-posix-jmavsim-error/6696>\
**Category:** Uncategorized\
**Created:** [May 22, 2018, 12:38pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696 "2018-05-22T12:38:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![proff](https://discuss.px4.io/user_avatar/discuss.px4.io/proff/32/2078_2.png) [@proff](https://discuss.px4.io/u/proff)\
**Post date:** [May 22, 2018, 12:38pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/1 "2018-05-22T12:38:10Z")

</div>

hello the PX4 gurus  
I still wondering to have a dev environnement and it looks not so easy  
I folowed 2 or 3 times the documentation

- setting the user to dialout group

- removing modemmanager

- sourcing ubuntu\_sim.sh and ubuntu\_sim\_nuttx.sh  
all on a fresh ubuntu 16.04  
I tried on 2 differents computer one with a virtualbox ubuntu and the other with an ubuntu alongside a windows  
on both I get the same issue when trying the make posix jmavsim

does any one get this too?

the git update and the compile part looks ok but sommthing looks missing when launching the PX4 and the jmavsim env

I seen somthing that could looks similar at first sight here [running JMAVSim in vmware fails · Issue #42 · DrTon/jMAVSim · GitHub](https://github.com/DrTon/jMAVSim/issues/42) but solution look’s not applicable I didnt find the same files and or dir structure … 😞

thank’s for any help

---

<div class="post-metadata">

**Author:** ![proff](https://discuss.px4.io/user_avatar/discuss.px4.io/proff/32/2078_2.png) [@proff](https://discuss.px4.io/u/proff)\
**Post date:** [May 23, 2018, 6:09pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/2 "2018-05-23T18:09:11Z")

</div>

same issue using docker  
any help would be greatly apreciated

---

<div class="post-metadata">

**Author:** ![hamishwillee](https://discuss.px4.io/user_avatar/discuss.px4.io/hamishwillee/32/3469_2.png) [@hamishwillee](https://discuss.px4.io/u/hamishwillee)\
**Post date:** [May 23, 2018, 11:33pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/3 "2018-05-23T23:33:17Z")

</div>

There is a recent incompatibility with running jMAVSim in a VM (oracle or vmware). This should however work on a real Linux computer.

What does work quite nicely is this “not quite submitted” Windows Cygwin solution: [https://github.com/PX4/Devguide/pull/522](https://github.com/PX4/Devguide/pull/522) (or even better link - see [https://github.com/MaEtUgR/Devguide/blob/83c7d87dba2cc9c9b035f0340277d0a3c8661c74/en/setup/dev\_env\_windows\_cygwin.md](https://github.com/MaEtUgR/Devguide/blob/83c7d87dba2cc9c9b035f0340277d0a3c8661c74/en/setup/dev_env_windows_cygwin.md) )

This works, we’re just getting together documentation so that it can be maintained going forward.

---

<div class="post-metadata">

**Author:** ![proff](https://discuss.px4.io/user_avatar/discuss.px4.io/proff/32/2078_2.png) [@proff](https://discuss.px4.io/u/proff)\
**Post date:** [May 24, 2018, 7:22am UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/4 "2018-05-24T07:22:46Z")

</div>

thank’s a lot for your kind answer  
I tried on a real linux ubuntu (not VM) a 16.04 using convenience scripts and a 18.04 using docker containers(because fastRTPS doesent compile under 18.04) and I facing always some issue (i did not try under windows yet)  
with 16.04 the issue is the one mentioned above  
with 18.04 with docker container the issue is

> ```
> $ sudo ./Tools/docker_run.sh 'make posix_sitl_default jmavsim'
> [sudo] password for proff: 
> guessing PX4_DOCKER_REPO based on input
> PX4_DOCKER_REPO: px4io/px4-dev-nuttx:2018-03-30
> Starting with UID : 0
> [2/2] cd /home/proff/ __WORK/PX4/src/Firmware/build/posix_sitl_defau...rmware /home/proff/__ WORK/PX4/src/Firmware/build/posix_sitl_default
> args: /home/proff/ __WORK/PX4/src/Firmware/build/posix_sitl_default/px4 posix-configs/SITL/init/ekf2 none jmavsim none /home/proff/__ WORK/PX4/src/Firmware /home/proff/__WORK/PX4/src/Firmware/build/posix_sitl_default
> SITL ARGS
> sitl_bin: /home/proff/__WORK/PX4/src/Firmware/build/posix_sitl_default/px4
> rcS_dir: posix-configs/SITL/init/ekf2
> debugger: none
> program: jmavsim
> model: none
> src_path: /home/proff/__WORK/PX4/src/Firmware
> build_path: /home/proff/__WORK/PX4/src/Firmware/build/posix_sitl_default
> empty model, setting iris as default
> SITL COMMAND: /home/proff/ __WORK/PX4/src/Firmware/build/posix_sitl_default/px4 /home/proff/__ WORK/PX4/src/Firmware /home/proff/__WORK/PX4/src/Firmware/posix-configs/SITL/init/ekf2/iris
> data path: /home/proff/__WORK/PX4/src/Firmware
> commands file: /home/proff/__WORK/PX4/src/Firmware/posix-configs/SITL/init/ekf2/iris
> 65 WARNING: setRealtimeSched failed (not run as root?)
> 
> ```

> ```
> ________  _____ 
> | ___ \ \ \ / / / |
> | |_/ / \ V / / /| |
> | __/ / \ / /_| |
> | | / /^\ \ \___ |
> \_| \/ \/ |_/
> 
> ```

> ```
> px4 starting.
> 
> ```

> ```
> /home/proff/__WORK/PX4/src/Firmware/Tools/jmavsim_run.sh: line 44: ant: command not found
> Error: Unable to access jarfile jmavsim_run.jar
> Error: Unable to access jarfile jmavsim_run.jar
> INFO [dataman] Unknown restart, data manager file 'rootfs/fs/microsd/dataman' size is 11405132 bytes
> INFO [simulator] Waiting for initial data on UDP port 14560. Please start the flight simulator to proceed..
> ^C
> Exiting...
> pxh> Shutting down
> Restoring terminal
> /home/proff/__WORK/PX4/src/Firmware/Tools/sitl_run.sh: line 167: kill: (50) - No such process
> ninja: build stopped: interrupted by user.
> Makefile:147: recipe for target 'posix_sitl_default' failed
> make: *** [posix_sitl_default] Interrupt
> make: *** wait: No child processes. Stop.
> 
> ```

it dont find **jmavsim\_run.jar** witch realy doesn’t exists  
thank’s again for you answer I was starting to feel a bit alone

---

<div class="post-metadata">

**Author:** ![yuri](https://discuss.px4.io/user_avatar/discuss.px4.io/yuri/32/3524_2.png) [@yuri](https://discuss.px4.io/u/yuri)\
**Post date:** [June 1, 2018, 4:06am UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/5 "2018-06-01T04:06:50Z")

</div>

Hi,

Yesterday I succeeded in building 1.8.0beta2 on 18.04. Sitl with jmavsim worked on my system.  
If you’re still stuck let me know.

The jmavsim\_run.jar can be built from the Firmware/Tools/jmavsim directory using:  
ant clean distro

(I switched to the java 8 alternative atm, the vecmath-patch for java 10 is not yet in the latest update… Will be very soon)

Regards,  
Yuri

---

<div class="post-metadata">

**Author:** ![L3Y1Q2](https://discuss.px4.io/user_avatar/discuss.px4.io/l3y1q2/32/2112_2.png) [@L3Y1Q2](https://discuss.px4.io/u/L3Y1Q2)\
**Post date:** [June 5, 2018, 7:53am UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/6 "2018-06-05T07:53:43Z")

</div>

Hi, you could try to replace openjdk to oracle jdk .

---

<div class="post-metadata">

**Author:** ![yuri](https://discuss.px4.io/user_avatar/discuss.px4.io/yuri/32/3524_2.png) [@yuri](https://discuss.px4.io/u/yuri)\
**Post date:** [June 5, 2018, 5:09pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/7 "2018-06-05T17:09:39Z")

</div>

> [@L3Y1Q2](#):
>
> replace openjdk to oracle jdk

Hi,

I just tested it.  
If you meant oracle jdk 10, that doesn’t build due to the missing vecmath.jar.  
Oracle jdk8 does work with jmavsim.

Yuri

---

<div class="post-metadata">

**Author:** ![L3Y1Q2](https://discuss.px4.io/user_avatar/discuss.px4.io/l3y1q2/32/2112_2.png) [@L3Y1Q2](https://discuss.px4.io/u/L3Y1Q2)\
**Post date:** [June 6, 2018, 5:17am UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/9 "2018-06-06T05:17:41Z")

</div>

Hi ，  
Someone told me that he make posic jmavsim error ,and he solved this by replacing jdk.  
I did not verify that it is feasible. I will try it later.  
And I have a problem. The problem is that I don’t know how to utilize the port as an input and pass that info to a mavlink message. I know there are example about connecting external sensor such as air speed or sonar data as adc input but not that I know about connecting pulse signal output as input to pixhawk.  
Do I have to make an module just for this? or any step by step method to configure the input?  
Thanks.

---

<div class="post-metadata">

**Author:** ![proff](https://discuss.px4.io/user_avatar/discuss.px4.io/proff/32/2078_2.png) [@proff](https://discuss.px4.io/u/proff)\
**Post date:** [June 6, 2018, 8:05am UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/10 "2018-06-06T08:05:47Z")

</div>

thank’s I’m still discovering PX4 ecosystem and trying to make my mental map for now I’m grinding on gazebo it works for ready made models but could be bulky for making newone I will check for jmavsim soon thank’s for your help

---

<div class="post-metadata">

**Author:** ![Joseph\_Marrone](https://discuss.px4.io/user_avatar/discuss.px4.io/joseph_marrone/32/3916_2.png) [@Joseph\_Marrone](https://discuss.px4.io/u/Joseph_Marrone)\
**Post date:** [October 31, 2018, 8:25pm UTC](https://discuss.px4.io/t/make-posix-jmavsim-error/6696/11 "2018-10-31T20:25:55Z")

</div>

I’ve been trying to solve this exact problem for the past few days. I get the same error messages as proff.

I am running ubuntu 16.04.5 in a virtual box machine; win 7 pro is the host OS.

Although there appears to be a windows solution re, Windows Cygwin, there is still nothing similar to use with a VM environment running ubuntu. This situation has become a royal pain in the neck. I want to stay in a linux environment for my project, but I may be faced with moving to Windows to get something working.

I could use some help making PX4, QGC, MAVSim, and linux an integrated environment, so I can start simulating a drone controlled by a Python script.

Novices like me go down the path gluing together so many modules and software pieces expecting something to work, and it rarely seems to be that way.

Can any of the developers please fix this problem? I would surely appreciate it.

Forgive my rant. Its been a frustrating time trying to get the sim working.

Joe
