Recent Changes - Search:

TEAMS Academy Wiki

THS

Explore TEAMS!
for visiting sophomores & juniors


Robotics


EnvBioTech

Bat Design

Assistive Tech

Students

Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Robots.SideBar

Blind Robot Brigade -- Competition

Tasks

  1. Motion and Location
  2. Capture
  3. Determine Ball Color
  4. Delivery

Motion and Location

In order to create semi-random motion for the robot, the following code was utilized:

radius = (abs(radius) < MAXRAD) ? radius + (random() % RADFACT) : -radius + RADFACT;
cr8_drive(SPEED, radius);

With the initial radius set to zero, this code will give the robot an increasingly positive radius, adding a random number between 0 and RADFACT (12 in this case) until it reaches MAXRAD (800 in this case). It will then shift it over to a large negative radius, which will begin to decrease by a random amount each time until it reaches zero, at which point the cycle will begin again.

To detect balls that are further away, the robot uses a long range (8-80 cm) distance sensor with linearized values. The robot compares the value of the sensor to its value in the last cycle, looking for any sudden changes (5 cm or more in one cycle). An example can be seen in the image to the right. If a ball is found using this method, the robot will head straight forward until it either sees a ball with its close range sensor or three seconds elapses. The three second limit is added to ensure the robot doesn't accidentally follow a ghost reading.


Capture

To determine if the robot has captured a ball, the robot uses the short range (3-40 cm) distance sensor. The raw values are used, which give the robot a greater sensitivity at shorter distances. If a value greater than 300 is detected, the robot activates the servo motor to drop the arm and hopefully capture the ball. After dropping the arm, the robot rotates to hopefully push any unwilling balls into the arm's center section. The robot then uses the long range distance sensor to determine if a ball is actually in the cage -- a raw reading of 180 or more indicates that the ball is in the cage.

Determine Ball Color

After capturing a ball, the next step is to determine if the ball is the correct color. it is possible to determine the color of the ball using a photo-resistor. The blue and yellow balls have different readings from the sensor. A function is used that reads the status of a digital switch in order to determine which color we want to keep, and which we throw away. If that function determines that the ball is the opponent's, the robot turns 90 degrees and pushes it away. If it is our team's ball, we try to deliver it to the goal.

Delivery

To deliver the ball to the goal, the code first calls the findlight() function that searches for the highest light value. The function orients the robot in that direction. It repeats this orientation process every two seconds. The robot then travels forward until it hits a wall. It then backs up, raises the servo, and shoots forward at high speed in order to push the ball into the goal.


Back

Edit - History - Print - Recent Changes - Search
Page last modified on January 23, 2008, at 10:04 PM