top of page
Alberto
Delgado
Localiced vacuum cleaner
The objective of this practice is to implement the logic of a navigation algorithm for an autonomous vacuum cleaner by making use of the location of the robot. The robot is equipped with a map and knows it’s current location in it. The main objective will be to cover the largest area of a house using the programmed algorithm.
First steps:
The first thing to do is to divide the map in cells, in this case we will use a grid of 27 by 27, to do this we can use a program like inkscape to transfer the elements of the map to the grid, getting something like this:

Then we calculate the equations to go from the coordinates of the map to a cell, taking points from the map and using their position in the grid, for example the initial point ( 5.04, 3.8) corresponds to the cell (2,2), and we get two equations like:
Xcell =a*Xmap + b
Ycell =c*Ymap + d
After that, we have to make the robot move one cell and turn 90 degrees, so we can use the movement for the algorithm.
In this case i chose an algorithm that makes a spiral cleaning from outside to inside and when everything is clean arround the vacuum it searches for a dirty point that it has seen and goes there using the A* algorithm to keep cleaning, in this simulation we can see how it does this.
Finally, we join the two parts of the code and this is the result:
bottom of page