ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.81k stars 17.26k forks source link

EKF failure on small quad #23594

Open tridge opened 1 year ago

tridge commented 1 year ago

This is an example replay log of EKF3 first lane failing badly with copter 4.4.0beta1. The 2nd lane did an emergency yaw reset and worked fine. The first lane didn't and failed badly. The compass has some error, but should not be enough to produce the errors it did. Of most concern is how badly off the roll estimate went: image Log here: https://drive.google.com/file/d/1vol9CKMt5aKm9gLR81fK7fQ_uVkVk12r/view?usp=share_link

The log also shows a bug where we can change to a lane that has just had a reset. The reset drops the innovations for a short time, which opens a window for the lane change to happen. As we don't change again for 5 seconds this means we can be on an extremely bad lane for 5 seconds. The copter was in ACRO mode so it survived, if it had been in a position controlled mode it would have been very bad: image

this log has signs of bad aliasing: image it is a MatekH743

shancock884 commented 1 month ago

The log also shows a bug where we can change to a lane that has just had a reset. The reset drops the innovations for a short time, which opens a window for the lane change to happen. As we don't change again for 5 seconds this means we can be on an extremely bad lane for 5 seconds.

I think this may be what just happened to our quadplane-tailsitter. Probably an issue with IMU sensors, meant non-active EKF was struggling, but when it reset its position and velocity, it looked good for a short time, and so got switched to. Result was not good for the drone :-(. We have Plane 4.5.3, which I believe includes the merged PR, but if I understand correctly, the aspect around 'don't switch right after a reset' is not covered by it?