I'm implementing Monte-Carlo localization for my robot that is given a map of the enviroment and its starting location and orientation. Mine approach is as follows:

  1. Uniformly create 500 particles around the given position
  2. Then at each step:
    • motion update all the particles with odometry (my current approach is newX=oldX+ odometryX(1+standardGaussianRandom), etc.)
    • assign weight to each particle using sonar data (formula is for each sensor probability*=gaussianPDF(realReading) where gaussian has the mean predictedReading)
    • return the particle with biggest probability as the location at this step
    • then 9/10 of new particles are resampled from the old ones according to weights and 1/10 is uniformly sampled around the predicted position

Now, I wrote a simulator for the robot's enviroment and here is how this localization behaves: http://www.youtube.com/watch?v=q7q3cqktwZI

I'm very afraid that for a longer period of time the robot may get lost. If add particles to a wider area, the robot gets lost even easier.

I expect a better performance. Any advice?

  • $\begingroup$ The performance shown in the video is good, considering a single sonar sensor. Do you have an example video of the robot being lost? $\endgroup$
    – Demetris
    Jan 21, 2014 at 8:35
  • $\begingroup$ There are actually 5 sonars, would still say it's good? I don't have a video of the robot getting lost, but I'll try it today on a real robot. $\endgroup$ Jan 21, 2014 at 15:33
  • $\begingroup$ It's not clear to me what your concern is. The PF you implemented seems to work fine. Maybe you can be more detailed on what you think is the problem. $\endgroup$
    – Demetris
    Jan 21, 2014 at 19:47
  • $\begingroup$ Please don't ask the same question on multiple stack exchange sites. If you accidentally ask on the wrong site, it can be migrated to the correct one. $\endgroup$
    – Mark Booth
    Jan 22, 2014 at 2:13
  • 1
    $\begingroup$ Welcome to Robotics Andrei Ivanov. As it stands it isn't clear what your actual question is here. We prefer practical, answerable questions based on actual problems that you face. Take a look at How to Ask and tour for more information on how stack exchange works, and think about how you can edit your question to make it more answerable. $\endgroup$
    – Mark Booth
    Jan 22, 2014 at 2:16

1 Answer 1


I just answered the question on StackOverflow, where it already been asked. Here is the link:


  • $\begingroup$ read your answer you are right :) $\endgroup$
    – Neo
    Feb 4, 2014 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.