I have tested lua scripts for copter, it works well, but when I tested it for plane as following:
sim_vehicle.py -v ArduPlane plane_aerobatics.lua --console --map
there is the error
{‘waf_target’: ‘bin/arduplane’, ‘default_params_filename’: ‘default_params/plane.parm’, ‘model’: ‘plane’, ‘sitl-port’: True}
SIM_VEHICLE: Building
SIM_VEHICLE: “/home/apm/arduplan432/ardupilot/modules/waf/waf-light” “build” “–target” “bin/arduplane”
Waf: Entering directory `/home/apm/arduplan432/ardupilot/build/sitl’
Embedding file locations.txt:Tools/autotest/locations.txt
Embedding file models/Callisto.json:Tools/autotest/models/Callisto.json
[901/961] Compiling ArduPlane/mode_qstabilize.cpp
[902/961] Compiling ArduPlane/GCS_Mavlink.cpp
In file included from …/…/libraries/AP_HAL/AP_HAL_Namespace.h:4,
from …/…/libraries/AP_HAL/Semaphores.h:3,
from …/…/libraries/AP_HAL_SITL/Semaphores.h:6,
from …/…/libraries/AP_HAL/board/sitl.h:56,
from …/…/libraries/AP_HAL/AP_HAL_Boards.h:125,
from …/…/libraries/GCS_MAVLink/GCS.h:6,
from …/…/ArduPlane/GCS_Mavlink.h:3,
from …/…/ArduPlane/GCS_Mavlink.cpp:1:
…/…/libraries/AP_HAL/utility/functor.h:32:39: error: parse error in template argument list
32 | Functor<rettype, ## VA_ARGS>::bind<std::remove_reference<decltype(*this)>::type, func>(this)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…/…/ArduPlane/Plane.h:625:13: note: in expansion of macro ‘FUNCTOR_BIND_MEMBER’
625 | FUNCTOR_BIND_MEMBER(&Plane::, bool, const AP_Mission::Mission_Command &),
| ^~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from …/…/libraries/AP_HAL/AP_HAL_Namespace.h:4,
from …/…/libraries/AP_HAL/AP_HAL.h:5,
from …/…/libraries/AP_Param/AP_Param.h:27,
from …/…/ArduPlane/mode.h:3,
from …/…/ArduPlane/mode_qstabilize.cpp:1:
…/…/libraries/AP_HAL/utility/functor.h:32:39: error: parse error in template argument list
32 | Functor<rettype, ## VA_ARGS>::bind<std::remove_reference<decltype(*this)>::type, func>(this)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…/…/ArduPlane/Plane.h:625:13: note: in expansion of macro ‘FUNCTOR_BIND_MEMBER’
625 | FUNCTOR_BIND_MEMBER(&Plane::, bool, const AP_Mission::Mission_Command &),
| ^~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Waf: Leaving directory `/home/apm/arduplan432/ardupilot/build/sitl’
Build failed
→ task in ‘bin/arduplane’ failed (exit status 1):
{task 140549539850048: cxx GCS_Mavlink.cpp → GCS_Mavlink.cpp.47.o}
(run with -v to display more information)
→ task in ‘bin/arduplane’ failed (exit status 1):
{task 140549539895104: cxx mode_qstabilize.cpp → mode_qstabilize.cpp.47.o}
(run with -v to display more information)
SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks
I test master and 4.5.0 branch, both have this, my ubuntu version is 20.04, thanks