sim_vehicle.sh:Build failed

Hey guys,

i downloaded the arducopter firmware, went through the tutorial and added a new flightmode (explained in tutorial on http://ardupilot.org/dev/docs/apmcopter-adding-a-new-flight-mode.html).
Now i wanted to test the SITL (im using a 64 bit linux) but when i want to run the sim_vehicle.sh there are multiple errors of the kind:
In file included from /home/matthias/ardupilot/libraries/AP_Math/AP_Math.h:16:0,
from /home/matthias/ardupilot/libraries/AP_Common/Location.h:11,
from Copter.h:33,
from control_rtl.cpp:3:
/home/matthias/ardupilot/libraries/AP_Math/quaternion.h: In member function ‘bool Quaternion::is_nan() const’:
/home/matthias/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.

Can sbdy explain to me why this happens? :confused:

Best regards

So change were made for newer toolchain and make command was discontinue in favor of waf build tool.

Instead of using sim_vehicule.sh, use sim_vehicule.py . It should build and works!

1 Like

Yeah it works again!

Thank you for your reply.

Hello khancyr
I was having same problem and solved it by adding:
EXTRAFLAGS += -DHAVE_CMATH_ISFINITE -DNEED_CMATH_ISFINITE_STD_NAMESPACE -DHAVE_CMATH_ISINF -DNEED_CMATH_ISINF_STD_NAMESPACE -DHAVE_CMATH_ISNAN -DNEED_CMATH_ISNAN_STD_NAMESPACE
to board_native.mk.
I am now trying waf and I get the following error:
Could not find a task generator for the name 'bin/arducopter-firefly’
Thanks in advance