I am studying about customized frames like dodecacopter and according to arducopter instructions Connect ESCs and Motors — Copter documentation,
I should use LUA scripting. Now I am thinking the fact that LUA scipt is low priority compared to main ardupilot C++ code.
Isn’t it dangerous to use so critical functions like motor control by LUA script?
Would not be more robust and safer solution to modify and recompile C++ flight controller?
There are bindings for manipulating the motor matrix via Lua, so as long as you are sticking with 12 or less motors, you can create whatever frame type and motor transformations you want, and the actual control will still reside within the main loop. Lua is just used for initial setup, and it is absolutely robust enough to be reliable in that regard.
Now, if you wanted to provide active stabilization within a Lua script, it’s certainly possible, but as you’ve discovered, may not be the best choice depending on the exact use case and timing required.