Hi,
This is my first post here, and I genuinely want to seek some help on adding a new flight mode for SITL.
I followed the instructions here to add a new flight mode called “ADAPTIVE”: Adding a New Flight Mode to Copter — Dev documentation
My current repository is here: GitHub - Sheng-Cheng/geometricL1ArduCopter
I tried to test the newly added mode in SITL and I ran the following code under ArduCopter/
$ …/Tools/autotest/sim_vehicle.py -v ArduCopter --console --map
I got errors below:
[819/884] Compiling ArduCopter/mode_acro.cpp
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/GCS_Mavlink.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/esc_calibration.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/surface_tracking.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/land_detector.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/mode_rtl.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/RC_Channel.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/toy_mode.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/ArduCopter/RC_Channel.h:5:0,
from …/…/ArduCopter/Copter.h:92,
from …/…/ArduCopter/mode_acro.cpp:1:
…/…/ArduCopter/mode.h:1761:10: error: ‘bool ModeAdaptive::allows_arming(bool) const’ marked ‘override’, but does not override
bool allows_arming(bool from_gcs) const override { return true; };
^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Waf: Leaving directory `/home/sheng/ardupilot/build/sitl’
Build failed
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551012432: cxx GCS_Mavlink.cpp → GCS_Mavlink.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551104592: cxx esc_calibration.cpp → esc_calibration.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551147344: cxx surface_tracking.cpp → surface_tracking.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551105360: cxx land_detector.cpp → land_detector.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551145296: cxx mode_rtl.cpp → mode_rtl.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551012816: cxx RC_Channel.cpp → RC_Channel.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551147856: cxx toy_mode.cpp → toy_mode.cpp.40.o}
(run with -v to display more information)
→ task in ‘bin/arducopter’ failed (exit status 1):
{task 140410551105872: cxx mode_acro.cpp → mode_acro.cpp.40.o}
(run with -v to display more information)
SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks
Any suggestions on how to proceed with my new flight mode in SITL would be helpful! Thank you!