# MathCS - Robotics

### Challenge: Rescue Mission

This is the final mission and is, consequently, more involved. You need to work closely with your teammate to solve the challenge, and your robots will need to act as a team, too.

#### The World

Your "world" consists of a large (at least 6 by 8 feet) rectangular area. Roughly in the middle of it is a wall that extends from the "top" side to about 2/3 of the other side, leaving an opening one one side (you won't know which side is open). A thick black line (with no sharp corners) snakes from on side of the area to the other. It starts on the left side of the world at the origin of a Cartesian coordinate system, with the x-axis pointing to the right and the y-axis pointing up. One the far side of the line are one, two, or three green dots, each approximately 8cm in diameter. You will receive three sets of possible target coordinates. The number of green dots present will determine which target coordinates are the right ones. In other words, if one dot is present, the first set of target coordinates is the right one, if there are two dots it's the second set of coordinates, and so forth. All distances and coordinates are measured in cm.

At the correct target location a person in distress needs to be rescued from great peril!

The "person" is hanging in the air at about 20 cm high and can be dropped at the push of a button. A possible layout of the world is shown below. The actual path, the location of the wall, and the number of dots (and their location) are determined when the challenge starts and need to be detected by your robot(s) autonomously.

#### The Mission

1. You need to use two robots. One is positioned at the beginning of a black line at position (0,0), facing right along the positive x-axis. The second is positioned 20 cm below the first robot at position (0, -20) and facing right in the direction of the positive x-axis as well.
2. You will receive three three sets of possible target coordinates that you need to enter into the first robot.
3. The first robot can now explore the world as it wishes. It needs to discover, at a minimum, the number of the green dots (one, two, or three). The second robot waits.
4. When the first robot has counted all green dots (and probably reached the end of the line) it sends the correct target coordinates (via Bluetooth) to the second robot and moves out of the way.
5. The second robot will receive the target coordinates, turn on a siren, and start heading towards the target area,
6. As soon as the second robot starts moving, a clock starts. The second robot needs move to the proper target coordinates as fast as possible (avoiding the wall), and stop. When it stops, the "person" to be rescued will be dropped, hopefully into a specially constructed "bed" on the second robot. When the "person" is dropped, the clock is stopped.

The first robot has a 10 minute time limit. The second robot (and only the second) is timed and the fastest time wins bonus points.

#### Scoring

Scores will be given out according to time (of the second robot), distance from target, and whether the rescued person could be dropped into the rescue robot.

#### Results

After some start-up problems the results were respectable. The biggest problem was the Bluetooth communications. Most teams got the line-following-color-distinguishing robot correct, and the goal-seeking-wall-avoiding robot worked well for most, too. It was a little tricky to get the first robot to successfully send the coordinates to its teammate, but several teams got that going, too (eventually).

 Time Distance Dropped Team A 16 0 cm yes Team B 18 0 cm yes Team C 45 90 cm yes Team D - 154 cm - Team E - - -