Figure below shows the basic principle. Determination of position of particular players and the ball is facilitated by using of different color patches attached to the topside of the robots. There are two cameras (one per team) placed over the plaground. Cameras are connected to the team computers which are running image processing and control algorithms. Control signals are sent via wireless communication from the computer to robots. Each team has its own system (camera, computer, communication, robots, ...).
The match consists of two periods of 5 minutes each. The game is supervised by a human referee, which judges fouls and standard situations (penalty, free kick, ...). The ball is orange golf ball. It is not allowed for team members to directly control the robots during play - while a game is in progress the host computer can send any information autonomously.
The first generation of control board is based on Motorola HC11 8-bit microcontroller. Motor control task is performed by two dedicated integrated circuits LM629, which are responsible for motor feedback and processing of singnals from inremental encoders. This setup has an advantage in low computational load of the main microcontroller.
Motor controller possesses interface for connection to microcontroller, trajectory profile generator, programmable PID filter and PWM output. In this application the controller works in velocity mode, its task is to maintain pre-determined velocity. The motor controller substracts the actual position (feedback position) from the desired profile generator position. The resulting position error is processed by the digital filter to drive the motor to the desired position.
Although overall mechanical construction of the system remains almost unchanged, the control board is completely redesigned. It is based on 16-bit Motorola microcontroller (HCS12 series), which does all the control tasks. It has significantly bigger amount of built-in flash memory (256 kB), so it is possible to use C language to program it (the first generation had to be programmed in assembler)
In the present time, the third generation of the hardware is being developed.
Robot is powered from nine AAA NiMH accumulators wired in series. The radiomodule output is connected to serial asynchronous interface input, so the microcontroler can receive transmitted packet. Microcontroller then decodes desired velocity values corresponding to the given robot from the received packet, recalculates them to the desired number of encoder counts and writes these values to the DC motor controllers or directly to PWM output (2nd generation hardware). Other microcontroller task is motor controllers' initialisation after reset (velocity mode and PID filter setup - 1st generation only). The motion controller outputs two 8-bit PWM signals, a sign and magnitude. These signals are run to an H-bridge, which sets output voltage proportional to the pulse width and with polarity related to the sign of the PWM signal. The H-bridge then drives the motors. Motors are coupled to optical encoders that provide two quadrature square signals. These signals are fed back into the DC motor controller in order to close the control loop.
Each robot is controlled by the strategy module through the communication module, the feedback is realized via the computer vision module. These modules are running on the PC side. Communication module gets desired velocities for all team robots from the strategy module, creates packet from these data and sends it via standard serial RS232C port to the transmitter. Communication link between PC and robots is wireless. It can be used both infrared or radio modules, but radiomodule is more useful, since the transmitter can be next to the PC, while the infrared module must be placed over the playground.
The goal is to find the position and orientation of objects - mobile robots and a ball - moving on a playground using the color CCD camera. Different colors of robots' dresses allow to identify the particular team members.
As in the case of our robots, there are also two generations of the computer vision system.
In the first generation, a special video camera was used which possessed the color CCD chip with complementary color mosaic filters. Cyan, yellow, green and magenta (CYGM) complementary filters were used. The camera produced a black and white picture, which consisted of four types of pixels mentioned above. These four pixels can be used for the extraction of the color information. For this purpose basic ratios of primary colors are used. The six basic ratios and two double-ratios of primary colors are: C/Y, G/M, C/G, Y/M, C/M, Y/G, (C/Y)/(G/M) and (C/M)/(Y/G). The main reason for creation of these ratios is the brightness independence of color-finding algorithms because of the possibly non-steady lighting conditions on the playground. The value of each ratio is dependent on the hue of particular colors.
The process of color classification can be split into three steps. First, the primary colors CYGM are read from the input image. Then, the ratios are evaluated. Next, the color is classified by the ratios. Fast sequential classifier is used. For example, the next formula is valid for blue:
IF ((G/M)>0,87 AND (G/M)<1,00) THEN Blue.
This system was implemented in MS-DOS environment, mainly due to the fact that the drivers for used frame grabber were available only for this operating system.
The second generation of the vision system posesses RGB Sony Color Camera connected to a Matrox Millenium II frame grabber. It is run on the MS Windows platform.
Further, filtering algorithms used for extraction of desired information from the colored image are presented. First is the searching algorithm, the second may be called the "recognizer". Searching algorithm works with colored image and looks for the objects that satisfy condition of their size. Each object (the robot and the ball) has a specific color. The main condition is that the object contains at least the given amount of pixels of searched color. Once the searching algorithm has finished its work, the recognizer can start. It has to determine whether the object found is a part of a robot or a ball or it is just some interference. This process is based on a priori information about color and position derived using linear prediction.
Robot control may be divided into four layers. At the highest level the particular actions are chosen using principles based on artificial intelligence. Then, low-level algorithms are performing the path planning. Next, robot controller is attempting to follow the planned trajectory. Finally, the lowest level is represented by particular motor controllers.
For choosing of particular robot actions decision trees are used. A decision tree is an arrangement of tests that prescribes an appropriate test at every step in an analysis. Decision trees classify instances by sorting them down the tree from the root node to some leaf node, which provides the classification of the instance. Each node in the tree specifies a test of some attribute of the instance, and each branch descending from that node corresponds to one of the possible values for this attribute. This process is then repeated at the node on this branch and so on until a leaf node is reached. Attribute values are derived from positions of robots and the ball, and the distances between them. Classes correspond to particular robot actions. After the decision tree has classified the situation on the playground, the resulting action is selected, e.g., GetBall (robot approaches the ball), Defend, GetBehindBall, Dribble, Kick etc. The main advantage of the decision tree approach is the possibility of an easy extension by other classes (actions) that may be used for the design of more sophisticated control strategies.
Path planning is performed by means of the vector fields. In this method the robot - represented by a point - behaves like a particle moving under the influence of an artificial potential produced by the goal and the obstacles. The goal configuration generates an attractive potential pulling the robot towards the goal, and the obstacles produce a repulsive potential which pushes the robot away from them. The negated gradient of the total potential is treated as an artificial force applied to the robot. When kicking the ball in the given direction, it is necessary to approach the ball in this direction. To guarantee this, the shape of the potential field is accommodated appropriately.
The vector field determines the desired direction of motion of the robot. Since the robot is equipped with two differential-driven wheels, its motion is subject to non-holonomic constraints, i.e., the robot cannot move sidewise. This fact must be considered in the robot motion control law. While the above mentioned control algorithms are running on the PC, the lowest level is realized directly in the robots.