Maintain altitude when flying over obstacle in autonomous flight

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Maintain altitude when flying over obstacle in autonomous flight

Post by cfnewbie »

Hello,

Is it possible for the crazyflie to maintain altitude when flying over an object in autonomous flight using flowdeck and LPS system?

If yes, please guide me how to do it.

Thank you!
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Maintain altitude when flying over obstacle in autonomous flight

Post by kristoffer »

Hi!

This is not possible out of the box. The problem is that the estimator puts a lot of trust into the distance data from the flow deck, but there are a couple of options:
1. Add some logic that identifies changes in the "floor level" and offsets the measured distance from the flow deck. This is related to https://github.com/bitcraze/crazyflie-f ... issues/540
2. Reduce the trust in the distance measurement from the flow deck, which will put more emphasis on the data from the LPS system instead for Z. This is controlled by the std dev parameter when sending measurements to the kalman estimator, a larger value means less trust (or actually that the data is more noisy). The distance measurements are sent to the estimator using the rangeEnqueueDownRangeInEstimator() function calls (in the crazyflie firmware) from the zranger.c or zranger2.c files (depending on which deck you have). You can play with expStdA and expStdB, or remove the call all together. If you remove the call you should (I think) get good accuracy in X and Y with assistance from the flow sensor, while Z will be slightly less good since it is calculated only from the LPS data and IMU.
Post Reply