CSSE 120R Final Python Robotics Project—Winter 2009-2010

Project Requirements

The final project for the Python part of this course is to implement a GUI for robot control that includes reacting to IR sensor messages! Your GUI will have functions for controlling the robot and one button more important than others... the "Musical chairs" button.  The gold standard for Musical Chairs is to be able to drive circles around a track while avoiding the teacher robot in the middle. If the teacher robot (ie the "chair" in Musical Chairs) is sending the IR signal 50 your robot should be doing laps around the track.  If the teacher robot sends IR signal 100 your robot should stop immediately (at least within 2 seconds).  If the teacher robot sends the IR signal 200 your robot should be the first to reach the chair (ie the teacher robot).  Summary: 50 = Music playing go around track, 100 = Freeze!, 200 = The music is done go for the "chair".

Your project must satisfy these core requirements:

  1. You must complete the implementation of a GUI to control your robot.
  2. You must implement code to receive IR information WHILE line following around a track then respond to that IR value.
  3. All team members must contribute to and understand their project.

Most of the work on your project will be translating the guidelines provided into a working implementation. If you are having trouble planning or getting started, get help. It is much better (and easier) to get help early and start off with a good plan than to try to hack a poor design into a semi-functional program in the final days before it is due.

Milestones

To make sure that you are on-track to complete your project, you must meet the following milestones. Each milestone will contribute to your overall project grade. Each milestone must be done at the beginning of the specified class session (no 24-hour extensions). This is so we can help you in class as needed. For each milestone, you must commit your work to your repository and include a clear commit message stating that that milestone is completed.

Grading

Here is the rubric we will use to grade your program. Note also:

Project grades will be based on both individual and group results.

We will check off each project milestone, to make sure you are making steady progress.

The final program will be graded based on the proper functioning of your program.

The program will also be graded on your design, coding style, and documentation, including SVN commit messages.

The grade can also be bumped up some due to your creativity. While you can earn an A by following the requirements in this document, sometimes students think of even cooler things to do to demonstrate their understanding. What challenges you?

Each team member will be required to complete an evaluation survey about his or her own performance and that of each of his or her teammates. We will use these surveys and our own observations to assign individual project grades.

Details

GUI

Your GUI must support as a minimum:
  1. Connecting (to the specified port number) and disconnecting from your robot.
  2. Driving your robot directly at the specified speeds.
  3. Line following.
  4. Sending IR information to your self during any activity.
  5. Playing the Musical chairs game.
  6. Playing a very short song.

Example:


This is just a sample of what our GUI looks like.  You can use the given layout or make your GUI look different, but you shouldn't waste hours moving rectangles.  The capital letter shows the quick key for each button.  Focus on the interesting parts of the project, like robot behavior.

We have included a RobotButton class in the project. This will allow you to make any additional buttons you'd like. See how we made the given buttons as an example.

Note: the Re button is for Disconnect and Reconnect.  This button seems worthless but is a good solution to the sensing garbage problem.  Remember that anytime your robot code doesn't reach the robot.shutdown() command normally, Then next time you run the robot it will give you sensor garbage.  With the reconnect button, if you see sensor garbage, you can click on the Re button to disconnect and connect again, which fixed the sensor garbage for us almost every time.

IR Communication

The IR sensor on the front of the robot can receive a single byte of information from another source, whether it be another robot, the docking station, or even a virtual wall. Furthermore, the robot can repeatedly send a single byte out of its  omnidirectional IR transmitter (below). Between the two, we have the ability for two robots to communicate with each other. This will be very important when playing Musical chairs.  The teacher robot will be transmitting an IR signal that your robot must respond to.

Line following Rules

Musical chairs Rules

For your project grade you will be playing Musical chairs by yourself.  You must be able to do the following:


Musical chairs competition

Mainly for fun on Session 20 there will be a musical chairs competition!  Yes, that's right it's a robot musical chairs competition.  Guessing you have not had one of these before. ;)  The rules are this:

If you want to size up your competition here is the tournament bracket.
Tournament Bracket


The project is worth 1000 points total.  The winner of the tournament will receive 10 bonus points, second place 5 points!  This numbers were intentionally chosen to have no real effect on your final score.  This is to encourage you to realize the tournament is just for fun. :)


Hardware

  1. Omnidirectional IR Transmitter. This is the "hat" with 8 IR LEDs that sits on the BAM (wireless receiver) module. Place it on top of your BAM and plug the red wire into +5V (there are two holes from which to choose) and the black wire into LD1, both on the back of the BAM.

Demo

Each team will have a short amount of time (~5 min) in class to demonstrate their program's interaction with another robot to the instructor and the class. You will be judged on your preparedness, your program's functionality and how well each of the team members can explain the code. (This is to encourage you all to work on the code together and to contribute to it.) Ask me ahead of time if you want to demo your program with a specific team.  The tournament will happen after the demos.

Suggestions