The ability to explore an unknown environment with obstacles was developed in three steps. First, we wrote an algorithm that would enable Flaky to navigate in a world without obstacles. Low-level behaviors were implemented to control the movement of the robot, which includes moving forward and turning in each of the four directions. The robot calculated the number of rows and columns it needed to move to get to the goal state. The robot used the rotation of its wheels to monitor its current position and monitor its progress towards a solution.
Obstacles appear at unknown locations on the grid.
The second step was to develop an algorithm that enabled Flaky to avoid obstacles. Before the robot proceeds to the next cell, it uses its proximity sensors to determine if the cell is occupied. If it is, the robot turns in another direction to avoid the obstacle. Rather than have the robot make an uninformed guess as to how to avoid the obstacle, we had it use its knowledge about where the goal is and where it had been. If the goal is to the south and east, it tries to go around the object by either moving south or east.