Applying Evolutionary Optimisation to Robot Obstacle Avoidance
Total Page:16
File Type:pdf, Size:1020Kb
ISCIIA04, December 20-24, 2004, Haikou, China APPLYING EVOLUTIONARY OPTIMISATION TO ROBOT OBSTACLE AVOIDANCE Olivier Pauplin, Jean Louchet, Evelyne Lutton, Michel Parent INRIA, IMARA & COMPLEX Projects, BP 105, 78153 Le Chesnay Cedex France [email protected], [email protected], [email protected], [email protected] Abstract: This paper presents an artificial evolution- representation and evolving its components based method for stereo image analysis and its following principles inspired from Darwin's application to real-time obstacle detection and avoidance descriptions of biological evolution. for a mobile robot. It uses the Parisian approach, which consists here in splitting the representation of the robot's environment into a large number of simple primitives, 2 Evolutionary algorithms. the “flies”, which are evolved following a biologically Darwin’s theory assumes that a population of inspired scheme and give a fast, low-cost solution to the obstacle detection problem in mobile robotics. individuals, characterised by their genes, will evolve towards a better adaptation to its Keywords: evolutionary algorithm, stereovision, vision environment according to laws of natural systems for robotics, obstacle detection selection. Genes mutations may occur and 1 Introduction. maintain diversity in the population. Artificial Vision, an important element in the Population initialised at random design of autonomous robots, can be approached as the resolution of the reverse Evaluation problem of reconstructing a probable model of Offspring the scene from the images. Although probabilistic optimisation methods like Genetic Stop criterion Evolutionary Algorithms [1],[2],[3] are in operators is reached ? theory well adapted to the resolution of such no inverse problems, their use in real applications Parents Selection has been relatively neglected because of their yes reputation of low speed and complexity. Indeed, evolving a population in which each Optimal solution single individual would be a complete 3-D representation of the environment should raise Figure 1: General layout of genetic algorithms. problems of code size and memory handling Evolutionary algorithms manipulate individuals wildly out of the reach of current optimisation evaluated by a function, called fitness function, algorithms. in a way similar to biological Evolution. The However, the technique of Parisian Evolution, general diagram of such algorithms is presented introduced by Lutton et al. [4] to resolve an in figure 1, where: optimisation problem in Iterated Function - the population is a group of individuals Systems, showed that in some cases, splitting - an individual is defined by his genes X = the representation of the object to be optimised (x1, x2,…, xn), usually coordinates in the into a collection of smaller primitives and search space evolve them, then use them as a collective - evaluation is the calculation of each representation of the problem's optimal individual’s fitness value solution, may lead to fast and efficient - selection eliminates part of the population, optimisation algorithms. The Fly Algorithm keeping preferably the best individuals [5],[6] has been developed along this line to - evolution applies genetic operators solve Computer Vision problems, using a small (crossover, mutations…), leading to new grain decomposition of the scene individuals in the population. ISCIIA04, December 20-24, 2004, Haikou, China 3 The Fly algorithm. The Fly algorithm is a special case of Parisian 3-D space evolution for which individuals (the “flies”) are defined as 3-D points with coordinates (x, y, Fly1 z). As far as we know, it is the only existing evolutionary algorithm used to detect obstacles Fly2 Projections Projections by stereovision. The aim of the algorithm is to in images drive the whole population - or a significant part of it - into suitable areas of the search space, corresponding to the surfaces of visible Left image Right image objects in the scene. The population of flies is initialised at random Figure 3: Projections of two flies in left and right inside the intersection of two cameras’ field of images. view. Flies then evolve following the steps of The mathematical expression of the fitness evolutionary algorithms. All cameras’ function is [7],[8]: calibration parameters are known. ∇(M ).∇(M ) F = L R 3.1 Evaluation. + + − + + 2 ∑∑[L(xL i, yL j) R(xR i, yR j)] The fitness function used to evaluate a fly colours(i, j)∈ N compares its projections on the left and right where: images given by the cameras. If the fly is on an - (xL,yL) and (xR,yR) are the coordinates of object’s surface, the projections will have the left and right projections of the current similar neighbourhoods on both images and individual hence this fly will be attributed a high fitness. - L(xL+i , yL+j) is the grey value at the left image at pixel (xL+i , yL+j), similarly with R Figures 2 and 3 illustrate that principle. Figure for the right image 3 shows neighbourhoods of two flies on left - N is a neighbourhood around the projection and right images. On that example, Fly1, being of each fly, introduced to obtain a more on an object’s surface, will be given a better discriminating comparison of the flies fitness than Fly2. ∇ ∇ - (M L ) and (M R ) are Sobel gradient Obstacle norms on left and right projections of the fly. Obstacle That is intended to penalise flies which project onto uniform regions, i.e. less significant flies. Fly1 Fly2 3.2 Selection. z Selection is elitist and deterministic. It ranks flies according to their fitness values and retains the best individuals (around 40%). x A sharing operator [7],[8] reduces the fitness of y flies packed together and forces them to explore other areas of the search space. ht camera ht camera 3.3 Genetic operators. g Left camera camera Left Ri The following operators are applied to selected Mobile robot individuals. - Barycentric cross-over: given two parents Figure 2: Example of device using the Fly algorithm, showing two flies from the population (top view). F1 and F2, the algorithm builds their offspring F such as: ISCIIA04, December 20-24, 2004, Haikou, China → → → = λ + − λ 4 Robot simulator. OF OF1 (1 )OF2 The original way the scene is described by the with λ chosen at random in the interval [0,1]. population of flies led our team to adapt - Gaussian mutation adds a Gaussian noise to classical robot navigation methods in order to each one of the three coordinates of the use the results of the Fly algorithm as input mutated fly. The mutation rate is set to 40%, data. Boumaza [7],[9] developed a simulator of parisian algorithms normally using a higher a robot moving in a simplified environment, to mutation rate than conventional evolutionary test theoretically control methods using the algorithms. output of the Fly algorithm. - Another operator, “immigration”, is used to The simulator showed the possibility to build improve exploration of the search space, guidance methods based on the output of the creating new individuals at random. It ensures Fly algorithm. Our current work consists in a constant exploration of the search space, transferring and extending these control whose high-fitness regions evolve as the scene methods to real life situations. in front of the cameras changes. Figure 4: Application example of the Fly algorithm. driving, we developed a strategy to make the 5 Real life experiments. program quantify the probability that an Figure 4 shows an application example of the obstacle is in front of the vehicle. The aim is to Fly algorithm. Flies (black dots) concentrate deliver a slow down or stop order when an on obstacles and on regions where the grey obstacle appears close enough in the field of level gradient is high, for example on the vision, in order to avoid frontal collision. roadsides. The numerator of the fitness The general idea to achieve this goal is to see function prevents flies from getting trapped each fly as the source of a “warning value”, into uniform regions (sky, road surface, etc.). higher when: The three coordinates of each fly being known, - the fly is near the vehicle the population of flies gives a rough - the fly is in front of the vehicle (i.e. close description of the real 3-D scene. to the z axis) - the fly has a good fitness. 5.1 Control. Beforehand, flies useless for this specific In the scope of using the Fly algorithm in the application have there fitness value penalised, field of automatic driving - or at least assisted and thus have high probability to be eliminated ISCIIA04, December 20-24, 2004, Haikou, China by the algorithm’s mechanisms. We considered 2 GHz). The population of flies is 5000. One such flies are: generation takes about 10 milliseconds. - flies more than 2 metres above the road Population update and calculation of the surface warning values are done in a quasi-continuous - flies with a height under 10 centimetres way, and the system needs about 10 to 30 (detecting the ground) generations to react to a new event in the scene. - flies more than 16 metres ahead of the Figures 5 and 7 show the 250 best flies of the vehicle. resulting population. Flies appear as black An experimental analysis led us to choose the crosses. We note that, on both figures 5 and 7, simple following formula for the warning flies gather on the visible objects of the scene value of a fly: (car, pedestrian, road sides...). F Figures 6 and 8 show the same (x,y) view as warning ( fly) = x 2 × z figures 5 and 7, with only flies represented. Flies appear as spots as dark as their warning where F is the fitness value of the fly, and z value is high. and x its coordinates as shown on figure 2. We note the algorithm delivers higher warning For |x| < 0.5 m we consider x = 0.5 m, and for values in figure 8 than in figure 6, where they z < 1 m we consider z = 1 m.