Drifting in x & y direction while yawing about the drone's center

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
hamsterasu
Beginner
Posts: 6
Joined: Tue Mar 01, 2022 3:40 am

Drifting in x & y direction while yawing about the drone's center

Post by hamsterasu »

Hi,

I have a Crazyflie Bolt drone with a flow deck v2. I notice that the drone drifts in the x-y direction when I try to yaw about its center. Is this a known problem/limitation or is there something I am doing wrong?

I tried yawing it fast and slow, and I have this observation- The amount of drift seems to depend on how long you are yawing, not the yaw rate. In other words, if you yaw fast, you give the drone less time to drift. Conversely, if you yaw slowly, you give the drone more time to drift further away. Let's say I want to yaw 90degrees, if I yaw it slowly, it will drift more than if I were to yaw it fast. This is just what I think I am observing, I might be wrong. Any insight would be welcomed! :)
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Drifting in x & y direction while yawing about the drone's center

Post by kimberly »

Hi! I moved your topic to autonomous flight as you can see.

The flow sensor, namely the VL53L1x by pixart imaging, only outputs a single xy flow vector. We still have the datasheet on the deprecated wiki (we need to move that at one point)

But, the optical flow sensors is a camera by definition, tracking motion from one frame to another. What the sensor outputs is the average of all those pixel motions at a given time, and it does not distinguish rotation from the xy flows that it gets from the individual pixels.

Long story short, there is no way to fix this with this current sensor, as we need to get those individual flow vectors which the chip does not provide. The thing that you could do, is to increase the flow error's standard deviation to the kalman filter while turning, such that the position estimate won't thrust that value as much as before. You can find that parameter here: https://www.bitcraze.io/documentation/r ... ms/#motion
hamsterasu
Beginner
Posts: 6
Joined: Tue Mar 01, 2022 3:40 am

Re: Drifting in x & y direction while yawing about the drone's center

Post by hamsterasu »

Hi Kimberly,

Thanks for the prompt reply and for moving this topic to a more appropriate group!
The flow sensor, namely the VL53L1x by pixart imaging, only outputs a single xy flow vector.
I think you meant PMW3901 here, not VL53L1x :)
Long story short, there is no way to fix this with this current sensor, as we need to get those individual flow vectors which the chip does not provide.
Understood. Thanks for the explanation! I will attempt what you suggested and post an update on the result soon :)

Another question. After many more tries in manoeuvring the drone, I observed that the drone can yaw with little to no drift on some occasions and it happens quite randomly. Am I right to say that it is just by luck that it happened?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Drifting in x & y direction while yawing about the drone's center

Post by kimberly »

Ah woops! yes that was a wrong copy paste, Yes I mean the PMW3901 Good eye!

About your last question, about the drift happening randomly... yes I would imagine so. There might be some influence of the lighting, the texture on the ground or something else, but we haven never did any testing on this.

Let us know if our suggestion works out!
Post Reply