Skip to content

Rapid Descent on PX4 drones

lovettchris edited this page Dec 9, 2017 · 1 revision

You have probably noticed with PX4 based drones when you send the land command it descends slowly, and carefully. Now there is a PX4 setting that will increase this descent speed, but then it hits the ground rather hard. Instead what we really want is a rapid descent to some safe distance above the ground, like 5 meters, then switch to PX4 landing from there to get the nice feather soft touch down.

So let's try and implement that using the following Python code:

from AirSimClient import *
client = MultirotorClient()
client.enableApiControl(True)
client.moveToPosition(0, 0, -5, 2)
client.land()

So here we try and descent quickly at 2 meters per second, then when we reach the 5 meter mark, switch to automated landing.

This would work except PX4 also has some built in maximum vertical down speed limits. So to enable the above trick you need to set the following parameter:

param set MPC_Z_VEL_MAX_DN 2

Here's the result:

images/rapid_descent.png

You could set this to whatever, there is also a MPC_Z_VEL_MAX_UP parameter in case you want to ascend more quickly. Some drones can climb at amazing speeds. The only reason PX4 limits these things is that a lot of novice pilots get themselves into trouble without these limits. So try it in the simulator first, before you do this on a real drone!

Clone this wiki locally