Page 1 of 1

Altitude Hold in Script

Posted: Wed Feb 12, 2020 8:10 am
by JindO
Hey

I was wondering if the "altitude hold" function is available to use in a script i.e. can I write a script in which the crazyflie starts up as usual with the motioncommander and then holds its height with the barometer? If so, where can I start looking to implement this in a way I can also adjust height 'set-points'.
I already wrote a script that works with the flow-deck. The CF hovers and then gets velocity-setpoints via the keyboard to move, this I want to implement without the flow-deck
The implementation is only used for testing. It is probably easiest to use the flow-deck or another positioning method, but I want to know if it is possible, I read here https://github.com/bitcraze/crazyflie-a ... d-features that this function is deactivated due to safety reasons. I'm btw testing in a controlled environment, we have nets protecting us from crazy quads ;)

Thanks,
JindO

Re: Altitude Hold in Script

Posted: Thu Feb 13, 2020 2:25 pm
by kimberly
So if you are using a script that is able to work with the flowdeck and position setpoints, that is pretty much the 'altitude hold' as the cfclient does it, so you are on the right track.

Making the drone hover on baro will be though since the baro changes a lot due to the flow of air caused by the propellers (and by the ground if the crazyflie is still on the ground). Also be aware that a different estimator (complementary filter) is used if the flowdeck is not connected.

Btw, the link that you send is from the android client and not the PC python library. Please look at this repo: https://github.com/bitcraze/crazyflie-lib-python and this doc: https://www.bitcraze.io/docs/crazyflie- ... ter/index/