CSSE 120R Final Python Robotics Project—Fall 2008-2009
Disclaimer: Some details may
still be vague and subject to change; we'll alert you when they do.
Project Requirements
The final project for the Python part of this course is to implement
a GUI for robot control that includes new behaviors.
Your project must satisfy these core requirements:
-
You must design a GUI to control your robot.
- You must implement a findIRSignal() function.
- All team members must
contribute to
and
understand
their project.
Most of the work on your project will be translating the rules
provided into a working design and 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
before
the specified class session unless specified otherwise. For each milestone,
you must commit your work to your repository and include a clear
commit message stating that that milestone is completed.
-
Session 17 (mid session) -- Checkout the
project. The name of the repository is
http://svn.cs.rose-hulman.edu/repos/csse120-200910-team
4X
where
X
is your team number as announced by your instructor.
Check out the RobotGUI project, and find the module
robotGUI.py
within it. Each team member should independently
add his or her name to the comments at the top of the file. This
involves each of you editing the file, so it requires careful use of SVN. (Best: the first team member should should update,
edit, then commit, then the second member repeats this cycle, then the third. Everyone should then update.Follow this cycle of update-edit-commit whenever you make changes to your program.
There is a new version (v 1.2) of create.py there. You
may want to copy it to site-packages, but it will work running
it in the RobotGUI folder as well. Starting the program now
gives its version number.
-
Session 18 — Design Sketch: A
neatly drawn structure diagram showing how you chose to broke up
your program into functions, or a UML class diagram showing the user-defined classes
for your program including instance variables and methods. This
does not have to be (and likely won't be) your final design,
just your initial plan. The diagram can be hand-drawn or you may
use a program to draw it. Regardless of the way you choose to draw the diagram,
you must turn in a single plain white 8½ × 11 inch sheet of paper showing your final design.
This format is non-negotiable as we will be photo-copying your design.
-
Session 18 — Basic GUI. At this stage, you must allow the user at least
to connect to a port and disconnect. By mid-session, you must also allow them to drive the robot directly (forward,
reverse, spin left, spin right, stop).
-
Session 19 — IR Signal Detection.
Your robot must be able to broadcast its own signal and detect an IR signal.
This is the first step in going after it. Hopefully, you'll have started work on
having your robot find the source as well.
- Session 20 — Program Finished, including any enhancements (below).
You will be part of a demo and competition in class.
- Session 21 — Team Evaluation of Your Partners.
This can be found in Angel under Lessons.
Grading
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 project program will be graded based on both the proper functioning of your program and an evaluation of your design,
coding style, and documentation (including SVN commit messages). The grade will also depend heavily on what enhancements you add (see below).
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.
Here is the rubric we will use to
grade your program.
Details
GUI
Your GUI must support as a minimum:
- Connecting (to the specified port number) and disconnecting from your robot.
- Causing your robot to broadcast its IR signal while it does other things.
Hint: just insert the command
robot.startIR(num)
in the appropriate place. For num, you must use the number on the end of your robot's name tag.
- Driving your robot directly
- Autonomously looking for and bumping the source of an IR signal, stopping when it does.
- Smart Wandering (so as to be a target for other robots looking for you)
Other than the IR signal broadcast, it does not need to support multiple GUI functionalities at once. That is, if it is wandering, you do not need to allow the GUI to "interrupt" it to drive direct.
(That would require multi-threading, which we have not studied.) Thus, it will need to finish one operation
before starting another.
Example:
findIRSignal()
The
robot should drive around (perhaps random wandering), while avoiding
obstacles, until it receives an IR signal less than 255. A signal
between 240 and 254 will indicate a dock is within 3 feet, while one between 1 and 20
will indicate that another robot is within 3
feet. The robot should then move toward the signal until a
bumper is triggered and then stop.
- Easy case: The other signal is stationary, like a dock or motionless robot.
- Tougher case: The other signal is coming from a wandering robot. It will be necessary to continue to pan for the signal if it is lost.
Hint: to detect IR signals, look at the list of sensors in the pycreate documentation for one that looks promising! It's exactly what you need. You use it like you do the other sensors.
Hardware
- Infrared shield. This looks like a black plastic letter "C".
Place it on your robot's IR receiver to block out IR signals coming from all directions except one.
- Omnidirectional IR Transmitter.
Place it on top of your BAM (wireless receiver) module and plug the
red wire into +5V 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,
especially your enhancements to the instructor.
You will be judged on 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.)
Competition
Your robot will compete against another team's robot to be first to "tag" a third (the
instructor's) wandering robot using autonomous IR sensing. Rules: ill place both teams' robots each 6 feet from the
instructor robot, in a random orientation.
- You will have 1 minute to try to detect and bump the instructor's robot, which will be wandering
and broadcasting the value 44. Once you bump it, you must stop.
- If no one bumps the instructor's robot within 1 minute, the robot that is closest to the teacher robot
then time is called will be the winner.
- This round will repeated a total of 3 times, and the winner of the best of 3 will advance to the next
heat against another competitor.
- If the number of teams in the class is not a power of 2, those team(s)
judged by the instructor(s) to have the best enhancements will receive a
"bye" in round 1 of the competition.
- You may not influence your robot (for example, switching to direct
drive) in the middle of the round.
- You may not communicate your initial orientation to the robot.
- You may assume that we will not place any additional obstacles in the
competition area, but of course, you might bump another robot.
- You are responsible for making sure your robot is charged.
Suggestions
Plan first! Use top-down design and/or object-oriented design. Get help early if you need it!
Functions are your friends. Well-written ones will make your life so much easier! Take
spinWhileListeningForIR()
as an example!
Enhancements
Once you are done with the basic version, you will be required to add some
enhancements. You will earn a higher grade for doing more challenging ones, and the more, the better.
Here are some suggestions, to get you thinking.
-
Add other interesting robot behaviors. See these 3 for examples: following a wall,
docking on the home base, or covering a floor.
(These are the most challenging, so worth the most points)
- Add the ability to run other programs you have written (e.g.,
playWarningSong, figureEight) as options in a the GUI. (Fewer points
here, since most of the work is done)
- Make your GUI particularly user-friendly
- Be creative: what's cool and challenges you?
(Could be worth lots depending on difficulty)