Hi everyone,
I’m working on a quadcopter running PX4 v1.15, and I’m trying to fly without GPS using only an optical flow sensor (H-Flow) and IMU for position control.
Below are the logs:
Here’s the issue:
In Position Mode, I give local setpoints.
But the drone does not move at all toward the setpoint, even though it's clearly visible in the logs.
The vehicle_local_position_setpoint/y and vehicle_local_position/y are plotted, and they never converge. The drone appears unaware of the target position. Quadcopter moving only when change setpoint, after that drifting and stop new position but not at the setpoint.
System Details:
PX4 version: 1.15 (PX4_FMU_V6C
Optical Flow: H-Flow (connected via CAN)
EKF2 is used (not LPE or EKF3)
No GPS, no external vision, only H-Flow + baro + IMU
Parameters I’ve set:
EKF2_OF_QMIN = 1
EKF2_OF_GATE = 3.0
MPC_XY_P = 1.2
MPC_XY_VEL_P = 1.8
MPC_XY_VEL_D = 0.25
MPC_XY_CRUISE = 36 km/h
Observations:
vehicle_local_position.xy_valid = true
vehicle_local_position_setpoint is generated correctly
But drone does not even attempt to move toward the X Y-axis setpoint
I also confirmed optical flow data is publishing correctly, and the sensor is oriented properly (SENS_FLOW_ROT = 90)
My Questions:
What could prevent PX4 from reacting to setpoints in Position mode when optical flow is fused?
Could the EKF be rejecting the flow data even if xy_valid is true?
Are there any other parameters or flags I should check?
Any help or suggestions would be greatly appreciated!
Thanks in advance.