KOKILI OPTICSRELIABLE CONNECTIVITY Request a Quote

AP Optical Flow Module

The AP Optical Flow Module is a software and hardware interface in ArduPilot that enables drones to estimate velocity and position using optical flow sensors, particularly in GPS-denied environments.

Overview

The AP Optical Flow Module is part of the ArduPilot libraries and supports multiple optical flow sensors, including PX4Flow, PixArt, CXOF, MAVLink-based sensors, and others . It allows drones to measure motion relative to the ground by analyzing sequential images from a downward-facing camera, often combined with a distance sensor like LiDAR or sonar for altitude reference . This module is essential for position hold, loiter, and navigation in indoor or GPS-denied areas.

Supported Sensors and Hardware

Common sensors compatible with the module include:

  • PX4Flow: A popular optical flow sensor with integrated distance measurement.
  • PixArt PAA3905: Used in modules like Holybro H-Flow.
  • Holybro H-Flow: Combines a PixArt optical flow sensor, Broadcom distance sensor, and a 6-axis IMU in a compact module .
  • Other modules: CXOF, UPFLOW, MSP, and MAVLink-based optical flow sensors . These sensors can connect via MAVLink, I2C, or DroneCAN, depending on the hardware and flight controller.

Functionality

The module calculates angular motion from the camera images, which is then converted into translational velocity relative to the ground. Forward movement along the X-axis appears in the Y flow axis, and rightward movement along the Y-axis appears in the X flow axis due to the rotation of the ground image . The module can be used with EKF2 or LPE estimators in ArduPilot to fuse optical flow data with other sensors for accurate position estimation.

Calibration and Setup

Calibration is crucial for accurate measurements:

  • In-flight calibration: Rotate the vehicle in roll and pitch axes while keeping the sensor centered, then analyze log data for flow and IMU readings .
  • Parameter adjustments: Scale factors for X and Y axes (_FXSCALER, _FYSCALER) and yaw alignment (_ORIENT_YAW) can be configured to correct sensor readings .
  • GPS/Non-GPS transitions: Optical flow can be used as the primary horizontal position source when GPS is unavailable, with EKF source switching to maintain stability .

Integration

The AP Optical Flow Module integrates seamlessly with ArduPilot-compatible flight controllers like Pixhawk. It can be used in combination with rangefinders to prevent exceeding maximum altitude limits and to maintain stable loitering or position hold . Modules like Holybro H-Flow provide all-in-one solutions with onboard IMU and infrared LEDs for low-light operation .

Practical Applications

  • Indoor navigation and obstacle avoidance.
  • GPS-denied environments such as tunnels or warehouses.
  • Enhanced stability for drones during low-altitude flight.
  • Integration with autonomous flight modes like Loiter, PosHold, and guided missions. The AP Optical Flow Module is a versatile tool for improving drone navigation and stability, especially when GPS signals are weak or unavailable. Proper calibration and sensor selection are key to achieving accurate and reliable performance.

ardupilot/libraries/AP_OpticalFlow/AP_OpticalFlow_PX4Flow.cpp

ArduPlane, ArduCopter, ArduRover, ArduSub source. Contribute to ArduPilot/ardupilot development by creating an account on GitHub.

ASUS Global

Explore ASUS''s innovative and high-quality products, including laptops, phones, routers, monitors, and more. Discover best-in-class

ardupilot/libraries/AP_Scripting/applets/ahrs-source-extnav

-- this script is intended to help vehicles automatically switch between ExternalNav and optical flow

DroneCAN Optical Flow | Vimdrones Can Flow | Ardupilot | PX4 | AP

Sold out Open Source Dronecan Optical Flow and Distance Sensor Module Specification Download: https://dronecan.github.io/

Estimating optical flow: A comprehensive review of the state of the art

Notably, the state-of-the-art performance achieved by VideoFLows (Shi et al., 2023) is attributed to its utilization of a

AP_OpticalFlow: Add initialization support for UPixels UPFLOW optical

The difference is identified by checking the silk screen on the PCB. After the optical flow module is powered on, it

Optical flow options-2020

Hello! I am trying to figure out which optical flow options are best to start with. When new hardware experimenting

ardupilot/libraries/AP_OpticalFlow/AP_OpticalFlow.h at master

Vector2f flowRate; // optical flow angular rate in rad/sec measured about the X and Y body axis. A RH rotation about a sensor axis

Optical Flow | PX4 Guide (main)

The Holybro H-Flow is a compact DroneCAN optical flow and distance sensor module. It combines a PixArt

AP_OpticalFlow_SITL.cpp

ArduPlane, ArduCopter, ArduRover, ArduSub source. Contribute to ArduPilot/ardupilot development by creating an account on GitHub.

ardupilot/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp at master

// @Description: This sets the parts per thousand scale factor correction applied to the flow sensor X axis optical rate. It can be used

Optical Flow Sensors (landingpage) — Copter documentation

Copter, Plane and Rover support Optical Flow Sensors. These are camera modules that use ground texture and visible features to

Optical Flow | PX4 Guide (main)

Optical Flow uses a downward facing camera and a downward facing distance sensor for velocity estimation. It can be used to

Still Have a Technical Question?

Our team can help review your product selection.

Ask Our Team