Unusual Optical Flow Results

Hi Ardupilot Community,

I have been facing multiple issues with Optical Flow and finally got to a stage where the flowX and bodyX and similarly in flowY and bodyY are tracking. But, we tried to repeat the experiment in bright light and surprisingly the results were poor- as in they were not tracking. We tried performing it in outdoor conditions and still luck.

So we tried it again in the lab where we did it previously and it tracks in that area. But, if we move around and try the same they dont track. It does not make sense to us, and it would be great if someone points out what we are missing. I am attaching two logs, one we did in lab where they tracked, other in more bright room with checked pattern on the floor.

https://1drv.ms/u/s!AsWOA-Om6DUYpHuRJSzkgWAAmBeq?e=Tayvwu
https://1drv.ms/u/s!AsWOA-Om6DUYpR-TY5eyOl1u8h9h?e=vpNvh4

@rmackay9 @ppoirier Can I get little help here?

Hello
What sensors are you using (flow&rangefinder)?
What type of surface and texture are you flying over?

Optical Flow requires high texture and low reflectivity surface to work correctly

Hi,
Thanks for replying.
The sensors were LidarLite v3 and OpenMV cam h7. We tried the experiments were conducted over carpet surface and checked pattern in the other one.

@rmackay9 do you have any suggestion, cause I have not tested on OpenMV

Looking at the script, you might try 64x64