EKF3 large position offset after startup using UWB beacons

I am using an indoor positioning system based on UWB beacons. This system is composed of four UWB MDEK1001 anchors placed in the four corners of a room with a size of 10m x 5m. The system appears to work properly, the distances to the various beacons are logged correctly, the position is accurate and the drone hovers maintaining the position precisely.

The problem is that approximately one minute after startup the EKF3 position jumps, gaining an offset of several meters, after which it stabilizes again. This makes it impossible to use waypoints consistently between flights since, although the relative accuracy of the system remains good this offset applies an absolute and random error in the position preventing the use of autonomous missions.

Below, I am going to plot the positions of the EKF3 in conjunction with the position reported by the UWB system. At 19 seconds the EKF3 initializes and its position jumps to the position reported by the UWB system (4m in X, -2m in Y). But at 49 seconds the position suddenly jumps in a random direction gaining a large offset before stabilizing again.

Msg

This behavior is consistently repeated in all the tests I have performed with this position jump always occurring at 49s as explained above.

I attach two logs in which this behavior can be observed in the beginning of the log.

LOGs: Logs UWB - Google Drive

If someone with a deeper knowledge on the subject could advise me on why this phenomenon occurs or how to solve it, I would appreciate it.

I have also encountered it before, it should be ekf3, the reason for constantly setting the origin.

Do you have any more details on why this behavior is happening or how to solve it?

From what I understand, everything starts with the vehicle being level on the ground, all IMUS indicate this, with beacons indicating a constant and fixed position. And then the EKF3 goes nuts, changes position abruptly creating a change of speed and even a change of attitude to later stabilize again.

Is this due to EKF3 setting the origin wrong or what? I fail to understand what is causing the change of position.

@priseborough can you take a look at this?

Yesterday I performed new test flights, and exactly the same behavior as described so far is still occurring.

I leave the new flight log here as well:

Log day 2: Test day 2 - Google Drive

I have finally been able to understand what the cause of the problem is.

The origin of the EK3 is set before starting to use the beacons for positioning, and it is not reset when the first position of the beacons is used.

The beacon reports position and distance to each anchor from the start, but they are not used until about 49 seconds after startup. Before this the origin EK3 has already been set. It has been set to the position/coordinates given to the origin anchor (the anchor in the lower left corner). Therefore, at around 49s when the position reported by the beacon is first used the vehicle position instantly jumps a few meters from the EKF3 origin to the actual position reported by the beacon. This makes the EKF think that the vehicle has just moved very fast, causing the effect described above.

Captura

Now it comes down to why the EK3 origin is set before beacon position is used. Why it takes so long to start using beacon position if they are reporting it from startup? Or why the EKF origin is not being reset when position of the beacon is first use? With GPS this is the case, right?

Could this be a clear bug?

Please post a link to this thread on the 4.2.0 release thread so that this gets fixed.

Okey!

Moreover the last tests I have done are with AC 4.2.0 and the behavior is still the same. I leave logs of these tests below.

Logs: Test day 3 (AC 4.2)

@AngelAlbeniz Hi i am working with POZYX UWB and i have your same problem. The drone appears suddenly on the position given by BCN parameters and then drifts after about a minute (i never placed it exactly on the origin of the anchor) moving in the direction to which the drone is pointing for several meters. Do you find out how to solve this?

Hi Chris
The behavior is still consistent with what I described in this post. And I haven’t been able to fix the issue yet.

1 Like

Hi @amilcarlucas, having narrowed down the problem and seeing that it seems to be not just my problem, as other users like @chris25983 have also experienced it. What advice would you give me to try not to leave this here? Would it be appropriate if I open an issue on GitHub? Thx.

Yes, a gitbhub issue with detailed information on how to reproduce the problem would be the next step.

But ever better is a github pull request with a source code fix :wink:

2 Likes