Loiter fly away with optical flow in some floor surface conditions

Hi!

We have made an indoor 4in drone with ardupilot 4.2.0 custom firmware by matek to activate the optical flow functions (due to flash memory limitations of these boards). matek fc 405 mini te, benewake lidar and matek optical flow.

the drone dont have GPS and compass.

the drone works ok, perfect optical positioning in loiter mode.

but…

only works if the floor surface under the drone have a regular texturized pattern. if the surface of the floor its very brilliant, very uniform, with no textures, the drone make a suddenly fly away at the max_angle and we have to react very quickly to change to AltHold mode to recover the control.

its very frustrating fly in indoors and suddenly, if the floor its not ok for the optical, the drone fly away.

Any solution of this behaviour?

thanks

There just is not enough high contrast detail for the camera to track. You could try a bright light under the machine to try and highlight more detail. Or add some high contrast markers to the floor.