Optical flow sensor is not fusing with imu

Hi everyone,

I’m trying to get my PMW3901 (UART version) working with ArduCopter (latest stable) for indoor position hold using optical flow and a rangefinder. However, I’m running into multiple issues:


Symptoms

  • EKF3 IMU0 stopped aiding keeps appearing in MAVProxy / Mission Planner.
  • COMMAND_ACK: NAV_TAKEOFF: FAILED is shown when I try to take off in Loiter mode.
  • I see flowX and flowY values changing, but they don’t seem to correlate with IMU.GyrX and GyrY, nor with BODY.X and BODY.Y.
  • EKF status flags do not show fusion of velocity from optical flow.

My Setup

  • Flight Controller: Flywoo GOKU GN745
  • Sensor: PMW3901 UART (connected to TX2/RX2)
  • Firmware: ArduCopter [version]
  • Companion: Raspberry Pi Zero 2 W (used for MAVProxy, not powering the sensor)

Key Parameters

  • FLOW_TYPE = 4
  • FLOW_ORIENT_YAW = 0 (tested 0, 90, 180, 270 with no luck)
  • SERIAL2_PROTOCOL = 18
  • SERIAL2_BAUD = 115
  • EK3_SRC1_VELXY = 5 (Optical Flow)
  • EK3_SRC1_POSXY = 0 (None)
  • RNGFND1_TYPE = 1 (LidarLite / Benewake etc.)
  • EK3_FLOW_DELAY = 100
  • EK3_FLOW_GATE = 3
  • AHRS_EKF_TYPE = 3

Observations

  • opt_m_x and opt_m_y change slightly when I move the drone, so the sensor seems to be alive.

  • opt_qua is below 100 most of the time.

  • No “flow fusion” is seen in EKF status (status bit 0x20 off).

  • Logs show intermittent aiding, but mostly “EKF3 IMU0 stopped aiding”.

  • I also noticed takeoff fails with NAV_TAKEOFF: FAILED when trying guided_nogps mode.

  • What exactly triggers “EKF3 IMU0 stopped aiding”? Is it a velocity gate error due to bad scale or quality?

  • Any checklist for resolving NAV_TAKEOFF: FAILED related to optical flow setup?