Adaptive GridMap Building Algorithm for Mobile Robot Based on Multiway Tree

In order to solve the problem that uniform grid map occupies large storage space in the process of large-scale map creation, a new adaptive grid map building algorithm based on multiway tree is proposed. The environment map is divided into nine grids. The algorithm determines whether the grid is completely occupied, partially occupied or vacant. Then the part occupied gridsare further subdivided into smaller grids. The algorithm continues to determine whether the smaller grid is completely occupied, partially occupied or vacant.Repeat the above segmentation process until the entire map search is completed and the accuracy requirements are met. Finally, the scale of grid map does not depend on human experience but presenting adaptive characteristics. The algorithm is compared with the uniform grid method.The simulation results show that the algorithm has convergence.Andcompared with the uniform scale raster map, itgreatly saves the storage space.


Introduction
Three key issues of mobile robot navigation are positioning, map building and path planning [1].The autonomous map building in the field of robotics research is a fundamental and important problem, which is the precondition to achieve autonomous navigation.
At present, the most widely used methods of map creation are geometric feature method, topological method and grid method.
A geometric feature map is represented by related geometric features (points, lines, planes).This method can find the shortest path, but the disadvantage is that the more obstacles.The longer the search time, especially for the search of circular obstacles may be invalid.In 2011, Zhu Jianguo et al. [2] extracted linear features from lidar data to describe the environment.The established environmental feature maps were accurate and effective, and the data were small compared with raster maps.In 2013, GuoYupeng [3] used lidar data to extract the geometric features of the environment for the semantic classification of indoor environment.
Topological map is a topological structure graph showing indoor environment as node and related connection line.The composition is fast and simple, but it is difficult to create large scale maps, and has no discrimination ability for similar or symmetrical scenes.In 1994, Gaussier P, ZrehenS [4] and other online learning topological graph were used to realize obstacle avoidance of mobile robot.In 2012, W Yan and others [5] built Growing Neural Gas (GNG) indoor environment cognitive map, and the robot's position was obtained through the global image machine on the ceiling.Wang Dongshu et al. [6] constructed a model of nodes with growing neural gas network as a topological node, which makes the robot easy to understand the environment.In 2013, RuanXiaogang et al. [7] proposed a dynamically increasing and decreasing self-organizing feature map (DGPSOM) algorithm, which uses a small number of neurons to represent a large amount of environmental information.In 2017, Alitappeh, RJ, et al. [8] proposed an efficient distributed deployment strategy, which can optimize the allocation of robot teams in the environment of topological graph representation.
Grid method is suitable for a variety of complex environments, and it is better than geometric feature method and topology method in modeling, updating and processing.Therefore, the method is favored by scholars and researchers in recent years.Grid map was first proposed by Elfes and Moraves [9] in 1985.The idea is to divide the whole work environment into homogeneous grids, and point out the possibility of obstacles in each grid.In 1990s, Konolige [10] and Thrun [11] established and optimized the grid map method, and applied it to the problems such as Simultaneous Localization and Mapping (SLAM).The geometric topological graph and the grid topological graph are established respectively for the sacred [12] and the ThrunS [13].In 2010, Li Tiancheng [14] and so on based on fan grid map path planning for robots, increase the diversity of grid morphology.GuoLijin [15] and Duan Yong [16] section proposed the creation algorithm of adaptive grid map of variable precision, instead of the traditional uniform scale map with variable precision raster map.That saves the storage space.Although the grid method in robot environment cognition and map building showed many advantages, in the construction of large scale environment map.It still exists some shortcomings with the map to expand the scope and improves the grid resolution.The algorithm will consume huge storage space with great computational complexity.
Therefore, in order to solve the problem of occupying large amount of memory space in the process of large scale map creation, a new adaptive raster map building algorithm based on multiway tree is proposed.

Related works 2.1 Method for creating uniform raster map
The grid map usually refers to the traditional uniform scale raster map.The method first divides the external environment into many small units called grids.Then uses probability values to represent the possibility that each grid is occupied.A uniform scale raster map divides the whole environment into a homogeneous unit gridand each grid giving a value of 0-1 intervals to represent the state of the grid.0 means completely empty, and 1 means full occupancy.In this way, the whole environment space can be divided into occupied space and vacant space.
An environment map represented by a grid.The resolution of the environment space is related to the size of the grid.The traditional grid scale is determined by human experience.When the environment changes, you need to redetermine the scale by human experience.Increasing resolution means increasing computing time and computer memory consumption.With the expanding of human detection environment and unstructured environment, adding high dimensional entity, these not only lead to environmental information problem caused the massive increase of information storage, but fusion of massive data become more application of grid method for obstacle.

Grid method based on quadtree
Document [9] adopts the principle of four fork tree to construct adaptive raster map, which belongs to a kind of variable precision raster map.The quadtree of each tree is divided into 4 sub nodes.Each node also has three states, according to the different state of continued segmentation.The composition will not stop until the entire map exists only completely occupied and vacant two states.The composition method optimizes the traditional method to a certain extent and saves the storage space, but the realtime composition of the composition needs to be improved.
In this paper, the existing grid method is improved from two aspects of saving data storage space and improving the real-time composition.

Adaptive raster map creation algorithm 3.1 The basic principle of multiway tree
The basic idea of adaptive raster map building algorithm stems from multiway tree.Different from the general multiway tree, this tree must follow two basic principles.
(1)The gray node is uncertain state nodes.Each graynode should continue to be divided into nine sub nodes.
(2)Black and white nodes determine the statement ofthenodes.Black represents to be completely occupied and white say vacant.They are leaf nodes, indivisible.The structure of the multiway tree is shown in Figure 1.

Adaptive raster map creation process
According to the principle of the multiway tree, an adaptive raster mapis created, which called variable precision raster map.The segmentation process of the raster map is shown in Figure 2.
(1) The robot roughly circles around the whole environment, and divides the whole unknown environment into nine square structures.
(2) Firstly, judge the nine sub grid state grid which is empty or occupied and which is in an unknown state.Secondly, the unknown grid environment for detailed exploration are further subdivided into small squares structure.
(3) Update the map.(4) Repeat steps ( 2) and (3) until the entire map search is completed and the accuracy requirements are met.Then the composition is completed.

Adaptive raster map representation
The father grid is in an unknown state grid segmentation, nine sub grid in the position number of the layer as shown in Figure 2. The N subdivision is obtained after the grid serial number is n X X X X ... (n bits).i X , which according to the position of grid at the i layer, selecting from 0,1,2,3,4,5,6,7 and 8.For grids that continue to be down, taking the left to right order to add the location number of the sub grid to the back of the parent grid.If the grid number after three times splits is 152, a subdivision is continued.The nine sub grid is numbered1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528.The location of the grid in the map can be obtained by grid numbers.
The scale of the environment map is b a  .The grid is numbered n X X X X ... , and the central coordinate of the grid is (x, y).Then (x, y) can be expressed by the following formula. .

3.4Probability for occupying grids
, namely grid undetected.When the robot moves to steps, the sensor sees an obstacle in front of it and the sensor reads As is shown in Figure 3. based sensor angle and distance are used to calculate the probability of obstacles in grid i.The algorithm is as follows.
Among them, i d is the distance between the robot and the center of the grid i. i  is the angle between the x axis of the robot coordinate system and the center of the grid i.Assuming that the two events of ) (s d and ) (s  are independent of each other, the probability of obstacles in the grid i can be obtained according to the robot's current pose and sensor readings.
Also as we have Therefore, the formula (4) is used  The traditional uniform grid method and the adaptive grid algorithm based on the multiway tree simulation results data statistics are shown in Table 1.   1 simulation results show that the adaptive grid map construction process consumes more time than traditional uniform scale map.But the storage space is saved by more than 10 times, reaching the purpose of designing the algorithm.

Conclusion and prospect
An adaptive grid map building algorithm for mobile robots based on multiway tree is proposed in this paper.Grid partition based on the idea of multiple tree.Each time, dividing the grids into full occupied, partially occupied or vacant according to the state of them.And then gradually in-depth subdivision until the entire map is completely in two states about occupied and vacant.The algorithm solves the problem that the traditional uniform scale raster map occupies massive storage space in the process of large-scale map creation and avoids the data explosion caused by the expansion of search range.This paper compares the adaptive raster map creation algorithm with the uniform scale raster map creation algorithm.Simulation results show that the algorithm not only has the convergence, but also saves the storage space greatly.
The adaptive grid map creation algorithm based on multiway tree is applied to the large scale environment with uneven distribution of obstacles, which can obtain obvious advantages.But for distributed small scale environment, the advantage of the algorithm is not outstanding.Because most of the grids are constantly segmented in a uniform environment.And this process will consume more time, and save less storage space.How to reduce the time consumption and reduce the waste of storage space is a subject worthy of further study.

Figure 3 .
Figure 3.Laser sensor ranging principle.Estimate which grids are covered according to the position and pose of the robot ) ( z s X .Calculate the probability value of the covered grid and update it.The return value ) (s d and return value ) (s  based sensor angle and distance are used to calculate the probability of obstacles in grid i.The algorithm is as follows.

Figure 5 (
Figure 5 (a), (b) and Table1simulation results show that the adaptive grid map construction process consumes more time than traditional uniform scale map.But the storage space is saved by more than 10 times, reaching the purpose of designing the algorithm.

Table 1 .
Data statistics of simulation results.