Problem correcting orientation with Optical Flow

Hi everyone,

I am currently working with a PX4FLOW and and Pixhawk.

Until now, I didn’t get any value of Flow_x and Flow_y, but after trying absolutely everything it finally started showing. The problem now is that, even though it gives values back, the drone doesn’t correct the orientation like an Optical Flow should do (if it turns to the right it should correct to the left).

Does anyone know why would this happen? Is there a parameter I need to set?

Also I realized Flow_x and Flow_y gives integer values (1,-1,2,-2,…), but when connected directly to the usb, the range of values is much wider. Is there an explanation for this?

Thanks in advance,

Could it be a lack of calibration?

I calibrated accelerometers, gyros, and magnetometers with QGroundControl.

Regarding the Optical Flow, it doesn’t display video when connected, so I’m not sure about how well it’s calibrated.

I have that problem too, I can’t calibrate the Optical Flow.
Are you using PX4 autopilot?

The only way I could see the video image was installing ArduPilot, and using an older version of Mission Planner. See if that works for you

I have installed ArduPilot and yet it doesn’t show any image.

In any case, thanks for your help.

Have you tried to calibrate it in an old Mission Planner version? It worked for me.

And does it work for you now?

I will try then, which version did you install?

Now I had to switch do PX4 again, so I don’t know if that works now.

I don’t remember the version, it was something like 39, I think.

Amazing, it shows the video!

Now, I will see if I can calibrate it.

Thank you so much!

Excellent! Please explain your process to me at the end, if it works!

Let’s see, I work with Ardupilot and PX4FLOW, I installed Mission Planner 1.3.39, when selecting the tab of PX4FLOW in Initial Setup, the camera opened, I focused it. Then I followed the tutorial of Ardupilot, making short turns of ±15º in Roll and Pitch, downloading the logs, plotting them and adjusting FLOW_ORIENT_YAW, FLOW_FXSCALER and FLOW_FYSCALER.

At last I saw that it wasn’t only the Optical Flow but also the Throttle parameters MOT_SPIN_ARM and MOT_SPIN_MIN (Setting Motor Range — Copter documentation), that made the dron uncompensated.

Now it works fine.

1 Like

baaed on the optical flow , that is, on the motion of point features in the field of view. rotation, so the key problem of separating the effects of rotation from those of translation is solved image deformations and derive an equation that links them to the direction of heading. an important point for finding the correct solution.