Trying to get the optical flow and lidar working to do position hold indoors without GPS. They appear to be working fine in the inspector window widget, I can see the distance changing for the rangefinder, and I can see values changing for the optical flow. When I switch to the position control flight mode, I get the "reject position control" flag. I have tried the below from previous posts, and set EKF2_AID_MASK to only use optical flow. I have tried setting SYS_MC_EST_GROUP to 1 and 2. The variable LPE_GPS_ON does not appear to exist. I am using a pixhawk with firmware 1.7.3 and QGroundControl daily build downloaded on 2/28/18 on a windows 10 machine. I've updated the optical flow camera to the firmware QGroundControl defaults to. I am talking to the LIDAR with PWM. Garmin says to use a 1k resistor, I'm using 470 ohm per tutorial, and just want to point out that the order of the wires has reversed in the V3 device.
Any ideas? Thanks!
The pixhawk will not enter position control mode unless vehicle_local_position_ned messages (a.k.a. local_position_ned in mavlink) are regularly published by the estimator (LPE, in your case), with the flag xy_valid set.
You can disable the GPS in the LPE estimator by seting the parameter LPE_GPS_ON to zero. Also, check the value for LPE_FLW_QMIN, and make sure that this value is at or below the average quality measurement reported by the optical flow camera.
Also, you can try using EKF2 instead of LPE, if you do so make sure to change the EKF2_AID_MASK parameter to disable GPS and enable optical flow fusion.