|
Hi, I was wondering if it would be possible to solve the kidnapped robot problem (localization after a random replacement) using our particle filter implementation. Well, it's much easier than I initially expected. Actually, it took only 4 lines of additional code to solve the problem :) Here's what I did: Each turn there's a 10% chance that the robot is replaced. Using the 'normal' solution for homework assignment 3.6 the algorithm is then (in most cases) unable to localize the robot again: Incorrect position belief after replacement So, in order to solve the problem all I had to do was to randomly seed some particles in the world for each iteration, which will result in something like this: Correct position belief thanks to randomly distributed particles And that's it! After a replacement the algorithm will converge to the correct position after 1-3 iterations. Of course, this is not a new idea by any means, but I was still surprised how easy it was to implement this. Maybe some of you will find it interesting as well :) I'll upload my code tomorrow, in the meantime you can see the algorithm working here: I made some changes to the visualization, so that for each iteration the robot movement and the motion prediction is visualized as well. Have fun :) edit: Here's the code: Github Add random particles:
|