This is a quick video demonstrating a new copter-fast-descent Lua script included in ArduPilot Copter-4.2 that is currently in beta testing.
(sorry about the video quality, I just taped a camera onto the copter)
The purpose of the script is to allow a multicopter to descend more rapidly than it normally could by spiraling down instead of just descending straight down. In this particular case it descended at 8m/s but it can go faster.
I should add that there is actually some debate within the dev team on whether a well tuned multicopter should have problems when they descend straight down through their prop wash but in any case, the script also shows off a few new features of Lua scripting with ArduPilot-4.2:
Lua scripts can now create their own parameters (previously they had to always use SCR_USERx parameters) which makes it easier to remember what each parameter does
Lua scripts can be executed from within Auto missions using the NAV_SCRIPT_TIME mission command. This command is not yet listed in Mission Planner’s command list but it can still be added using the “UNKNOWN” command option (set the “command ID” to “42702”). For this test the mission was simply a takeoff to 150m, a NAV_SCRIPT_TIME command and then an RTL.
This script also makes use of Lua script’s ability to specify the positions controller’s target position, velocity and acceleration all at the same time which means the vehicle does a better job of staying on the spiral path than a position-only control could do.
Here’s another video of the feature from a test with AttracLab who plans to use it for a 10km descent in the coming months.
No, I think we will leave this as a lua script. It is one of those feature that is interesting and useful but only to a small number of users in very special cases.
We are thinking about allowing new flight modes to be completely written in Lua but until then this feature can still be executed from within Guided or Auto mode so users can still hopefully give it a try easily.
It should be possible to modify the script to work with quadplanes but I’m not 100% sure. Certainly plane supports NAV_SCRIPT_TIME and Tridge and others have done videos showing all kinds of acrobatics being done in Lua
@rmackay9 ,
Thank you for your response… Regarding the Quadcopter descent speed, What is the Safe maximum normal down speed in Auto mode?? I ask this question because some times I need to do RTL at 350 m or higher (for safety reason)… And in this case I need to do high down speed (just “Ordinary down speed” without Lua script…) . I have tried 3 m/s, is still ok,
but I prefer to have 5m/s or more if it is safe…
Any advice??? Tks…
I think it depends upon how good the tune of the vehicle is and in particular whether the motor thrust scaling has been done. I’ve seen videos from Leonard of a large vehicle descending at 5m/s without any problems but I’ve seen other vehicles become quite unsteady at even 2m/s.
I think if your vehicle is able to descend at 3m/s that’s quite good. Maybe just try higher speeds and see how it does?
I suspect that if the descent is not straight down then the vehicle will be able to descend more quickly but this is inconvenient.
IIRC For vertical descent you can’t safely go above half* hover downdraft velocity or you enter VRS if you want to go any faster you need translational movement to get out of VRS zone.
* Might be lower but I am not sure.
Based on single rotor helicopters.
Very cool indeed ! Another method for avoiding VRS might be to rapidly spin about the yaw axis when descending. Do you know if a Lua script exists for yaw spinning while still being able to perform directional maneuvering?
Thanks! There’s no yaw-spinning Lua script like that at the moment. In general AP holds position OK even while the yaw is changed but it’s not perfect. It moves around a bit.