ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Add EKF3 feature for optflow fusion

Open peterbarker opened this issue 2 years ago • 4 comments

This should automatically remove the EKF3 Optical fusion code based on the presence of OpticalFlow sensors.

The builds looks like this:

Board              AP_Periph  blimp   bootloader  copter  heli    iofirmware  plane   rover   sub
Durandal                      *       *           *       *                   *       *       *
Hitec-Airspeed     0                                                                          
KakuteH7-bdshot               *       *           *       *                   *       *       *
MatekF405                     -10392  *           -10384  -10392              -10384  -10336  -10392
Pixhawk1-1M                   *       *           *       *                   *       *       *
f103-QiotekPeriph  *                                                                          
f303-Universal     0                                                                          
iomcu                                                             *                           
revo-mini                     *       *           *       *                   *       *       *
skyviper-v2450                                    -10400                                      

I believe that means we should test-fly this on a board OpticalFlow is not included on - on a vehicle with a rangefinder attached (RangeFinder and OpticalFlow are intertwined a little in EKF3). Should test with everybody's least favorite height source.

peterbarker avatar Feb 10 '23 08:02 peterbarker

nice one. The issue on CI is right, you need to add this to AP_DAL too as this using some EKF functions!

Thanks, I've pushed a patch for the DAL up.

Interestingly I couldn't run the CI test which failed locally - even on master (./Tools/scripts/build_ci.sh MatekF405-Wing)

peterbarker avatar Feb 10 '23 23:02 peterbarker

From a casual review this looks good to me.

rmackay9 avatar May 09 '23 03:05 rmackay9

I've built all branches and it all seems correct - boards without optflow save a bunch of bytes.

peterbarker avatar May 11 '23 05:05 peterbarker

I've flown this on a SkyViper without incident

peterbarker avatar May 11 '23 05:05 peterbarker

I've run this through the test-features build and fixed unrelated bugs in this PR now

peterbarker avatar Sep 01 '24 13:09 peterbarker