Proceedings of 1st International Symposium for Color Science and Art 2019

Real-Time Self-Localization Using a Genetic Algorithm
Based on Color Detection
Kaori Watanabe*, Hidekazu Suzuki*
Tokyo Polytechnic Univ., 1583 Iiyama, Atsugi, Kanagawa, 243-0297, Japan
ABSTRACTWe developed a self-localization technique using anomnidirectional camera for an autonomous soccer-playing
robot. Positional information is important for the robot’s
strategic behavior and cooperation. We developed a selflocalization method, which uses white lines on the soccer
field to generate a search space model, and a fitnessfunction in a genetic algorithm (GA) to identify the robot’sposition on the pitch. We conducted an experiment toverify the accuracy of this method.
1. Introduction
RoboCup’s main research goal is to study how multirobot and multi-agent systems engage and cooperate witheach other in dynamic situations, through the game ofsoccer [1]. On the RoboCup soccer field, robots use selflocalization to estimate their own position, as well as thoseof the goals and other robots. They then use thisinformation to decide on a strategy. The robot uses imageinformation, environment information, and field information.
In this paper, we describe a real-time self-localization
method that applies a genetic algorithm (GA) for theRoboCup middle size league (MSL), which has the widest
field size (12x18 m).

Fig. 1. Mechanical layout of our robot

2. Hardware structure
We developed a robot with recent MSL technology: ahigh torque-driving module, a ball-handling module, anelectrical kicking module using a solenoid, and a USB3.0
camera system.
The omnidirectional vision system (Fig. 1) of our robot
consisted of a FLIR Flea3 camera, a Vstone varifocal lens,and a Vstone hyperboloidal mirror. An image captured bythis vision system is shown in Fig. 2(a), and the image sizeand frame rate are 512 x 512 pixels and 30 fps,
respectively.
3. Self-localization method
The robots use the white lines on the MSL field for selflocalization. We developed a self-localization method thatuses model-based matching to generate a search space
based on the white line information from the soccer pitch.
It then uses the fitness function to express the robot’s
correct position as the maximum value of the function. The
self-localization method uses a GA [2] to optimize thefitness function.

Fig. 2. Process of making search modelof the white pitch lines. Second, we obtain the white
detection image by converting the color space from RGB
to HSV and YUV, as shown in Fig. 2(b). Third, we generate
the field information by orthogonalizing the white line
information, as shown in Fig. 2(c). Finally, we determine
the search model by reducing the orthogonalized image,as shown in Fig. 2(d).

3.1 Search model
Figure 2 shows the process of making the search modelwith our method. First, the camera takes a detection image

53

Proceedings of 1st International Symposium for Color Science and Art 2019
3.2 Model-based matching
Our self-localization method uses model-basedmatching to compare geometric information from the whitelines on the MSL field and the search model to generate
the search space. Let us denote the set of pixels thatcompose the search model shown in Fig. 3, as 𝑆𝑆𝑆𝑆𝑓𝑓𝑓𝑓 . The
position 𝑟𝑟𝑟𝑟̃ = (𝑥𝑥𝑥𝑥�, 𝑦𝑦𝑦𝑦�) and orientation 𝜃𝜃𝜃𝜃� of the search model𝑇𝑇𝑇𝑇in the image are represented as 𝜑𝜑𝜑𝜑� = �𝑥𝑥𝑥𝑥�, 𝑦𝑦𝑦𝑦�, 𝜃𝜃𝜃𝜃�� . Then themovement of 𝑆𝑆𝑆𝑆𝑓𝑓𝑓𝑓 in the matching area is expressed
as 𝑆𝑆𝑆𝑆𝑓𝑓𝑓𝑓 (𝜑𝜑𝜑𝜑�) . Denoting the pixel value of the field image
corresponding to the area of the moving model as p(𝑟𝑟𝑟𝑟̃), 𝑟𝑟𝑟𝑟̃ ∈𝑆𝑆𝑆𝑆𝑓𝑓𝑓𝑓 (𝜑𝜑𝜑𝜑�), the evaluation function F(𝜑𝜑𝜑𝜑�) of the moving model isgiven as follows.
F(𝜑𝜑𝜑𝜑�) =Fig. 3. Model matching� 𝑝𝑝𝑝𝑝(𝑟𝑟𝑟𝑟̃)�)
𝑟𝑟𝑟𝑟̃ 𝜖𝜖𝜖𝜖𝑆𝑆𝑆𝑆𝑓𝑓𝑓𝑓 (𝜑𝜑𝜑𝜑The fitness function F(𝜑𝜑𝜑𝜑�) obtains the maximum value
when the position of the search model corresponds to thesame position as the robot on the MSL field. The problemof detecting the robot’s position and orientation isconverted to a search problem of 𝜑𝜑𝜑𝜑� such that F(𝜑𝜑𝜑𝜑�) ismaximized [3].
The calculation result of the whole matching area in Fig.
3 is shown in Fig. 4. The vertical axis represents the fitness
value, and the horizontal axes represent the field plane.
Here, we select only one maximum value depending on
the value of an electric compass, because two maximum
possibilities exist in the function value because of therevolution symmetry of the geometric shapes on the MSLfield.

Fig. 4. Calculation result of the fitness function

3.3 Genetic algorithm
In our self-localization method, we use a GA to find themaximum value of the fitness function F(𝜑𝜑𝜑𝜑�). GAs are atype of artificial intelligence and are parallel search-andoptimization processes that mimic natural selection andevolution. We use an elitist model to preserve the bestindividual in the population at every generation, genetic
coding by gray code, roulette selection and one-pointcrossover. The parameters of the GA process aredetermined by previous experiments.

Fig. 5. Self-localization error
RoboCup MSL soccer field. It calculates the position of therobot by using a genetic algorithm to optimize the fitness
function. We verified the effectiveness of the selflocalization method and confirmed that it is accurateenough for playing soccer.

3.4 Verification
We performed an experiment to verify the effectivenessof the proposed self-localization method. Figure 5 showsthe error between the correct position and the detected
position in the quarter area of the MSL field at an intervalof one meter. The severity of the error amount is indicatedby the brightness of the gray scale. The average error was
12.7 cm, so the self-localization method is accurateenough for playing soccer.

5. References[1] RoboCup Federation official website,
https://www.robocup.org/[2] D.E. Goldberg, “Genetic Algorithms in Search,
Optimization and Machine Learning", AddisonWesley, 1989.
[3] H. Suzuki, M. Minami, “Visual Servoing to Catch Fish
Using Global/Local GA Search", IEEE/ASME
Transactions on Mechatronics, Vol. 10, No. 3, pp.
352-357, June, 2005.

4. Conclusion
In this paper, we described a self-localization method
which generates a search space using model-basedmatching combined with white line information from the54