-2

I am trying to write a robot localization program and i am getting a very noisy measurements and there are several outliers. I am quite new to these subjects so i don't know where to start. Can you suggest me a way to move on? Here is a sample measurement scatter plot of my robots continuous path. As you can see there are outliers and not very smooth path. What i want to do is a way to get rid of these outliers and make the path as smooth as possible. I record measured positions to a csv file and plot these afterwards. robot localization with noise

I have searched on the internet and i fount that a lot of people are using kalman filter to estimate the position. The thing i do not quite get is that i do not need to estimate the next move of my robot. I just want to precisely find the location of my robot. That is why i do not understand the use of kalman filter. Do you have any ideas how can i do that?

Bepo-san
  • 1
  • 1
  • 1
    There exists no real best solution. But one way to approach it would be to calculate the mean distance for each point to its n-nearest neighbors. They you can use a cutoff value, to determine, whether one point is an outlier or not. – Marcello Zago Feb 20 '23 at 13:22

1 Answers1

0

As suggested by the comment, you can:

  1. Measure the new position
  2. Take the n-nearest neighbors in terms of x and y position, or the previous n measurements (could be more sensible depening on sampling rate and robot path)
  3. Compute the mean distance between all those n measurements and the new one
  4. If this mean distance > threshold, you have an outlier

note that you can also use kalman filters not in terms of prediction but also in terms of outlier detection: just compare the the kalman result is too far away from the real new measurement, to check if you have an outlier.

rikyeah
  • 1,896
  • 4
  • 11
  • 21