In robotics, sensor information will always be imperfect. There are a multitude of ways to account for this including the Extended Kalman Filter.
However, today I’ll touch on a simple way to use to median filter (with the help of some standard libraries) to implement a median filter to help remove excessive “noise” from sensor information.