Px4 Flow Sensor - Unable to properly work

I am trying to use a px4 flow sensor for position hold mode on a drone. Currently, I have tried using Ekf2 and LPE.

For Ekf2, the optical flow sensor is enabled and range is set as the height sensor, however, the flight controller will not allow me to enter into position hold mode. The drone is only receiving height information and not x and y (Seen in /mavros/local_position/pose).

Additionally, I have tried using LPE, but the flight controller will only enter position hold mode with the parameters seen in the image one. This issue was also found in #7600 in that the flight controller uses the camera for position, but does not use the sonar for height.

Essentially, I have only been able to use the sonar for height with Ekf2 and the camera for position when using LPE.

If anyone knows how to get this working, please let me know.

Image One
image

Drone:

  • DJI F450
  • Px4 Flow Sensor is connected via i2C bus shared with compass
  • Photo of the IMU / autopilot setup
    image