Mobile Robot Path Planning Using Ant Colony Algorithm and Improved Potential Field Method
For the problem of mobile robot’s path planning under the known environment, a path planning method of mixed artificial potential field (APF) and ant colony optimization (ACO) based on grid map is proposed. First, based on the grid model, APF is improved in three ways: the attraction field, the direction of resultant force, and jumping out the infinite loop. Then, the hybrid strategy combined global updating with local updating is developed to design updating method of the ACO pheromone. The process of optimization of ACO is divided into two phases. In the prophase, the direction of the resultant force obtained by the improved APF is used as the inspired factors, which leads ant colony to move in a directional manner. In the anaphase, the inspired factors are canceled, and ant colony transition is completely based on pheromone updating, which can overcome the inertia of the ant colony and force them to explore a new and better path. Finally, some simulation experiments and mobile robot environment experiments are done. The experiment results verify that the method has stronger stability and environmental adaptability.
Nowadays, one of the prime concerns of mobile robot is path planning. A path planning optimization method is proposed to calculate the shortest collision free path from source to destination by avoiding static as well as dynamic obstacles. Therefore, it is necessary to select an appropriate optimization technique for optimization of paths [1, 2]. Concerning this problem, scholars proposed a lot of path planning methods, including APF , grid method , and ACO  and some intelligent methods, like fuzzy logic , neural network , genetic algorithm , artificial bee colony (ABC) , and particle swarm optimization (PSO) . Among these methods, grid method can find an optimal path, but its efficiency is affected by environment and grid density. Neural network is good at learning, but its net structure is large, and its neuron thresholds change with time under the condition of multiobstacle and dynamic environment. Genetic algorithm has a good global search capability, but its search space is large, and its model is needed to reestablish with environment changing. ABC has the advantages of simple calculation, few parameters, and easy implementation. But, ABC also has some disadvantages such as a slow convergence. In addition, ABC is first applied to solve the problems of function optimization, while the path planning of mobile robot is a combinatorial optimization problem. Therefore, there are some difficulties in algorithm construction. PSO has a rather fast speed of approaching the optimal solution, which is an advantage to solve optimization problems of continuous systems. But, PSO also has some deficiencies, including the premature convergence and poor local optimization capability.
APF is a popular approach for solving path planning problems because of its simplicity, fast execution time, and applicability to mobile robot, unmanned aerial vehicles. Li et al.  proposed an innovative yaw angle-based APF function to achieve the desired road trajectory within certain road boundary and minimize the yaw angle change rate of the autonomous electric vehicle. Rasekhipour et al.  developed a path planning controller based on APF for Autonomous Road Vehicles which was able to consider any PF for obstacles and road structures while calculating the optimal path. Malone et al.  utilized the APF framework for runtime planning and leveraged a method of stochastic reachable sets to generate accurate potential fields for moving obstacles. APF easily traps into a local optimum, which leads the robot to be into a deadlock because of its zero resultant force. Many improved algorithms are developed to fix these defects of APF. Sun et al.  proposed an improvement based on a distance factor and jump strategy to solve the various situations of the target unreachable problem of the traditional APF. Liu et al.  introduced a critical value based on the distance between the robot and the obstacle to modify the repulsion direction for avoiding the local minimum point. Some scholars attempt to combine the intelligent algorithm with APF to eliminate the defects of APF. Pan et al.  used the fuzzy controller to improve APF method and safeguarded the reliability of the path planning and path smoothness.
ACO is an intelligence-optimized algorithm that simulates the heuristic mechanism of the shortest route based on pheromone in the process of ants foraging for food . ACO has been used in mobile robot’s path planning. Akbarimajd and Hassanzadeh  presented a path planning method for mobile robots based on two-dimensional cellular automata, which can be applied for environments with both concave and convex obstacles and be appropriate for multirobot problems as well as dynamic environments. Montiel-Ross et al.  developed the navigation software called Ant Colony Test Center. This software based on ant colonies is able to achieve path generation, path planning, and virtual path tracking at once. You et al.  designed a new dynamic search model for path planning problem of mobile robot, which increases the diversity of the ant population by using a bigger parameter in the prophase and accelerated convergence by using a smaller parameter to adjust the attenuation model in the anaphase. However, ACO has some problems such as the premature convergence and ant colony lost. For the inherent shortcomings of ACO, there are many improved methods that can be classified into improvements based on single classical ACO and improvements based on mixed algorithms combined ACO and other intelligent algorithm. Liu and Hu  proposed the multigranularity pattern ant colony algorithm, in which ants had different window sizes to enhance the diversity of the ants. The proposed algorithm was used for UAV path planning problem. Wang et al.  applied genetic algorithm to optimization and configuration parameters of the basic ant colony algorithm. Hsu and Juang  proposed a multiobjective, rule-coded, advanced, continuous-ant-colony optimization algorithm that was applied to design the fuzzy controller of wall-following control for a mobile robot.
Of course, ACO has more applications than just robot path planning, and there are other metaheuristic methods that can be used for reference or application in robot path planning. Chu and Tsai  proposed a new optimization algorithm of cat swarm optimization (CSO), and CSO is generated by observing the behavior of cats and composed of seeking mode and tracking mode by simulating the behavior of cats. The proposed CSO somehow belongs the swarm intelligence, which may give much better performance than PSO with a weighting factor. The studies deserve sustained attention. For numerical optimization problems, Tsai et al.  proposed an enhanced ABC optimization algorithm, in which the onlooker bee is designed to move straightly to the picked coordinate indicated by the employed bee and evaluates the fitness values near it in the original ABC, and the concept of universal gravitation is introduced into the consideration of the affection between employed bees and the onlooker bees. Aiming at the weaknesses of computational swarm intelligence such as particle swarm optimization (PSO), Ever  utilized simplified swarm optimization (SSO) to enhance the path planning of mobile robot in working environment with irregular obstacles, which driven from an inspiration of communal behavior of birds flocking and fish schooling.
APF is a typical online algorithm for robot path planning and has a simple and beautiful mathematical description. So, APF is still very attractive in robot path planning, although it has some inherent limitations and no learning ability. ACO uses all paths of the entire ant colony to describe the solution space of an optimization problem, and obtains the best path through positive feedback based on pheromone. The idea of ACO directly maps the mobile robot’s path optimization problem, which is easy to understand and has very intuitive results. Based on the above reasons, this paper combines APF and ACO to research the problem of mobile robot’s path planning under the condition of known robot’s motion environment described by grid map and proposes a path planning algorithm of ACO mixed with an improved APF. The proposed algorithm can provide an initial path obtained by an improved APF to be the inspired factors of ACO for avoiding its premature convergence and local optimum.
This paper is organized in the following manner: Section 2 presents the basic approach of building a grid map of robot’s environment and describes the problem of robot path planning based on the grid map. Section 3 proposes some improved methods about APF after analyzing the existing defects of APF applied to the grid map. Section 4 develops some improved methods about transition algorithm of ant colony. Section 5 demonstrates results of the proposed mixed path planning method by computer simulation experiments and mobile robot’s motion experiments in real environments. Finally, the contributions of this paper are summarized in Section 6.
2. Rasterizing Environment Map and Problem Description
The work space of robot is set to a limited area on a two-dimensional plane. The coordinates of obstacles edge points can be determined by processing the original environment map. If we expand the size of the obstacles to a safe distance (usually taken as mobile robot’s radius) and add the size of the mobile robot to the obstacles, the robot can be seen as a scale-free particle, and the grid granularity can be calculated aswhere represents the grid size; , , and are the weighing coefficients; is the map size; and and is mobile robot’s size and safe distance.
In this paper, the size of the environment map is (pixel unit), and then the robot environment can be divided into ( means integer arithmetic) grid units.
Grids are numbered from left to right and from top to bottom. Meanwhile, grids are assigned respectively to distinguish whether the grid is an obstacle space or a free space. The values of grid units are decided by the state value of these pixels. The grid is an obstacle grid if the amount of pixel with value 0 exceeds 1 in the area of the grid and defined as 0 or 1. Eventually, the typical grid model is obtained as shown in Figure 1.
The problem of mobile robot path planning can be described to find an obstacle-free shortest path from the starting grid to the target gird. In Figure 1 calculated by equation (1), the mobile robot considered as a scale-free particle adopts the movement form of linear octree and reaches the neighbor grids along the top, right, bottom, left, upper right, lower right, lower left, and upper left eight directions.
3. Improved APF
3.1. Definition of APF
Attractive field is the effect of the target point on the robot, and it can guide the robot to move to the target point. Attractive field is radial distribution about the target point and the direction of attraction points to the target point. The traditional attractive potential function is defined aswhere is a constant, represents the robot’s current position coordinates, represents the target point coordinates, and is a set constant.
The repulsion field is the effect of the obstacle on the robot, which prevents the robot from entering the obstacle area. When the distance between the robot and the obstacle is greater than the dangerous distance, the repulsion field is zero, and the robot is moved by the attraction to the target point. When the distance between the robot and the obstacle is less than the safety distance, the repulsion field increases rapidly, and its direction is away from the obstacle. The traditional repulsion field function is defined aswhere is a constant, represents the obstacle coordinates, represents dangerous distance, and is a set constant.
is usually double of the robot’s diameter . In the grid map, the value of is set by the number of grids. For example, if the robot diameter is 250 mm and the grid value is 375 mm, then is taken to two grids. Suppose the coordinates of the target grid is , the danger zone can be calculated aswhere are the coordinates of those grids within the hazard distance.
The total potential field is defined as
According to the distribution of attractive field and repulsive field, the magnitude and direction of the force effecting on the robot in each grid can be calculated. When the robot is located in the grid far away from the obstacle, it is only subjected to the attraction pointing to the target. When the distance is closer to the obstacle, the repulsive field increases rapidly, and the robot is subjected the resultant force of attraction and repulsive force, which changes the robot’s movement direction.
3.2. Improvement about APF
It is easily fallen into a local minimum when using the traditional APF for path planning in the case of the two kinds of gird traps shown in Figure 2. In Figure 2(a), attraction and repulsive force are all along the horizontal direction, and the repulsive force is greater than the gravitational force. So, the resultant force is opposite to the target, and the robot will fall into a dead-end cycle of transverse reciprocating motion. In Figure 2(b), the robot is subjected the attraction force in the upper right of 45° and the repulsive force in the lower right of 45°, and the repulsion is greater than the attraction. Therefore, the robot will move away from the obstacle and the target point.
For these defects, the traditional APF is improved by employing the global environment information of the grid map as follows.
3.2.1. Improving the Attractive Function
For the grid rap shown in Figure 2, the attractive field distribution opposite to that of the conventional potential field is used, which is described aswhere is the threshold of the attractive distance.
is generally taken to 1/10 of the grid map length and width. If the value of is 3 and the coordinates of the target grid is , then attractive area iswhere are the coordinates of those grids within the attractive distance.
3.2.2. Improving the Resultant Force of APF
There are only eight cases of the robot’s transfer directions in the grid map; that is, the resultant force has eight standard directions. The direction of vertically upward is set to 0° and clockwise is the positive direction. The angular distribution of eight standard directions in the grid map is shown in Figure 3.
The angle difference between the resultant force direction and the eight standard directions is calculated respectively. The standard direction with the smallest absolute value of the angle difference is the direction of the resultant force. If the minimum absolute value of the angle difference has two or more standard directions, then the smaller standard direction is adopted as the resultant force direction.
3.2.3. Additional Force
When the direction of the robot’s resultant force is opposite to the direction of the robot’s attraction, the robot will fall into an endless loop. At this moment, the robot will be forced out of the endless loop by adding an additional force perpendicular to the resultant force. The force analysis of adding an additional force is shown as Figure 4. In Figure 4, is the original resultant force, is the added additional force, is the new resultant force, and is the angle between the new resultant force and the original resultant force. To ensure forces the robot to move out of the loop, there must be . So it should be .
4. Transition Algorithm of Ant Colony
The improved ACO optimization is divided into two phases. In the prophase, the direction of the resultant force calculated by the improved APF is used to be as inspired factor of ACO. In the anaphase, inspired factor is canceled, and ant colony transition is completely based on pheromone updating.
The paper uses the cellular ant algorithm to plan robot’s path, which imitates ants’ movement through the moving and iterating of cellular. The transition algorithm of ant colony is designed by pseudorandom proportion rule. The rule uses prior knowledge about the problem and carries out a search with tendentiousness, which forces some ants to choose these grids of nonmaximally probability for searching the other path except the optimal path.
4.1. Transition Probability Function
The transition probability function of ant colony cellular automata is given aswhere is comprehensive probability, is the visibility of arc decided by inspiring factor, is the track strength of edge arc which means the number of pheromone on the trajectory, is the relative importance of the trajectory, is the relative importance of the visibility, is the neighbor cells set of the cellular automata , and .
represents the visibility between the target location of next step and the current cellular automata. The higher the visibility is, the greater the preference probability is, and the greater is. In the initial of operation, the value of visibility can be formulized aswhere the vector is determined by the cellular automata and its neighbor cells. is the resultant force of the artificial potential field acting upon . is the maximum visibility defined in advance. The visibility of the neighbor cells to is determined by the angle between and . The smaller the angle is, the higher the visibility is.
To reflect the visibility of neighbor cells in different directions and simplify the algorithm calculation, the visibility is discretized to. According to equation (9), eight-neighbor cells are sorted according to the size of their visibilities. The vector of visibility is defined as and meets , and .
4.2. Updating Mechanism of Pheromone
The hybrid strategy of global updating and local updating is presented. The global updating is used to update the number of pheromone for grids in the map when the ant colony finishes one movement cycle. The local updating is used to update the number of pheromone for grids corresponding cellular automata when the ant colony implements the move rules of cellular automata.
The global updating rule of pheromone is defined aswhere is the durability of the trajectory, is the new , is the original , and is the number of pheromone per unit length on the edge arc of ant .
According to different types of ant colony, can be set different values. It can be described by threshold mechanism aswhere and are constants to reflect the track number kept by ants, respectively; is the threshold of node determined by the map information, the starting point, and the end point; is the node number of planned path; and is the maximum number of skipping steps.
The principle of equation (11) is that when , the updating of nodes pheromone will be an optimum global updating and when , the updating of nodes pheromone will be an suboptimum global updating.
When ants move from the former cellular automata to the next, they will record the coordinate of the cellular automata and update the amount of current cellular automata pheromone. The locally updating mechanism can prevent ants to be lazy, which avoids the algorithm converging to a known current path and giving up finding new paths. The locally updating mechanism can be represented as
4.3. Ant Colony Punishment Mechanism
The comprehensive probability can be calculated by equation (8). The moving rules of cellular automata can be represented aswhere is the position of cellular automata at time , is a random integer from 0 to 100, , and .
4.4. Moving Rules of Cellular Automata
It is possible that there are some trap grids in the grid map. Ants will lose their way when they move into these traps. As shown in Figure 5, it is assumed that the robot starting point is (0, 0) and the target point is (3, 3). The probabilities of ants moving from (0, 0) to (1, 1) and from (1, 1) to (1, 2) are 60% and 100%, respectively. Therefore, a lot of ants will fall into a trap grid.
A punishment mechanism is developed to avoid this trap phenomenon. Firstly, the last five nodes of the current ant are traversed to judge whether these five nodes are the same. Secondly, if these five nodes are the same node, the ant queue is deleted from the active queues and its header is set to 2, and the grid corresponding to the node is treated as an obstacle grid and to be marked to 0. Lastly, the jumping probability table of ants is updated.
5. Experiment and Discussion
5.1. Simulation and Contrast Experiments
In this paper, experiment platform is VC++ 6.0, the diameter of robot is 250 mm, the size of environment is 12 m × 9 m, and the map’s pixel is 640 × 480. The robot’s path is planned by the improved APF, the APF-ACO mixed method, the traditional ACO, and the traditional APF, respectively. The feasibility, advantage, and disadvantage of our algorithm are verified by comparing with other three algorithms from the planning path’s time-consuming, number of node, turning angle, etc.(1)Set up the map lattice model. We set the safety distance is 125 mm, , and . The grid size is 375 mm × 375 mm calculated by equation (1), and the size of the grid is 32 × 24.(2)Set up the potential field in the grid map according to the improved APF. According to the target and obstacle information in the grid map. First, calculate the force of each grid and store them in the corresponding memories. Then, traverse all grids and compare the direction of the resultant force with the direction of attraction. Finally, if the direction of resultant force is opposite to the direction of attraction, the additional force is added to change the direction of the resultant force. We set , , , , and .(3)Initialize the pheromone table and calculate the visibility of eight-neighbor cell according to the orientations of grid determined by step 2. We set the initial values of the pheromone of all nonobstacle grids and all obstacle grids to 12.5 and 0, respectively. At the same time, we set , , , , , , , and . So, the pheromone table of jump probability of ants can be got.(4)Place 1000 ants to plan the path by the improved ACO. Cellular automatas move according to the table of jump probability. The pheromone table and the path nodes of ants can be updated or recorded synchronously. The process is repeated until the shortest path is outputted. We get the ants nodes the shortest planned path and computational time.(5)Run the improved APF to plan the path based on the direction of resultant force by step 2. The process is repeated 100 times, and then output the nodes of the planned path and computational time.(6)Run the traditional ACO to plan the path. We set the visibilities , the amount of ants to 1000, and other parameters same as step 3. Finally, we get the planning results, including the ant nodes of the shortest path and computational time.
The paths planned by four algorithms are shown in Figure 6.
The parameters of calculating and path are given in Table 1.
The traditional APF falls into an endless loop at the beginning of the path and fails to reach the target point after 100 repeated experiments. The improved APF can avoid obstacles and takes 1500 ms to plan the path from the starting point to the target point. This shows that the improved APF can effectively solve the problem of local minimum. But, the planned path is not satisfactory because it has the path length error of 96.9% and the turning angle error of 1600%.
Using the traditional ACO, only a few ants reach the desired position within the set 100 steps. So, the traditional ACO cannot get a convergence result to form a path within the given time of 30000 ms. There are various reasons for the failure, among which the main reason is that the initial values of the visibilities are no heuristic for ant colony searching. In fact, we can get satisfactory results in some experiments based on a suitable set of . But, the problem is that we do not know how to set these parameters properly.
Our mixed algorithm can obtain a more satisfactory result. Compared to the improved APF, although the mixed algorithm takes more than 390 ms, it plans out a better path which reduces unnecessary turning and redundant paths and has the path length error of 10.3% and the angle error of 100%. Compared to the traditional ACO, the mixed algorithm improves the convergence speed and gets a convergence path with the same , , and initial pheromone. As a result, this mixed algorithm combines the advantages of APF and ACO and has better performance of path planning.
5.2. Mobile Robot Motion Experiment
The purpose of mobile robot experiments is to verify the APF-ACO mixed algorithm adaptability to different tasks. In this paper, experiments are designed to mobile robot’s path planning and path tracking from different start points to different end points in a same obstacle environment.
The mobile robot used in experiments is Traveler II as shown in Figure 7, which can be considered as a cylinder with a diameter of 250 mm.
The mobile robot’s experimental environment with the size of 12 m × 9 m and two sets mobile robot’s start and end points are designed as shown in Figure 8.
A comprehensive index for the planned path is presented to value the merits and effectiveness of the proposed APF-ACO mixed algorithm. The index is defined aswhere is the length of planned path, is the turning angle of planned path, and and are weighted coefficients, and . is taken a larger value than if the path length is paid more attention is concerned. Otherwise, is taken a larger value than .
The experimental steps are as follows:(1)Grid modeling. This paper sets the size of grid map to 640 × 480 (pixels), , and . Then the size of a single grid is 187.5 mm × 187.5 mm, and the ratio of the grid size and real environment size is 4 : 75. So, the mobile robot’s environment shown by Figure 8 can be rasterized to grid map as shown in Figure 9. According the grip size of 187.5 mm, the coordinates of two sets of start and end points in Figure 9 are transferred to (1, 22), (62, 22) and (1, 46), (62, 1), respectively.(2)Establishing the potential field. This paper sets , and . According to the potential field and the information of grid map, we can calculate the resultant force of each grid and its direction, and the information is stored.(3)Path planning. We set , , , , and and placed 1000 ants in the grid map. Lastly, the optimum path obtained by APF-ACO algorithm is shown in Figure 10.(4)Mobile robot motion control. Firstly, we obtain the sequences of nodes in grid map of the path planned by the APF-ACO algorithm. Secondly, the coordinate transformation of the next node is processed from the grid map to the environment map. Then, the mobile robot’s displacement length and the turning angle between the current node and the next node can be calculated. So, according to these motion parameters and control laws, the function of the left and right wheels’ velocity and time can be determined. Finally, the mobile robot is controlled to move until it reaches the last node by the function.
Figure 11 shows the moving process of the mobile robot. The motion results show the mobile can move from the start point to the end point along a smooth and nonobstacles path.
Table 2 gives some results of the algorithm execution process and planning path. The data show the APF-ACO algorithm can plan a higher quality path.
Further, the error rate of the path length is defined aswhere is the mobile robot’s actual path length and is theoretical movement distance.
The error rate of consumption time is defined aswhere is the actual consumption time and is the theoretical consumption time.
The error rate of path length and the error rate of consumption time are shown in Table 3, which shows that the error rate of path length and the error rate of consumption time will increase correspondingly with the increase of the path nodes. The maximum error rate of path length is 6.58%, and the maximum value of the error rate of time is 13.97%. Considering the accumulated error of the inertial sensor of the mobile robot, the error is within the expected range.
This paper presents a hybrid path planning mixed of an improved APF and an improved ACO for mobile robot based on grid map. The main improvements are as follows:(1)The improvements about APF: Firstly, to avoid grid traps, the attraction is calculated by the reciprocal of the distance between the current position and the target position. Secondly, to simplify the calculation, the direction of resultant force is separated into 8 directions based on the current grid. Thirdly, an additional force perpendicular to the direction of the resultant force is added to form a new resultant force when the robot falls into an endless loop.(2)The improvements about ACO: The process of optimization is divided into two phases. In the prophase, the direction of the resultant force obtained by the improved APF is used as the inspired factors, which leads ant colony to move in a directional manner. In the anaphase, the inspired factors are canceled, and ant colony transition is completely based on pheromone updating, which can overcome the inertia of the ant colony and forces them to explore a new and better path.
In the grid environment, the planning result by the improved APF is employed as the optimizing foundation of ACO. The method overcomes some drawbacks of APF such as goal being nonreachable and easily falling into the extreme point, etc., and improves the optimization effect and the rate of convergence of ACO. The simulation experiments and mobile robot environment experiments verify that the method has stronger stability and environmental adaptability.
The research library related to the dissertation in this study is established in https://github.com/glchenwhut/research.git, where you can access the folders and find experimental data and lists.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Guoliang Chen conceived the idea, designed the experiments, and wrote the paper. Yang Xu helped with the algorithm and analyzing the experimental data.
This work was supported by the National Natural Science Foundation of China under grant no. 61672396.
Y. J. Liu, T. Dai, and J. H. Song, “Research of path planning algorithm based on improved artificial potential field,” Journal of Shenyang Ligong University, vol. 36, pp. 61–66, 2017, in Chinese.View at: Google Scholar
X. M. You, S. Liu, and J. Q. Lv, “Ant colony algorithm based on dynamic search strategy and its application on path planning of robot,” Control and Decision, vol. 32, pp. 552–556, 2017, in Chinese.View at: Google Scholar
Z. Liu and Y. N. Hu, “Multi-granularity pattern ant colony optimization algorithm and its application in path planning,” Journal of Central South University (Science and Technology), vol. 44, pp. 3713–3722, 2013.View at: Google Scholar
S. C. Chu and P. W. Tsai, “Computational intelligence based on the behavior of cats,” International Journal of Innovative Computing, Information and Control, vol. 1, pp. 163–173, 2007.View at: Google Scholar
P. W. Tsai, J. S. Pan, B. Y. Liao, and S. C. Chu, “Enhanced artificial bee colony optimization,” International Journal of Innovative Computing, Information and Control, vol. 12, no. B, pp. 5081–5092, 2009.View at: Google Scholar