PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.22k stars 13.39k forks source link

EKF2 performance poor in gazebo SITL with GPS #6388

Closed jgoppert closed 7 years ago

jgoppert commented 7 years ago

Here is a 3-way comparison on master of EKF2, IEKF, and LPE for a SITL box mission with varying altitude. EKF2 fails on the first turn even before the climb. I think we might want to add an EKF2 multirotor test mission. I know the original thinking was that it was some server cpu limitation, but I can't get it to work locally either.

Maybe EKF2 could benefit from some noise tuning for SITL. For IEKF, I used Allan variance plots for SITL and a pixhawk for real life and really got great results. LPE is just using the same gains found manually from flight testing.

EKF2: http://logs.px4.io/plot_app?log=bd702929-6e9c-452f-b2b3-398e53c9cfb3

image

IEKF: http://logs.px4.io/plot_app?log=6c99fd56-0863-4e24-bf72-6b67adb27392

image

LPE: http://logs.px4.io/plot_app?log=3fbb051c-aeb8-44af-bff3-459c4e771fb1

image

RomanBapst commented 7 years ago

@jgoppert What kind of gps delay are you using in your tests and do we know the delay that is added in gazebo? I remember that I once opened an issue because gazebo did not delay the gps signal.

jgoppert commented 7 years ago

Yes, that is true. Currently sitl gps is undelayed and has no noise. We should look into fixing that. Shouldn't be too hard.

jgoppert commented 7 years ago

I added GPS delay and noise to sim here: https://github.com/PX4/sitl_gazebo/pull/82.

jgoppert commented 7 years ago

Resolved.