Large time delay between vision position and position estimation by the EKF2


I have an quadcopter flying indoors. To determine the flight position an UWB tracking system is used and the calculated postion is streamed to the vision topic via Mavlink. We are able to archive a tracking rate of ~25 Hz and a stable flight based on the UWB tracking information.
But as I need to increase the flight accuracy I analysed some log files and discovered a large time delay (0,5 to 1 second) between the moment when the vision position is received and the corresponding position estimation of the EKF2.

In the picture below you can see an extract of one of the log files. The estimated local_position (cyan) is delayed around half a second compared to the vision position (yellow).

Please find the complete log file here: Flight Review

How can I improve the performance of the EKF2 to follow the vision position with a reduced time delay?

Thanks a lot in advance!

1 Like