Optical Flow uses a downward facing camera and a downward facing distance sensor for position estimation. Optical Flow based navigation is supported by: EKF2 and LPE.
An Optical Flow setup requires a downward facing camera and a distance sensor (preferably a LiDAR). These can be connected via MAVLink, I2C or any other bus that supports the peripheral.
The output of the flow when moving in different directions must be as follows:
|Vehicle movement||Integrated flow|
For pure rotations the
integrated_y) have to be the same.
The easiest way to calculate the optical flow is to use the PX4Flow board (see link for setup information).
You can use any supported distance sensor. However we recommend using a LIDAR over a Sonar, because of robustness and accuracy.
For optical flow fusion using EKF2, set the use optical flow flag in the EKF2_AID_MASK parameter, as shown using QGroundControl below: