Cornell News Service

How soccer-playing robots work

robot opened up
The innards of a soccer robot Cornell News Service photo Copyright © Cornell University
As soccer-playing robots dart around the playing field it's easy to think you're just watching a sort of three-dimensional video game: Somewhere, you think, there are operators frantically wiggling joysticks to cause all this activity.

Not so. Robot soccer is one of the most impressive real-world applications so far for what computer scientists call artificial intelligence (AI) in which computers are programmed to make decisions on their own. Once a robot soccer game starts, all the action is directed by computers, without human intervention.

The Cornell University team, Big Red, actually uses two computers, both two-processor Pentium machines running at 800 Mhz. One is dedicated to image processing, and the other handles strategy and control.

Image processing is complex. Science fiction movies often give the impression that just hooking up a video camera to a computer lets the camera "see." But all a video camera does is send a string of electrical impulses representing the lightness or darkness of each pixel in the image. The computer has to be programmed to analyze that data.

For a robot soccer game, cameras are mounted directly above the playing field, sending signals to the computers of both teams. For speed, the image-processing computer reduces the camera's video signal from the standard 640x480 pixels to 480x240 pixels. Rules of the game make the image elements fairly simple. There are only five colors: The playing field is green; the ball is an orange golf ball; each robot is identified by a removable, blue or yellow ping-pong ball mounted top center, with the color for each team chosen by a coin flip. Designers can add markers of some other color on the tops of their robots to help the computer see which way the robot is facing. Cornell uses purple squares on the corners.

The vision-processing system uses a method known as "blob analysis." It simply scans each frame it receives once for each of the five colors, returning the coordinates of each "blob" of that color it sees. It then performs some additional processing over a sequence of several frames to determine the speed and direction of motion of each blob. The results are passed to the strategy computer, which then knows where the ball and all the robots are, and how they are moving.

computer image of the field
How the playing field looks to the computer. The video image is actually separated into several images, one for each color. This one shows only the markers on two robots Courtesy Raffaello D'Andrea
This second computer operates on two levels. At the beginning it determines strategy: Based on the present condition of the field it decides which robots should play offense and which defense, where and how each one should move, and when and whether to pass the ball or try for a goal. The program that does this is what computer scientists call an "expert system"essentially a long, complex list of "if this is true, do that" choices. The rules are defined by the student programmers, drawing on their own sports experience.

The strategy decisions are passed to a lower level of the program that controls the movements of the robots. This programming is largely mathematical, involving equations that describe the trajectories of moving objects. If the ball is there, moving at that speed in that direction, and the robot is here, moving at this speed in this direction, how must the robot move in order to place itself in position to intercept and kick the ball?

Finally these instructions are translated into commands for the electric motor in the robot to apply a certain amount of torque and for the steering mechanism to turn in a certain direction. Commands are sent to all five robots in rapid succession. The robots, in turn, contain their own feedback control systems to fine-tune the execution, correcting for such problems as minor variations in the playing surface.

Most teams, including Cornell's winning 1999 World Cup team, transmit signals to the robots by radio. This year Cornell has switched to an infrared system said to be up to 50 times faster.

The robots Cornell took to Melbourne in 2000 included a "kicker" consisting of a flat bar across the front of the robot that can be flicked forward by a solenoid, and a "dribbler," a roller that spins downward, causing the ball to roll toward the robot and stay with it as it moves.

All this must take into account the fact that it takes a small but significant amount of time--about 70 to 80 thousandths of a second--to process the visual image, calculate strategy and send out commands to the robots. With robots moving at a little over three feet a second, that's time for a robot to move a fraction of an inch. A kicked ball could travel much farther in that time. The computer doesn't have time to find the "optimum" strategy, says Raffaello D'Andrea, Cornell assistant professor of mechanical and aerospace engineering, who advises Cornell's Robocup team. In order to get a solution soon enough for it to be useful, he says, the system settles for about 40 percent of optimum.

So far, that's been enough.

There are detailed specifications for soccer robots on the official Robocup web site at http://parrotfish.coral.cs.cmu.edu/robocup-small/rules/

|Back to Robocup page | | Cornell News Service front page |