Ardupilot simulator not working on new version of Ubuntu

I just recently upgraded my ubuntu to new version that is 16.04 and now i am getting errors in starting simulation mission.
Is this only compatible with early versions or there is can problem with my own system.
Thanks for contribution.

I am on ubuntu 16.04 too and sitl works well .
Did you install all package in : https://github.com/ArduPilot/ardupilot/blob/master/Tools/scripts/install-prereqs-ubuntu.sh ?

No dear, i am just following instructions on website of SITL…can you please guide me. i will be thankful

Regards : Imran khan,PhD Computer Science,GSSI, Italy

I am getting this error
Copying fixed headers
%% control_rtl.o
In file included from /home/immikhan/ardupilot/libraries/AP_Math/AP_Math.h:16:0,
from /home/immikhan/ardupilot/libraries/AP_Common/Location.h:11,
from Copter.h:33,
from control_rtl.cpp:3:
/home/immikhan/ardupilot/libraries/AP_Math/quaternion.h: In member function ‘bool Quaternion::is_nan() const’:
/home/immikhan/ardupilot/libraries/AP_Math/quaternion.h:56:24: error: ‘isnan’ was not declared in this scope
return isnan(q1) || isnan(q2) || isnan(q3) || isnan(q4);
^
compilation terminated due to -Wfatal-errors.
…/mk/build_rules.mk:11: recipe for target ‘/tmp/ArduCopter.build/control_rtl.o’ failed
make: *** [/tmp/ArduCopter.build/control_rtl.o] Error 1
/home/immikhan/ardupilot/Tools/autotest/sim_vehicle.sh: Build failed

Use sim_vehicule.py instead of sim_vehicule.sh

1 Like

Interesting, I had the same problems as soon as I upgraded my system to 16.04. Are your systems fresh installations or upgrades as well?

I fixed those errors with prefixing all isnan and isinf compiler errors (I guess it were about 30 in the end) with std:: - but that was just to get SITL up&running and if I’m not mistaken AP_Math.h has exactly those functions defined (which are basically convenience wrappers around the functions in the std namespace)

1 Like

If I remember correctly, the problem is related to the compiler (gcc > 5.3).
The fix was pushed to waf build system but not in old make build system.
That is why I recommend to use sim_vehicule.py (using waf) instead of sim_vehicule.sh (using make) .
There shouldn’t be any difference.

2 Likes

now it starts working…thanks
But another problem is there is not map shown even i wrote coommand like
sim_vehicle.sh -j4 --map --console aircraft test

it works fine now with sem_vehicle.sh

Ou, thank you for the clarification.
Do you happen to know if that’s the way to go from now? Cause then I file an issue as the docs are outdated. Or is that subject to change once waf runs fully on Windows as well?