1. Introduction
With the wide use of automatic guided vehicles (AGVs) in logistics, warehousing and industrial production, its path-planning technology has been widely studied by scholars. The path planning of AGV refers to the generation of a safe, collision-free path based on the shortest time or the shortest path in a map environment. The effect of path planning will determine the efficiency, safety and stability of AGV operation. From the degree of mastery of the operating environment, the path planning of AGVs includes global path planning and local path planning [
1]. The global path planning of AGV is to generate the global optimal path by using the search algorithm to avoid static obstacles in the known work scene. The commonly used global path-planning algorithms include graph-based search algorithms (such as Dijkstra algorithm [
2], A* algorithm [
3,
4,
5,
6,
7,
8]), sampling-based algorithms (such as rapidly exploring random tree algorithm [
9]) and intelligent algorithms (such as genetic algorithm [
10], ant colony algorithm [
11,
12]). Local path planning means that AGVs use sensors to collect local environment information for real-time dynamic obstacle avoidance during operation. The dynamic window method [
13] and artificial potential field method [
14] are often used as local path-planning algorithms.
The A* algorithm, since it has the advantages of a simple structure and a small amount of calculation, is widely applied to grid map global path planning. However, there are many drawbacks in the traditional A* algorithm, such as low search efficiency in a complex environment, a lot of redundant nodes and turning points in the path and an unsmooth path. Wang et al. [
3] reduced the number of turns by introducing the length of the planned completed path and the time cost required for the planned completed path into the cost function of the A* algorithm, and then removed the nodes passing through the vertices of the obstacle and adopted the arc turning strategy to generate a safe and smooth AGV path. Lai et al. [
4] reduced the expansion nodes and shorten the search time by improving the neighborhood search strategy and heuristic function, deleted redundant nodes by introducing a method of preserving key nodes, and combined with a piecewise second-order Bezier curve to generate the smooth path for mobile robot driving. Zhang et al. [
5] introduced a deviation factor in the heuristic function to reduce the total number of expansion nodes, which is the vertical distance between the current node and the connection of starting and target point, used the bi-directional A* search strategy to speed up path search, and combined with B-spline curve. The path meeting the needs of surface unmanned vehicle is then generated. Zheng et al. [
6] added the hop search strategy on the traditional A* algorithm to speed up the search speed of the path node of the A* algorithm, and used the angle evaluation to reduce the quantity of turning points so as to enhance the running efficiency of AGVs. Fang et al. [
7] introduced a logarithmic attenuation factor into heuristic function, proposed the strategy of solving key nodes, reduced the search nodes and path turning points, and integrated the A* algorithm with dynamic window method which solved the problems that the path of the A* algorithm cannot meet the driving demand of AGVs and the dynamic window method cannot reach the target point. Although the above literature has made different improvements to the A* algorithm, it still does not solve the problem of dynamic obstacle avoidance. Kim et al. [
13] proposed an algorithm that combines the dynamic window method and deep reinforcement learning to achieve local dynamic obstacle avoidance, but this algorithm is not suitable for global optimal path planning. Yang et al. [
15] proposed a global dynamic path-planning method which combines an ant colony algorithm and the dynamic window method, but the efficiency of this algorithm needs to be improved.
Although the A* algorithm has strong global path-planning ability, its planned path is not smooth and cannot achieve dynamic obstacle avoidance. The dynamic window method has a good ability for local path planning, which can achieve dynamic obstacle avoidance, but it is not suitable for global path planning. In this paper, a path-planning fusion algorithm is proposed to achieve the global optimal path planning of AGVs, improve the efficiency of path planning, and achieve real-time dynamic obstacle avoidance. Firstly, by improving the cost function of the traditional A* algorithm, the path search is more directional, the expansion of nodes is lower and the search time is shorter. Secondly, by using path optimization strategy to eliminate redundant nodes and redundant turning points in the global path, the path length is shortened and the path smoothness is improved. Finally, the fusion of the global planning capability of the A* algorithm and the local planning capability of the dynamic window method enables the AGV to realize dynamic obstacle avoidance in global path planning, effectively avoiding dynamic obstacles and unknown static obstacles that may appear in the driving path.
3. Local Path Planning Based on Dynamic Window Method
The dynamic window method is commonly utilized for local path planning [
13]. This algorithm can help AGVs to avoid moving obstacles and unknown static obstacles in the working environment. The implementation process of the dynamic window method is: firstly, multiple groups of velocities are sampled in the velocity space of a moving AGV. Secondly, multiple groups of motion trajectories of an AGV in the next interval is simulated according to multiple groups of sampled velocities. Thirdly, the optimal trajectory of the AGV is selected by evaluating the multiple groups of trajectories obtained from the evaluation function. Finally, the velocity corresponding to the optimal trajectory is taken as the velocity instruction of the AGV [
16].
3.1. The Kinematics Model of AGV
The dynamic window method simulates the trajectories of the next moment based on the sampled velocities, so it is essential to model the kinematics of the AGV. The movement trajectory of the AGV is composed of arc trajectories generated in each sampling interval
, because
is very short, so each arc trajectory can be regarded as a straight line trajectory. It is assumed that the AGV moves at a constant speed in
, the kinematic model of the AGV can be represented as:
In the formula, (, ) and (, ) are the position co-ordinates of AGV at time and time , respectively. and are the heading angles of AGV a at time and time , respectively. and are projections of the running speed of AGV on the x-axis and y-axis, respectively.
3.2. Velocity Sampling
According to the established AGV kinematic model, the trajectories of the AGVs at the next moment can be obtained from the sampled linear and angular velocities. Since there are many sets of velocities to choose from in the velocities space, the sampling velocities need to be constrained according to the conditions of the AGV and the limitations of the environment.
(1) The linear velocity and angular velocity constraints of AGV:
In the formula, and are the minimum and maximum linear velocity of AGV respectively. and are the minimum and maximum angular velocity of AGV respectively.
(2) During the time interval
, due to the limitations of motor performance and braking performance, the operating velocity of the AGV is constrained to a specified scope, and the constraint is denoted as:
In the formula, and are the linear velocity and angular velocity of AGV at the current moment. and are the maximum linear deceleration and angular deceleration of AGV. and are the maximum linear acceleration and angular acceleration of AGV.
(3) For the safe operation of AGVs, it is necessary to ensure that the AGV reduces its velocity to zero before it collides with an obstacle, and the velocity constraints of AGVs is as follows:
In the formula, denotes the nearest safe distance to an obstacle on the AGV trajectory projected at velocity .
3.3. Evaluation Function
From the implementation process of dynamic window method introduced earlier, it is known that a suitable evaluation function needs to be designed to evaluate the trajectories simulated by many sets of sampling velocities in the velocities space, then select an optimal trajectory as the next trajectory of AGV. In this paper, we aim to design the evaluation function to ensure that the AGV reaches the target point at a faster speed while maintaining a safe distance from obstacles during operation. The evaluation function is given below:
In the formula, is used to guide the direction of AGV movement and prevent it from deviating from the target point. makes AGV keep a safe distance from the obstacles and prevent collision. makes AGV move to the target point quickly. , , are the weighting coefficients. is the smoothing factor.
5. Simulation Experiment and Analysis
In order to validate the feasibility of the improved A* algorithm and the fusion algorithm, simulation experiments are conducted using MATLAB2020a. The processor of the test host is Intel(R) Core(TM) i5-10400F, the main frequency is 2.90 GHz, and the memory is 16 GB. The working environment of the AGV is simulated using a
grid map. The grid map is shown in
Figure 3, where each grid is 1
long, the black areas represent the obstacles area and the white areas represent the space where the AGV can move freely. The start point of the AGV is
and the target point is
.
The parameters of the dynamic window method are as follows: the maximum linear velocity of the AGV is 1.5 , the maximum linear acceleration is 1 , the maximum angular velocity is 40 , the maximum angular acceleration is 50 , the linear velocity resolution is 0.05 , and the angular velocity resolution is 1 . The parameters of the evaluation function are set as follows: , , , , and the prediction time is 2 .
5.1. Simulation Analysis of Heuristic Function
The traditional A* algorithm has a large search scope and a long search time, resulting in inefficient path planning. After the improvement of the heuristic function, the advantages of the improved A* algorithm in this paper are reflected through comparative analysis of simulation experiments. The simulation results are shown in
Figure 4, where the black grids represent the obstacles, the green grid and the red grid represent the starting point and the target point, respectively, the blue grids represent the planning path, and the yellow grids are the search areas of the algorithm. To prevent experimental errors attributed to fluctuations in host performance, the experimental data results are the average values obtained from 20 consecutive simulation experiments.
Figure 4a shows the path-planning results of the traditional A* algorithm. According to the results of simulation experiments, the path planning of the traditional A* algorithm takes 0.076
, the planned path has a length of 30.73
, and the search scope occupies 228
.
Figure 4b shows the path-planning results of the the improved A* algorithm in reference [
7]. For ease of representation, the algorithm will be given the name modified A* algorithm. According to the results of simulation experiments, the path planning of the modified A* algorithm takes 0.076 s, the planned path has a length of 30.73
, and the search scope occupies 228
.
Figure 4c shows the path planning results of the traditional A* algorithm. According to the results of simulation experiments, the path planning of the improved A* algorithm takes 0.057 s, the planned path has a length of 30.73
, and the search scope occupies 96
.
Table 1 summarizes the experimental data for the three A* algorithms. From the above experimental data, it can be seen that all three algorithms have the same planning path lengths. However, the path-planning time of the improved A* algorithm is 26.3% less than the traditional A* algorithm and 4% less than the modified A* algorithm. The improved A* algorithm has 57.9% less search scope than the traditional A* algorithm and 6.6% less search scope than the modified A* algorithm. Therefore, the improved A* algorithm provides some improvement in both search time and search scope.
5.2. Global Path Planning in Static Environment
In a static environment, this paper conducts global path-planning simulation experiments for four algorithms. The simulation images are shown in
Figure 5.
The planned path of the traditional A* algorithm is shown in
Figure 5a, where the blue circles are the path nodes and the blue line is the path. The time spent on path planning is 0.076
. The path length is 30.73
. There are 28 path nodes and seven turning points in the path.
The planned path of the improved A* algorithm is shown in
Figure 5b, where the blue circles are the path nodes and the blue line is the path. The time spent on path planning is 0.057
. The path length is 28.53
. There are four path nodes and two turning points in the path.
The planned path of the fusion of traditional A* algorithm and dynamic window method is shown in
Figure 5c. The blue dashed line and the red solid line are the paths planned by the traditional A* algorithm and the fusion algorithm, respectively. According to the experimental results, the time spent on path planning is 70.56 s and the path length is 30.15 m.
The planned path of the fusion of the improved A* algorithm and dynamic window method is shown in
Figure 5d. The blue dashed line and the red solid line are the paths planned by the improved A* algorithm and the fusion algorithm, respectively. According to the experimental results, the time spent on path planning is 57.67 s, and the path length is 28.57 m.
The experimental data of static global path planning for the four algorithms are shown in
Table 2.
According to the results of simulation experiments, the path of the improved A* algorithm is 7.2% shorter than the traditional A* algorithm, with 85.7% fewer path nodes and 71.4% fewer turning points.
The improved A* fusion algorithm reduces the path planning time by 18.3% and the path length by 5.2% compared to the traditional A* fusion algorithm. In addition,
Figure 6 and
Figure 7 show the linear and angular velocity variations of the AGV during path planning for the two fusion algorithms, respectively. It can be seen from the figures that when the AGV uses the improved A* fusion algorithm to plan the path, the change rate of linear and angular velocity is smaller. It can be seen that the reduction of the number of path nodes and turning points of the improved A* algorithm can help to reduce the path planning time and path length of the fusion algorithm, and can also improve the driving stability of the AGV.
Although the length of the path planned by the fusion algorithm has a slight increase compared to the globally optimal path, the path planned by the fusion algorithm is smoother, which is helpful to improve the motion stability of the AGV.
5.3. Global Path Planning in Dynamic Environment
In order to verify the obstacle-avoidance performance of the fusion algorithm and its sensitivity to environmental changes, we have performed dynamic obstacle-avoidance simulation experiments in different map environments. The path planning effect of the fusion algorithm in map 1, map 2 and map 3 is shown in
Figure 8,
Figure 9 and
Figure 10, respectively, The parameters of three different map environments are shown in
Table 3. In addition to the known obstacles in the map, we add dynamic obstacles and unknown static obstacles to the possible path of the AGV to investigate the dynamic obstacle-avoidance ability of the fusion algorithm. In the figures, black squares represent known static obstacles, yellow squares represent dynamic obstacles, gray squares represent unknown static obstacles, the blue dotted line is the global optimal path planned by the improved A* algorithm, and the red solid line is the path planned by the fusion algorithm.
The path-planning effect of the fusion algorithm in map 1 is shown in
Figure 8.
Figure 8a shows that the fusion algorithm starts path planning along the global optimal path.
Figure 8b shows that the AGV detects moving obstacle and starts local path planning to successfully avoid moving obstacles and then continues to follow the global optimal path.
Figure 8c shows that the AGV detects an unknown static obstacle and starts local path planning to successfully avoid it and then continues to follow the global optimal path.
Figure 8d shows that the AGV successfully reached the target point. It can be seen from the figure that the fusion algorithm can successfully avoid dynamic obstacles and unknown static obstacles in the process of following the global optimal path. The simulation results show that the path-planning time of the fusion algorithm in map 1 is 58.76
and the path length is 29.30
.
The path-planning effect of the fusion algorithm in map 2 is shown in
Figure 9. The simulation results show that the path-planning time of the fusion algorithm in map 2 is 59.20
and the path length is 28.46
. As can be seen in the figure, the fusion algorithm can also achieve dynamic obstacle avoidance and reach the target point in the more complex map.
The path-planning effect of the fusion algorithm in map 3 is shown in
Figure 10. The simulation results show that the path-planning time of the fusion algorithm in map 3 is 260.82
and the path length is 57.14
. From the simulation results, it can be seen that although the path-planning efficiency of the fusion algorithm is reduced in the larger map, it can still satisfy the requirements of a global optimal path and dynamic obstacle avoidance.
From the path-planning results of the fusion algorithm in three different map environments, we can see that the fusion algorithm proposed in this paper can be applied to the global optimal path planning and real-time dynamic obstacle avoidance in different map environments.