CSSE 120 — Introduction to Software Development, Robotics
Capstone Robotics Team Project (in Python) — Winter 2010-2011
Music Delivery Service
Project Requirements
Project Requirements
Problem statement:
You must enable your robot to deliver musical messages
from Grand Central Dispatch (GCD, a robot that we supply)
to other robots. Robot control must be via a Graphical User Interface
(GUI) on your computer that permits both remote control (via an
operator) and autonomous delivery (no human involved after telling the
robot to start).
|
Your GUI will have
functions for controlling the robot movement and
one button more important than others... the "Deliver Music"
button. The gold standard for Music Delivery is to be able to
receive any command from GCD, find the requested robot(s), and play the
song/dance combo for that robot.
GCD will be a robot programmed
by the instructors which always provides two pieces of information:
- A code for the music to play (upon delivery)
- The number of the robot to go find, for whom your robot will
play (i.e., deliver) the given music
Both pieces of information will be transferred via IR
communication.
Your robot will start directly in front of GCD
and GCD will deliver a series of numeric IR messages to your
robot. These messages will tell your robot the song code to
deliver and the robot(s) to delivery the message to. Your robot will be
able to tell that it has arrived at its destination by listening for a
special signal that the robots-to-deliver-to will be sending via IR
(details below).
The GCD's program and the recipient robots' program will be given to
you in the project that you check out from your team repository. You should not change those programs (copy them with a differnt name if you feel a need to).
There will
be a
range of difficulties for the music and a WIDE range of difficulties
for
finding the robot to deliver the song to.
Your group must choose the range of difficulty
as well as additional features (some self-selected) to implement.
See the Grading section for the
points earned by implementing the various features.
At a minimum your project must satisfy these core requirements:
- You must complete the implementation of a GUI to control your
robot.
- You must implement code to receive IR information from GCD then
respond to those IR messages.
- All team members must contribute to and understand
their project.
Details
GUI
Your graphical user interface (GUI) must at a minimum enable:
- Connecting (to the specified port number) and disconnecting from
your robot.
- Driving your robot directly at specified speeds (i.e., remote
control of the robot).
- Line following around a track stopping on a bumper hit.
- Playing a simple song of your choice when a song button is
pressed.
- Delivering music:
- Listening to GCD and displaying the message sent by GCD.
- Finding the right robot based on the message.
- Playing the music for that robot when it is found (while
sometimes spinning or doing another dance).
- Something that displays all the team members' names.
Example:
This is just a sample of what a basic GUI might
look like.
You will design your own GUI.
Ideally, it is both user-friendly and sharp-looking (but don't spend
tens of hours on its looks).
Direct movement control Rules
- You must be able to go forward, backwards, spin left, spin right,
and stop
- We also welcome being able to arc forward left or right, or
being able to do more complicated but sensible movements.
- You must also be able to change the linear or angular speed.
- It can also be nice to use keys or a joystick (or ???) to do the
direction control as an
extra.
Music Rules
- You must be able to play a simple song immediately if the Music
button is pressed
- Any song you like. Don't spend tens of hours on it.
Line following Rules
- For line following your robot should stop following the line if
the user chooses one of the remote-control movement controls.
- Your robot should also stop if a front bumper is hit
- It will be tested by putting your foot on the track in the way
of the robot
- The robot should be able to play a song while line following.
- The robot needs to be able to complete 2 laps in less than 2
minutes.
IR Communication from GCD
The IR sensor on the front of the robot can receive a single byte of
information (value 0 to 255) from another source, whether it be another
robot, the
docking station, or even a virtual wall. In order to send an IR
signal a robot needs an additional piece of hardware, in our case the
omnidirectional IR transmitter with 8 IR LEDs (ie the IR 'hat'),
details below.
The GCD robot will be sending out IR messages from its omnidirectional
IR
transmitter.
Between
the IR transmitter on GCD and the IR sensor on your robot, we have the
ability for two
robots to communicate with each other. The instructor's GCD robot
will be
transmitting an
IR signal that your robot must read then interpret.
Music Delivery Information
The format for GCD messages will be as follows.
- A message from GCD is a sequence of numbers, of arbitrary length.
- For example: 100, 50, 83, 150, 71, 200
- All numbers will be transmitted from GCD for 0.25 seconds.
- The messages will be choosen such that no message will contain
repeated numbers.
- For example, a message could NOT be 100, 50, 83, 150, 150, 200
- The first number sent to your robot will be 100.
- The final number sent to your robot will be 200.
- The number 50 indicates the start of a code that specifies the
music to deliver.
- The number 150 indicates the start of the information you need to
determine the robot to whom to deliver the music.
- Therefore, messages will have the format:
- 100, 50, numbers for the music code, 150, numbers for the robot
to deliver to code, 200
- The numbers 50, 100, 150, 200 will only be present exactly once
in each message.
- But as an optional enhancement, you may ask GCD for a more
complicated encoding that allows GCD to specify multiple songs and
robots (and entities other than robots) in a single message. See your
instructor for details if you want to try this.
- GCD will repeat the message 3 times for your robot. For the
highest score, your robot should begin its action after the first of
the three repetitions.
Music codes
There is a range of difficulty with music codes:
- 80 - Play note 69 for 1 second
- 81 - Play the song [(55, 16), (55, 16), (55,16),
(51, 64)]
- 82 - Play a Mario themed song
- 83 - Play a Mario themed song while spinning
(or doing other appropriate dance)
- 84 - Student selected song (same song as your
Play Song
button plays)
- 85 - Song provided by GCD passed in note,
duration pairs
- Example: Play the song [(67, 32), (67, 32), (65, 32), (53, 32),
(72, 64)] to Robot 71
- GCD would send 100, 50, 85, 67, 32, 67, 32, 65, 32, 53, 32, 72,
64, 150, 71, 200
Delivery codes
The playing field for this project will consist of a large loop
(similar to the line following robot loop, but larger).
Your robot will start on the line positioned directly in front of GCD
facing either left or
right, instructor will choose left vs. right.
Other robots will be placed at various places, each broadcasting
via IR its own number. For example, Robot 73 will continuously emit 73.
No two robots have the same number.
There
will be multiple stationary robots sitting just outside the loop. You
might be asked to deliver a song message to one of
these robots. There will also be
other robots in the room that are not located on the loop. Some
of those robots will be moving and some will be stationary.
Additionally as an advanced skill you can place a robot in another room
to deliver a song there.
Your robot will know where to look for
the destination robot based on the number of the robot. Here is a
list of the numbers you might receive and their locations:
- 70 - Play the song for ME! Immediately
play the song for GCD
- 71-79 - Robots with the numbers 71 to 79 will be
located on the loop in any order.
- 80 - Robot 80 will be located 6 feet away from
the direction the robot is currently pointed
- 81-85 - Robots 81 to 85 will be stationary located
in the room
- 86-89 - Robots 86 to 89 will be wandering around in
the room
- 90 - Robot 90 will be located in a
different room, exit this room, enter the hall, find robot stationary
in another room
- 91-92 - Robots 91 to 92 will be stationary located
near the front wall of the room
- 93-94 - Robots 93 to 94 will be stationary or moving (our choice) located
near a side wall of the room
- 95-96 - Robots 95 to 96 will be stationary or moving (our choice) located
outside the room, but within about 6 feet of the door
- 97-99 - Robots 97 to 99 do not yet exist and are reserved for future expansions
Additionally as an advanced skill you may be asked to delivery a music
message to multiple robots.
After you have finished playing the
music to the recipient robot(s) the task is complete; you are not
required to find your way back to GCD (although you can include that as
an enhanced feature if you wish).
Hardware
- Omnidirectional IR Transmitter. This is the
"hat" with 8 IR LEDs that sits on the BAM (wireless receiver) module.
Only the instructor robots will need to place it on top of the
BAM. However for testing you will probably want to use one from
time to time. 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.