Hold altitude regardless of sensor readings?

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
danteppc
Beginner
Posts: 8
Joined: Tue Mar 09, 2021 9:41 am

Hold altitude regardless of sensor readings?

Post by danteppc »

Hello,

I need to fly the drone through the window in an apartment, obviously there's a big change in altitude (with respect to floor) but I don't want Crazyflie to adjust its new altitude (would crash if it does), rather "hold" its z. Is this possible using the Python API?

Thanks

PS i'm talking about an autonomous flight using the motion_commander framework not manual.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Hold altitude regardless of sensor readings?

Post by kristoffer »

Hi!

This is a problem that has been discussed a few times before, unfortunately I can not find any references right now.
Unfortunately it turns out to be more complex than one would think initially and so far we have not seen (or managed to write) a working solution.

You could try to detect it from a python script and immediately adjust the setpoint to compensate for the change in height but I doubt it will work out.

I guess the correct way to fix it is in the estimator in the Crazyflie firmware.
Post Reply