Recently, I started playing with PX4 EKF2 for sensor fusion. I really appreciate all the work you have done here!
I tested the combination with magnetometer and optical flow. The state estimation works great in both walking test and flying test. However, I have encountered some problem after I started test External vision pose fusion.
Current setup for me is only mocap pose feed in as external yaw heading and primary height source.
EKF2_AID_MASK is set to 16 ( vision yaw fusion)
EKF2_EV_DELAY is set to 50ms (The data is captured by optitrack system)
EKF2_DECL_TYPE, EKF2_GPS_CHECK are set to 0.
EKF2_MAG_TYPE is set to none (The idea is not using mag at all)
EKF2_HGT_MODE is set to vision
The height tracking is quite good but yaw track not. When I check the log data, the innovation_check_flag shows a reading 64 very frequently which I believe it means heading rejection. Then I check the innovation of the heading, it seems saturated most time. I tried to set EKF2_EVA_noise as 0.01 at begining because I think mocap system should be fairly accurate. In that case, the innovation_var for heading is very small. Then I released the EKF2_EVA_noise to 0.3 rad as the default setting for mag_heading as a hack, but the yaw tracking is still not good. I tested both lastest commit at this momment c230663 also this version https://github.com/PX4/ecl/tree/9b6e1ab2a7bf1787842ea9f0acb4008363b5af06.
I am not sure what cause the heading innovation be so big so I am looking for help now. If anyone can give some directions I should look into that will be great.