Robot Localization using Montecarlo Localization

The problem of localising a robot in a known environment is quite interesting. I would like to share with you my solution to the homework assignment for the unit 1 of the “CS 373 Programming a Robotic Car”.

The environment is a discrete map (colours matrix) where each area can be green or red. The robot can sense the colour (sense function) of the area where is currently on and can move in any directions (move function). To make things more interesting and close to reality the measurements and the motions are subjected to errors and this is represented by the variables sensor_right and p_move. Given a list of measurements and a list of motions the problem is to create a matrix of probability that describe where the robot is likely to be after all the specified moves.

More information about the definition of the problem can be found on Udacity.

I used the python module unittest for this purpose. This is one of the unit tests that I defined for the problem:

Share this:

Related

Andrea Angella

I am a Microsoft MVP and Senior .NET Engineer in Redgate Software. My peers describe me as really enthusiastic, motivated with an infinite passion for software development, a relentless desire to keep learning and an amazing ability to involve others in my pursuit of excellence. I am a proficient C# developer and founder of the Cambridge .NET User Group: the official community on .NET in Cambridge.

Permanent link to this article: https://www.productivecsharp.com/2012/03/robot-localization-using-montecarlo-localization/