Specification
For your CS20 final project, your team will be programming an iRobot Create to autonomously navigate a maze. The maze will consist of black lines on a white surface. Your robot will be placed at the start of the maze, faced in any direction (my choice). You are to navigate through the paths of the maze to the end, where you will run into obstacle that will trigger the robot’s bump sensor. At this point, you need to stop and visibly indicate that you are done (beep, flash lights, etc). While navigating the maze, your robot may not cross a line. For the purpose of the assignment, “crossing a line” will be defined as over ½ the robot body crossing the line. You are free to choose any strategy for navigating the maze. I would encourage you to consider a wall following algorithm. (https://en.wikipedia.org/wiki/Maze_solving_algorithm#Wall_follower).
Assumptions you may make
• All lines are straight. They will be no less than 3” in width.
• All corners are 90 degrees
• The maze size is approximately 20’ by 20’.
• The path width (line to line) is at least 24”
• The maze is simply connected (every wall is connected to either another wall or to the boundary).
• Make no assumption about the direction your robot will be facing when started.
• There is a large object at the end of the maze that will trigger a bump sensor. There will be no other objects in the maze.
As you know, when working in the simulator, when the robot is travelling in area free of lines, the cliff sensors will return a value of 21.5. When a line is detected, the value is 1.5. When working with the hardware, these values are not as clear cut. Therefore, at the top of your main script, declare a variable called LT (for line threshold). All of your code should be written in terms of this value, and not a hard coded value. When you show up demonstration day, I will have done testing given the lighting, to give you a good value for LT. While working in the simulator, any value > 1.5 and < 21.5 will work.
A sample maze may look similar to this: