Assignment 1: Robotic Control and Dead-reckoning
The three parts of this assignment basically amount to the Freshman Roomba Design Lab (Winter 2007). The purpose of this assignment is to familiarize you with controlling the Robot using a computer while introducing some basic algorithms for movement.
Roomba Challenge #1 is a set of "cattle chutes", i.e. a maze with 1 path and no detours. The maze requires the Roomba to make several turns to reach the end. The maze can be "short cut" for a faster time via some measurements and sensing.
Though the first maze is relatively easy, setting up the environment will provide that extra bit of frustration that puts it on par with the other mazes. The challenges you can hope to face are as such (maybe more?):
- Getting Roomba and your computer interacting
- Understanding how to communicate with Roomba via your computer
- Developing an algorithm/solution to solve the maze
- Implementing and testing the said algorithm
- Compensating for the error introduced by controlling a physical entity through digital means
While setting up and learning how to send Roomba commands is a pretty straightforward task (the only pitfalls will be troubleshooting situations), the task of designing a solution for the maze is a much more involved process. There are many ways to implement the same behavior, but some ways work better with the rest of your code. This is just the first maze, so creating an elegant algorithm is not yet necessary, but come later assignments (or even the second maze), you will have to make conscious decisions on what types of programming structures to use. The main concern here is the disparity between what your code does and how your Roomba acts. Your Roomba's strange behavior that deviates from what you perceive your algorithm to be can be attributed to external forces affecting the Roomba; this includes movement of the vehicle, friction, uncertainty in orientation, and, of course, human error. Programming and programming robots is different in this respect -- the environment is not ideal, the robot's shortcomings must be accounted for, and your code must compensate for the less than perfect conditions the surface while controlling a non-virtual entity.
The actual maze will be the hallway of University Commons. Below is a map of the hallway in University Crossings between room 147 and room 151. You will start at room 147 and follow the path indicated by the yellow arrows towards 151. You should avoid all of the colored squares in the hall. Each tile in the hallway is 1 sq. ft.
Now that you have become more familiar with the Roomba programming environment, you should now be able to develop more complex uses of the senors, as well as implement more advanced algorithms to aid you in exploring a richer worlds...!
The Roomba must navigate a similar set of pathways as in Part 1. While most of the maze can be navigated via dead reckoning (like Part 1), use of additional sensors will be required to find the exit the Maze. Sensors that the teams may want to explore how to use include the wall sensor and other bump sensors. You may want to implement a general maze exiting strategy (such as DFS/wall following).
You will not be graded on the time it takes your Roomba to exit the maze, only that it succeeds in exiting the maze.
The primary areas of concern in this challenge are as such:
- More complex usages of Roomba Sensors
- Developing behaviors that handle dead-ends, diagonal turns, curves, etc...
- Detecting short-cuts that may be harder to 'sense' with basic algorithms
Because the layout of this maze will be provided for you, this maze allows you to use a combination of dead-reckoning and autonomy. You should already have a good feel of what needs to be done to move the Roomba in whichever direction you need, so the challenge here is to exercise some insight into what will allow Roomba to see what you see if you were the one walking through the maze, and then translate such a thought process into a behavior. This maze differs from the first maze in that some degree of autonomy must be achieved in order for Roomba to find its way through. However, you, Roomba's all-knowledgeable, omnipotent deity, knows the layout of the maze... so a good approach would be to guide Roomba through the certain parts of the maze that can be easily traversed via conventional dead-reckoning, and then write a behavior to sense its way through a specific obstacle, whether that be a short-cut or a traffic circle (a.k.a. roundabout, as they call them in the UK).
Part 3 is intended to be a fun one: get the Roomba to play a tune. Four suggestions are given.
There are many sources of information about this problem on the Internet. Apple Mac users may have a slightly easier time, however ultimately you need to send a sequence of notes to the Roomba for it to play automatically. This can be done from MAC, Windows or Linux.
It may indeed be possible to write a direct interface (i.e. a program) that takes a MIDI file and "pipes" it directly to the Roomba. For example: [http://www.midisite.co.uk/midi_search/star_wars_imperial_march.html] has about 20 versions of the Star Wars Imperial March. The Roomba's MIDI palette is more limited than a musical keyboard, hence you may need to remove or truncate notes outside of the Roomba's audio range.