Page 1 of 1

Optical flow deck (sampling rate, dt and magic number)

Posted: Mon May 07, 2018 12:04 pm
by barza
Hi,

I am using crazyflie with PX4 firmware. My goal is to fly it with the optical flow deck. I have managed to fly it fine without optical flow. I have a few questions related to your optical flow deck:

1) I am reading the flow data at every 10 ms (100 Hz). I wanted to confirm if this is the max sampling rate or if I can go higher? What is the max reading rate for optical flow?

2) If my sampling rate is 10ms, what is the optical flow integration time (dt) in this case? Is it also 10 ms or lower than this?

3) Optical flow gives delta pixels as its output. What is the exact factor I should multiply delta pixels with to convert it to delta radians? Currently I am multiplying it with 1/500 to convert it into delta radians. I got this "rough magic number estimate" by comparing optical flow output * magic number with gyro output while only rotating the crazyflie around body x and y axis.

Waiting for your reply. Thank you!

Re: Optical flow deck (sampling rate, dt and magic number)

Posted: Mon May 07, 2018 1:26 pm
by tobias
Hi!

I will try to answer your questions. First thing there might already be an implemented for PX4, but maybe your goal is to do it your self? If you wan't the mathematics have a look in section 6.5 in “Modelling and Control of the Crazyflie Quadrotor for Aggressive and Autonomous Flight by Optical Flow Driven State Estimation”, M. Greiff, Master’s thesis, Lund University, 2017. paper in the research portal.

1. I think the sensors outputs counts when it detects movement and not at a fixed sampling rate. 10ms I think is a good trade-off but why not try faster :-)
2. See paper
3. See paper