Which version of PX4 are you running on the Pixhawk and do you have a magnetometer connected? EKF2 is generally unhappy about about starting without a magnetometer in PX4 1.11 so we patched the PX4 firmware for Flight Core to get around this. In PX4 1.12 and newer the following PX4 parameter can be set to allow EKF2 to allow position mode without a GPS/Mag
## disable mag
SYS_HAS_MAG 0
EKF2_MAG_TYPE 5