Next Article in Journal
“Algorithms in Multi-Objective Optimization”: Foreword by the Guest Editor
Previous Article in Journal
On Deep-Fake Stock Prices and Why Investor Behavior Might Not Matter
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm

1
School of Advanced Manufacturing Engineering, Chongqing University of Posts and Telecommunications, Chongqing 400065, China
2
Key Laboratory of Optoelectronic Information Sensing and Technology, Chongqing University of Posts and Telecommunications, Chongqing 400065, China
3
China Assistive Devices and Technology Center, Beijing 100050, China
*
Author to whom correspondence should be addressed.
Algorithms 2022, 15(12), 477; https://doi.org/10.3390/a15120477
Submission received: 20 October 2022 / Revised: 3 December 2022 / Accepted: 13 December 2022 / Published: 15 December 2022

Abstract

:
The Theta* algorithm is a path planning algorithm based on graph search, which gives the optimal path with more flexibility than A* algorithm in terms of routes. The traditional Theta* algorithm is difficult to take into account with the global and details in path planning and traverses more nodes, which leads to a large amount of computation and is not suitable for path planning in large scenarios directly by the Theta* algorithm. To address this problem, this paper proposes an improved Theta* algorithm, namely the W-Theta* algorithm. The heuristic function of Theta* is improved by introducing a weighting strategy, while the default Euclidean distance calculation formula of Theta* is changed to a diagonal distance calculation formula, which finally achieves a reduction in computation time while ensuring a shorter global path; the trajectory optimization is achieved by curve fitting of the generated path points to make the motion trajectory of the mobile robot smoother. Simulation results show that the improved algorithm can quickly plan paths in large scenarios. Compared with other path planning algorithms, the algorithm has better performance in terms of time and computational cost. In different scenarios, the W-Theta* algorithm reduces the computation time of path planning by 81.65% compared with the Theta* algorithm and 79.59% compared with the A* algorithm; the W-Theta* algorithm reduces the memory occupation during computation by 44.31% compared with the Theta* algorithm and 29.33% compared with the A* algorithm.

1. Introduction

1.1. Research Background

With the development of robotics and artificial intelligence, the application of robots can be seen in all walks of life. The most important manifestation of mobile robot intelligence is autonomous navigation, which is mainly to solve the problem of “where am I”, “where should I go” and “how should I go” of robots. The key technology to solve this problem is path planning, which is also a difficult technology. Path planning requires the robot to find the best collision-free path from the starting point to the target point in different map environments, and the quality of the path planning can directly affect the robot’s task completion.
Nowadays, the rise of mobile robots, unmanned vehicles, and the field of UAVs has led more and more scholars to work on path planning algorithms. Although there are many algorithms proposed for path planning, there are still great challenges in the research of path planning, especially about the trajectory optimization of paths, and there are still many problems that need to be solved. The paths planned by the current mainstream path planning algorithms are shown in Figure 1, where path A and path B are connected by discrete path points, so there are problems such as paths turning at acute angles and the planned paths are not the actual shortest paths, which are not ideal for the movement of mobile robots. In the actual application of mobile robots, it is necessary to avoid sudden sharp turns or stops, and to ensure the continuity of posture, speed and acceleration at the turns during the movement. For example, in unmanned driving, the discontinuity of the planned path interruptions leads to sudden turns and sudden changes in speed and acceleration during the driving process, which can affect the safety of passengers. Secondly, the path planning based on grid map will restrict the robot to search the direction on the map, so that the planned path is not the actual shortest path, which will generate many useless inflection points, and these inflection points will affect the operation efficiency of the robot. As shown in Figure 1 for path C, a shorter, smoother path represents less energy loss and higher efficiency while ensuring the safety of the mobile robot. For example, in the process of transporting goods by logistics AGVs, the efficiency of the AGVs directly affects the overall efficiency of the logistics warehouse operation.
To address the above problems, this paper will propose a solution by adding multi-angle pathfinding idea and path smoothing technique to the existing path planning algorithm. Multi-angle pathfinding is to break the constraints of the traditional path planning algorithm in the search direction brought by the discrete grid map, so that its path can be extended from any angle. The path smoothing process will make it easier to realize the continuous change of position transformation, moving speed, and acceleration of the robot in the process of motion.

1.2. Related Work

The current mainstream path planning algorithms are broadly classified into three main categories: population intelligence-based algorithms, random sampling-based, and graph search-based. The idea of cluster-based optimization is inspired by the process of population evolution, and its typical algorithms include the genetic algorithm proposed by J. Holland [1,2], the ant colony algorithm proposed by Marco Dorigo [3,4], and the particle swarm algorithm proposed by Eberhart and Kennedy [5], etc. The random sampling-based path planning method gradually obtains the connectivity information between different states in the state space by random sampling and then gradually finds the feasible solution, which greatly reduces the search complexity and improves the search efficiency, but these methods have the problem of poor stability of the solution quality and cannot guarantee the optimal solution. The most studied methods are the Probabilistic Roadmap (PRM) [6] algorithm and the Rapidly expanding Random Tree (RRT) algorithm [7]. The graph search-based path planning method first requires the construction of graphs, i.e., the state space of the mobile robot system is partitioned into discrete spaces (considered as graphs) according to a certain criterion, after which graph search algorithms are applied to search for paths in these graphs, and the commonly used algorithms are Dijkstra’s algorithm [8,9], A* algorithm [10,11], and Theta* algorithm [12,13,14,15].
A* algorithm based on graph search technique has a wide range of applications in path planning for robots. The advantage of A* algorithm is that it is better in real time and easy to implement, but the disadvantage is that the uncertainty of the heuristic function affects the quality of path planning [16], and the search direction of A* algorithm is limited by the shape of the grid in the map in the process of path planning, so the planned path is not the shortest path in the actual map shortest path in the actual map. To address this problem, Alex Nash et al. proposed the Theta* algorithm [14]. This algorithm is an improved branch based on the A* algorithm, which combines the respective features of the A* algorithm and the visual map method, and searches along the grid on the grid map during path planning, but the path is not restricted to the edges of the grid, which achieves the arbitrary turning angle and effectively reduces the length of the path and the number of turning points. The difference between the Theta* algorithm and the A* algorithm is that the Theta* algorithm allows the parent of the current node to be any other node, while in the A* algorithm, the parent of the current node can only be a visible neighbor of the node. Since the Theta* algorithm is derived from the A* algorithm, it is still limited in operational efficiency by the excessive number of nodes traversed in the path search process.
The optimal path proposed by path planning is not only the shortest passable path, but also the continuous and smooth transition of the robot’s position, velocity, and acceleration during the movement, which requires the optimization of the planned path. Many scholars have proposed different path optimization schemes in previous studies. The most commonly used methods for path smoothing optimization are Bézier curves [17,18] and B-sample curve optimization [19]. The Bézier curve approach allows curve fitting of the generated path points during path planning and thus achieves the role of smoothing the path. Usually, the number of initial path points obtained by the global path planning algorithm is small, resulting in a low fit, and therefore the smoothed path may collide with the obstacle. In order to increase the curve fit, the path points are usually increased. However, if the number of path points is increased excessively, it increases the computational effort of the algorithm thus leading to a decrease in the efficiency of the algorithm [20]. Another aspect of spline curve fitting is only for the geometric smoothing of the path, and the continuity of the robot’s running speed and acceleration is not taken into account. Qinming Hu et al. [21] proposed a polynomial interpolation-based method to improve the continuity problem of the robot during navigation. Polynomial interpolation [22] is a simple functional method. This method is solved by finding a polynomial containing all path nodes and adding continuity constraints for node position, velocity, and acceleration.
To address the problems of low computational efficiency and long convergence time of Theta* algorithm, this paper proposes a W-Theta* algorithm, which is based on the dynamic weighted improvement of Theta* algorithm to improve the path planning efficiency of Theta* in large scenarios, while using the polynomial optimization method based on minimum jerk [23,24], so that the W-Theta* algorithm to satisfy smoothness and continuity of the planned paths. Firstly, a two-dimensional grid map is constructed to provide a simulation environment for validating the algorithm; secondly, the heuristic function of Theta* is improved, while the diagonal distance expression is used, which finally achieves the reduction of computation time while ensuring the shortest global path; finally, the generated path points are curve-fitted to make the robot’s motion trajectory smoother.

2. Algorithm Design

2.1. Theta* Algorithm

The Theta* algorithm is a variant of the A* algorithm, which is centered on the grid of the current node and expands outward, the node expansion direction of the A* algorithm is shown in Figure 2 and is restricted to eight directions around the current node, while the same Theta* does not restrict the expansion direction of the node. The Theta* algorithm, like the A* algorithm, is applicable to static grid maps and its cost function expression is:
f ( n ) = g ( n ) + h ( n )
where f ( n ) is the estimated cost from the starting point to the target point; g ( n ) is the actual cost from the starting point to the current node n ; and h ( n ) is the heuristic function, which represents the estimated cost from the intermediate point n to the target point. In the traditional Theta* algorithm, the calculated value of g ( n ) is generally characterized as the number of nodes of the grid map through which the path passes, and the heuristic function h ( n ) is the distance from node n to the target point.
The key difference between the Theta* algorithm and the A* algorithm is that the parent node of a vertex in the A* algorithm can only be the node adjacent to it, while the visibility check mechanism is added in the Theta* algorithm to break the restriction of the raster environment, so that the parent node of a node can be any node. When extending a new node, the A* algorithm considers only one path, while the Theta* algorithm considers two paths, as shown in Figure 3a, when the Theta* algorithm wants to extend from point A2 to point C3.
  • Path 1 has 3 path nodes: A2, B2, and C3, currently the parent node of C3 is B2 and the parent node of B2 is A2. This is also the path considered by the A* algorithm.
  • Path 2 has 2 path nodes: A2 and C3. Currently, C3’s parent node is A2. This is an additional path to consider with the A* algorithm.
According to the triangle trilateral length property it is known that the distance of path 2 must be shorter than path 1. Additionally, the need to visualize the current node and the extended node to determine whether there are obstacles before the two nodes, as in Figure 3a, there is no obstacle between node A2 and node C3, so path 2 can be selected, but in Figure 3b, there is an obstacle between node A2 and node B4, the two nodes are not visible, so path 2 cannot be selected.
The specific steps of the Theta* algorithm are as follows:
  • Initialize the starting point and target point, create a new open table and a new close table, and add the starting point to the open table.
  • Determine whether the open table is empty, if it is empty, the path planning fails and the search stops; if it is not empty, the node with the lowest evaluation cost in the open table is taken as the current node to be expanded and set to n . Go to the next step.
  • Determine whether the current node n is the target point, if yes, it means the path finding is successful, backtrack the parent node of n until the starting point is the path, and the search is terminated; otherwise, go to the next step.
  • Extend node n . Iterate over all neighboring nodes of node n (set to s ) and perform the following operations.
    • If node s is an obstacle or is already in the close table, do not process it; instead proceed to the next step.
    • If node s is not in the open list, initialize the actual cost g ( s ) from the starting point to node s to infinity, set its parent node to NULL, and insert node s into the open table. If node s is in the open list, proceed directly to the next step.
    • Update the information of the node. Check if the parent node (set to p ) of the current node n exists. If it exists, check whether node s and node p are visible by line of sight (LOS) function [13]. If the two nodes are visible and the g ( p ) of node p plus the generation value from node p to node s is less than the g ( s ) of node s , the parent of node s is updated to node p , and the g ( s ) of node s is updated to the g ( p ) of node p , plus the generation value from node p to node s . If the two nodes are not visible and the g ( n ) of node n plus the cost from node n to node s is less than the g ( s ) , then the parent node of node s is updated to node n and g ( s ) of node s is updated to g ( n ) of node n plus the generation value from node n to node s .
    • The original g ( s ) of node s is compared with the updated actual generation value, and if the updated actual cost is smaller than the original actual cost, the estimated cost of node s is recalculated and the information related to node s in the open table is updated.
  • Remove the already traversed node n from the open table and add it to the close table, then return to step 2.
Based on the description of the steps of the Theta* algorithm above, its pseudo-code can be written as shown in Algorithm 1.
Algorithm 1. Theta* algorithm.
Input: start point:{sstart}, map arrays:{map}, goal point:{sgoal}
Output: algorithm planning path: {path}
 1:  Initialize   the   open   and   close   tables :   { open   closed   : = }
 2: Initializing the cost function: {g(sstart) ≔ 0}
 3: Set the start node as the parent node: {parent(sstart) ≔ sstart}
 4: open.Insert(sstart, g(sstart)+h(sstart))
 5: while   open      do
 6:  s ≔ open.Pop()
 7:  if s = sgoal then
 8:   return path
 9:  end if
 10:   closed closed {s}
 11:   for   s   nghbrvis(s) do
 12:    if   s   closed then
 13:     if   s   open then
 14:      g ( s )  
 15:     parent(s’) ≔ NULL
 16:    end if
 17:    gold ≔ g(s’)
 18:    if lineofsight(parent(s), s’) then
 19:      if g(parent(s)) + cost(parent(s), s’) < g(s’) then
 20:      g(parent(s’)) ≔ parent(s)
 21:      g(s’) ≔ g(parent(s)) + cost(parent(s), s’)
 22:     end if
 23:    else
 24:     if g(s) + c(s, s’) < g(s’) then
 25:      parent(s’) ≔ s
 26:      g(s’) ≔ g(s) + cost(s, s’)
 27:     end if
 28:    end if
 29:    if g(s’) < gold then
 30:     if s   open then
 31:      open.Remove(s’)
 32:     end if
 33:     open.Insert(s’, g(s’) + h(s’))
 34:    end if
 35:   end if
 36:  end for
 37: end while

2.2. Improvement of Heuristic Function

The heuristic function h ( n ) of Theta* is mainly to estimate the cost of the robot’s current position node to the target point, and different h ( n ) will have different effects on the operation efficiency of the algorithm. When the value of h ( n ) is 0, the Theta* algorithm will degenerate into Dijkstra algorithm, which can guarantee that the output path is optimal, but the number of nodes diffused in the process of calculation is large, resulting in low efficiency in path planning in a large scene environment and cannot meet the demand of real-time; when the value of h ( n ) is very large, Theta* can quickly plan at a path, but cannot guarantee that the path is the shortest path, so it defeats the purpose of the path planning algorithm. Therefore, in order to ensure that the path planning algorithm meets the two conditions of shortest path and low computational cost, it is necessary to choose a suitable heuristic function for the algorithm.
The heuristic function of the improved algorithm is mainly to find the shortest path. Using the traditional method of expanding nodes will generate many useless expansion nodes and increase the computational cost. To address this problem, the following improvements are made in this paper:
  • To get the optimal path, the predicted cost calculated by the heuristic function must be less than or equal to the actual minimum cost and the closer the two are, the more efficient the search is. In addition, the cost between two points in two-dimensional space usually refers to the Euclidean distance between the two, so this paper uses the Euclidean distance to express the distance between the current node and the end point, and its formula can be expressed as follows:
    d ( n ) = ( x n x g o a l ) 2 + ( y n y g o a l ) 2
    where ( x n , y n ) are the coordinates of the current node n and ( x g o a l , y g o a l ) are the coordinates of the target point.
  • If the cost function f ( n ) of the current node n corresponds to more than one path, all of these paths will be searched, but only one of them is actually needed. This situation occurs very frequently in maps with few obstacles. To solve this problem, in this paper, we will add additional values to the heuristic function h ( n ) , the size of which is the vector fork product of the initial point-to-target vector and the current point-to-target vector, and then change the value of h ( n ) to make it more inclined to the connection from the initial point to the target point in selecting the path, to ensure uniqueness in planning the path and reduce unnecessary computation. The functional expression is:
    c = V c _ e × V s _ e
    where c denotes the vector fork product of the start-point-to-target-point vector V s _ e and the current node-to-target-point vector V c _ e .
  • By adding a weight w to the heuristic function h ( n ) and then dynamically adjusting this weight according to the progress of the algorithm, the importance of the heuristic function is reduced by decreasing the weight as the path planned by the algorithm approaches the target point, while increasing the relative importance of the true cost of the path.
    According to the above three improvements, the expression of the heuristic function is:
    h ( n ) = w d ( n ) + c d ( s )
    where w is the weight and its size is set to w = 1 + d ( n ) d ( s ) ; c is the crossover operator that breaks the path balance; d ( n ) is the distance from the current node n to the target point, expressed using the Euclidean distance; d ( s ) is the Euclidean distance from the starting point to the target point.

2.3. Trajectory Optimization

The output of the Theta* algorithm is a global optimal path point based on a 2D grid map, and these path points may be sparse and unsmooth, which can lead to problems such as spinning in place and poor movement of the robot during motion. Therefore, the generated paths need to be optimized so that the robot can achieve smooth steering during operation.
The three objectives of path length, steering smoothness and steering safety need to be considered when smoothing the path. The optimization method proposed in this paper represents the trajectory by nth order polynomial as shown in Equation (6).
f ( t ) = p 0 + p 1 t + p 2 t 2 + + p n t n = i = 0 n p i t i
where p 0 ~ p n are the trajectory parameters, which can be set as a parameter vector as shown in Equation (7).
p = [ p 0 , p 1 , , p n ] T
Thus, with Equations (6) and (7), the trajectory function f can be expressed in vector form as:
f ( t ) = [ 1 , t , t 2 , , t n ] p
By deriving the trajectory function, the position, velocity, acceleration, jerk, snap, etc. of the trajectory at any moment can be obtained, and the specific function expressions are as follows.
v ( t ) = f ( t ) = [ 0 , 1 , 2 t , 3 t 2 , 4 t 3 , , n t n 1 ] p
a ( t ) = f ( t ) = [ 0 , 0 , 2 , 6 t , 12 t 2 , , n ( n 1 ) t n 2 ] p
j e r k ( t ) = f ( 3 ) ( t ) = [ 0 , 0 , 0 , 6 , 24 t , , n ! ( n 3 ! ) t n 3 ] p
s n a p ( t ) = f ( 4 ) ( t ) = [ 0 , 0 , 0 , 0 , 24 , , n ! ( n 4 ! ) t n 4 ] p
Since a complex trajectory cannot be represented by a polynomial, it is necessary to divide the trajectory into multiple local trajectories in time, and then represent the local trajectories by a polynomial each.
f ( t ) = [ 1 , t , t 2 , , t n ] p 1 t 0 t < t 1 [ 1 , t , t 2 , , t n ] p 2 t 1 t < t 2 [ 1 , t , t 2 , , t n ] p k t k 1 t < t k
where k is the number of segments of the trajectory and p i is the parameter vector of the i th segment of the trajectory.
The objective function of the minimum jerk is to solve the parameter vector of each trajectory to minimize the value of the jerk function, and it also needs to satisfy the constraints. The objective function of minimum jerk can be obtained from the above:
min ( j e r k ( t ) ) = min 0 T ( f ( 3 ) ( t ) ) 2 d t = min i = 1 k t i 1 t i ( f ( 3 ) ( t ) ) 2 d t
According to the optimization function to add constraints, there are mainly two kinds of constraints without considering obstacles, one is equation constraint, which mainly constrains the initial state and termination state of the trajectory, as well as the start and end position of each section of the trajectory; the other is continuity constraint, which can make the adjacent trajectories smoothly transition. The optimized effect is shown in Figure 4.

3. Simulation

In order to verify the feasibility and search efficiency of the algorithm proposed in this paper, this validation experiment is divided into two parts. The first part mainly tests the effectiveness and stability of the W-Theta* algorithm in an environment with randomly generated obstacles of different densities under maps of different sizes. The second part mainly compares the W-Theta* algorithm with the original Theta* algorithm, A* algorithm and Dijkstra algorithm mainstream path algorithms in different scenarios, respectively. The second part of the experiments compares the time cost, the number of path nodes traversed, the path length, and the search computation cost of the algorithms using the average data of 10 experiments as the experimental results. The experiments were conducted on a computer with Intel Core i7-10875H, 2.3 GHz CPU, and 16G RAM, and the algorithm experimental platform used Matlab software, whose version number is 2022a.

3.1. W-Theta* Algorithm Stability Test Experiment

This part of the experiment was designed with 3 groups of maps, each with dimensions of 40 × 40 m, 80 × 80 m, and 100 × 100 m, respectively, where each group of the same size map has an obstacle coverage of 10, 30, and 50%. As shown in Figure 5, the green point is the starting point, the red point is the ending point, and the black grid is the obstacle. The solid blue line is the path planned by Theta* algorithm, and the dashed orange line is the path planned by W-Theta* algorithm.
The data of the W-Theta* algorithm and Theta* algorithm run on each map are shown in Table 1. The data in the table shows that the pathfinding time of the W-Theta* algorithm is shorter than that of the Theta* algorithm for maps of different sizes and obstacle densities, and the W-Theta* algorithm reduces the pathfinding time compared with the Theta* algorithm for maps of 40 × 40 m, 80 × 80 m, and 120 × 120 m by 47.12%, 84.77%, and 92.56%, respectively. The difference is more obvious for larger maps. Usually, the time spent by an algorithm can visually reflect the time complexity of the algorithm, and it can be concluded that the time complexity of the W-Theta* algorithm is less than that of the original Theta* algorithm. In this paper, the heuristic function was optimized to achieve the control algorithm in planning the path to traverse the path nodes. This reduced the computation time and computation cost of the algorithm. Through this experiment, it can be seen that the W-Theta* algorithm calculates a different number of traversed map nodes than the Theta* algorithm; in the same size of the map, the greater the density of obstacles, the greater the gap between the two in the map size of the larger the gap. The larger the map size, the greater the difference between the W-Theta* algorithm and Theta* algorithm. In the maps of 40 × 40 m, 80 × 80 m and 120 × 120 m, respectively, the number of traversed nodes is reduced by 36.32, 72.58, and 82.83%. W-Theta* in these three groups of experiments calculates the number of traversed map nodes to remain below 600, while the Theta* algorithm calculates that the the highest number of nodes is 3658. In terms of path length, the difference in the length of the paths planned by the two algorithms is not significant, and the paths planned by the Theta* algorithm are on average 1.60% shorter than those planned by the W-Theta* algorithm in the three groups of maps, and the Theta* algorithm has a slight advantage in the path length. Theta* algorithm is better than the W-Theta* algorithm in terms of spatial complexity. The memory consumed by W-Theta* algorithm is reduced by 15.02, 32.32, and 35.96% compared with Theta* algorithm in maps of 40 × 40 m, 80 × 80 m, and 120 × 120 m, respectively. It can be seen that the difference between the performance of W-Theta* algorithm and Theta* algorithm is more obvious in the larger size of the map environment.

3.2. Experiment of Comparing W-Theta* Algorithm with Other Algorithms

This part of the experiment uses the Moving AI lab public dataset on three types of maps to compare various path algorithms, the maps are Baldurs Gate II map, urban map and Warcraft III map, and the details of each map are shown in Table 2.
The Dijkstra algorithm, A* algorithm, Theta* algorithm, and W-Theta* algorithm were applied on each map for comparative experiments in terms of pathfinding time, number of traversed nodes, path length, and memory usage, and the visualization results of their path planning are shown in Figure 6. The solid purple line in the figure is the path planned by the Dijkstra algorithm, the solid red line is the path planned by the A* algorithm, the solid blue line is the path planned by the Theta* algorithm, the dashed yellow line is the path planned by the W-Theta* algorithm, the green dot in each map indicates the starting point, the red dot indicates the end point. The white area is the passable area, and the other color grids represent different obstacles. The relevant data of this part of the experiment are shown in Table 3, Table 4 and Table 5. The performance of the proposed W-Theta* algorithm and other mainstream algorithms is analyzed by comparing the path planning time, the number of grids in the traversed map, the length of the planned path, the computer resources consumed, and the turning angle of the path of each algorithm.
The data in Table 3, Table 4 and Table 5 gives the following information: the pathfinding time W-Theta* algorithm is the shortest, while the longest time consuming algorithm is Dijkstra algorithm. In Baldurs Gate II, W-Theta* reduces the pathfinding time by an average of 55.96% compared to the A* algorithm, 61.78% compared to the Theta* algorithm, and 79.70% compared to the Dijkstra algorithm; in City maps, W-Theta* reduces the pathfinding time by an average of 94.81%, 94.91% compared to Theta* and 98.24% compared to Dijkstra; in Warcaft III, W-Theta* reduced the pathfinding time by 88.13%, 88.39% compared to Theta* and 97.97% compared to Dijkstra. The number of nodes traversed by the W-Theta* algorithm is also the lowest, because Theta* is based on the A* algorithm, so both algorithms traverse the same number of nodes, and the highest number of nodes traversed by the Dijkstra algorithm, and the number of nodes traversed by the W-Theta* algorithm relative to the A* algorithm and the original Theta* algorithm is the highest. The nodes traversed by the W-Theta* algorithm are reduced by 62.49%, 91.41%, and 91.31% in Baldurs Gate II, City maps, and Warcaft III maps, respectively; compared to the original Theta* algorithm, the nodes traversed by the W-Theta* algorithm are reduced by 82.99, 97.13, and 97.13% in Baldurs Gate II, City maps, and Warcaft III maps, respectively, and 82.99%, 97.13%, and 97.92%, respectively. In terms of the length of the planned paths, the Theta* algorithm plans the shortest paths, but the path lengths planned by the W-theta* algorithm do not differ much from those planned by the Theta* algorithm, and the path lengths planned by the W-theta* algorithm relative to the Theta* algorithm increase by 1 in Baldurs Gate II, City maps, and Warcaft The path lengths planned by the W-Theta* algorithm compared to the Theta* algorithm increased by 1.98%, 0.81%, and 0.96% in Baldurs Gate II, City maps, and Warcaft III maps, respectively, which shows that the difference between the two algorithms is smaller in the larger environment; the path lengths planned by the W-Theta* algorithm compared to the A* algorithm decreased by 2.48 and 3.09%. The path lengths planned by the W-Theta* algorithm compared to the Dijkstra algorithm are reduced by 14.83, 7.35, and 6.09% for Baldurs Gate II, City maps, and Warcaft III maps, respectively. In terms of memory consumption, the least memory resources are used by the W-Theta* algorithm. Memory resources used by the W-Theta* algorithm compared to the A* algorithm are reduced by 17.80, 49.90, and 20.30% for the maps of Baldurs Gate II, City maps, and Warcaft III, respectively. Memory resources usage by the W-Theta* algorithm compared to the Compared to the Theta* algorithm is reduced by 37.39, 56.63, and 38.90% for Baldurs Gate II, City maps, and Warcaft III maps, respectively. The W-Theta* algorithm is compared to the Dijkstra algorithm, and memory resource usage is reduced by 17.80, 49.90, and 20.30% for Baldurs Gate II, City maps, and Warcaft III maps, respectively. Maps and Warcaft III by 29.82%, 75.41%, and 52.85%, respectively. In the three sets of maps, the paths planned by the W-Theta* algorithm have the smallest turning angles, and the paths planned by the A* algorithm have the largest turning angles. The W-Theta* algorithm reduces the turning angles by 87.06, 77.67, and 34.57% on average compared to the A* algorithm, Dijkstra algorithm, and Theta* algorithm.
From the results of this comparison experiment, we can conclude that the W-Theta* algorithm proposed in this paper is substantially optimized in terms of time complexity and space complexity compared with the A* algorithm, Dijkstra algorithm, and Theta* algorithm, and can achieve fast planning of high-quality paths in various complex environments. The W-Theta* algorithm plans paths with a smaller total turn angle and better overall path smoothing. In general, W-Theta* has significantly improved the efficiency of the algorithm while guaranteeing the resultant path, and the path smoothing process makes it more consistent with the motion of the robot in real situations.

4. Conclusions

To address the problem of slow path planning by traditional A* algorithm and Theta* algorithm in a large scene environment, a W-Theta* algorithm is proposed, and its generation of discrete path points is optimized for trajectory processing. The following conclusions can be drawn from two comparison experiments:
  • Compared with the traditional A* algorithm and the improved A*-based Theta* algorithm, the W-Theta* algorithm enables fast path planning in various complex environments by introducing a dynamic weighting strategy. Especially, the advantage is more obvious in the environment with larger map size, which solves the problem of slow path planning by traditional A* algorithm and Theta* algorithm in large scene environment. It is experimentally concluded that the W-Theta* algorithm reduces the path planning time by 81.65% on average compared with the Theta* algorithm, and by 79.59% on average compared with the A* algorithm.
  • To reduce unnecessary computations, the W-Theta* algorithm improves the algorithm performance by adding an additional value to the heuristic function to ensure uniqueness in planning the path, which allows it to control the traversal of nodes when planning the path and reduces the memory consumption during computation. According to the experimental data, it can be seen that the W-Theta* algorithm consumes an average of 44.31% less computer memory resources during computation than the Theta* algorithm, and an average of 29.33% less than the A* algorithm.
  • This is because the smaller the turn angle of the path is, the better the smoothing process is. In this paper, by using Euclidean distance for distance calculation, the total turn angle of the paths planned by the W-Theta* algorithm is reduced by 87.06, 77.67, and 34.57% on average with respect to the A* algorithm, Dijkstra algorithm, and Theta* algorithm. The paths planned by the W-Theta* algorithm are smoothed using the differential flattening method to fit the path points, which connects the sparse path points into smooth curves or dense trajectory points, ensuring the final paths are continuously smooth.
  • The paths planned by the W-Theta* algorithm are slightly longer than those of the original Theta* algorithm, so further optimization of the planned path length of the W-Theta* algorithm can be done.

Author Contributions

Conceptualization, Z.S.; methodology, Y.H.; software, Y.H. and J.L.; validation, Y.H., J.L. and Y.Z.; formal analysis, Y.Z.; investigation, Z.S.; resources, J.L.; data curation, Y.H.; writing—original draft preparation, Y.H.; writing—review and editing, Y.H.; visualization, J.L.; supervision, Y.Z.; project administration, Y.Z.; funding acquisition, Y.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Research Project of China Disabled Persons’ Federation—on assistive technology: 2022CDPFAT-01.

Data Availability Statement

Publicly available datasets were analyzed in this study. This data can be found here: https://movingai.com/.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Nazarahari, M.; Khanmirza, E.; Doostie, S. Multi-objective multi-robot path planning in continuous environment using an enhanced genetic algorithm. Expert Syst. Appl. 2019, 115, 106–120. [Google Scholar] [CrossRef]
  2. Zhai, L.Z.; Feng, S.H. A novel evacuation path planning method based on improved genetic algorithm. J. Intell. Fuzzy Syst. 2022, 42, 1813–1823. [Google Scholar] [CrossRef]
  3. Miao, C.W.; Chen, G.Z.; Yan, C.L.; Wu, Y.Y. Path planning optimization of indoor mobile robot based on adaptive ant colony algorithm. Comput. Ind. Eng. 2021, 156, 107230. [Google Scholar] [CrossRef]
  4. Tan, Y.S.; Ouyang, J.; Zhang, Z.; Lao, Y.L.; Wen, P.J. Path planning for spot welding robots based on improved ant colony algorithm. Robotica 2022. [Google Scholar] [CrossRef]
  5. Liu, X.H.; Zhang, D.G.; Zhang, T.; Zhang, J.; Wang, J.X. A new path plan method based on hybrid algorithm of reinforcement learning and particle swarm optimization. Eng. Comput. 2022, 39, 993–1019. [Google Scholar] [CrossRef]
  6. Liu, C.G.; Chang, J.A.; Liu, C.Y. Path Planning for Mobile Robot Based on an Improved Probabilistic Roadmap Method. Chin. J. Electron. 2009, 18, 395–399. [Google Scholar]
  7. Tahir, Z.; Qureshi, A.H.; Ayaz, Y.; Nawaz, R. Potentially guided bidirectionalized RRT* for fast optimal path planning in cluttered environments. Robot. Auton. Syst. 2018, 108, 13–27. [Google Scholar] [CrossRef] [Green Version]
  8. Luo, M.; Hou, X.R.; Yang, J. Surface Optimal Path Planning Using an Extended Dijkstra Algorithm. IEEE Access 2020, 8, 147827–147838. [Google Scholar] [CrossRef]
  9. Zhou, Y.L.; Huang, N.N. Airport AGV path optimization model based on ant colony algorithm to optimize Dijkstra algorithm in urban systems. Sustain. Comput. -Inform. Syst. 2022, 35, 100716. [Google Scholar] [CrossRef]
  10. Hong, Z.H.; Sun, P.F.; Tong, X.H.; Pan, H.Y.; Zhou, R.Y.; Zhang, Y.; Han, Y.L.; Wang, J.; Yang, S.H.; Xu, L.J. Improved A-Star Algorithm for Long-Distance Off-Road Path Planning Using Terrain Data Map. Isprs Int. J. Geo-Inf. 2021, 10, 785. [Google Scholar] [CrossRef]
  11. Zhang, Y.; Li, L.L.; Lin, H.C.; Ma, Z.W.; Zhao, J. Development of Path Planning Approach Using Improved A-star Algorithm in AGV System. J. Internet Technol. 2019, 20, 915–924. [Google Scholar] [CrossRef]
  12. Zhang, C.W.; Tang, Y.C.; Liu, H.Z. Late line-of-sight check and partially updating for faster any-angle path planning on grid maps. Electron. Lett. 2019, 55, 690–691. [Google Scholar] [CrossRef]
  13. Luo, Y.; Lu, J.; Qin, Q.; Liu, Y. Improved JPS Path Optimization for Mobile Robots Based on Angle-Propagation Theta* Algorithm. Algorithms 2022, 15, 198. [Google Scholar] [CrossRef]
  14. Daniel, K.; Nash, A.; Koenig, S.; Felner, A. Theta*: Any-Angle Path Planning on Grids. J. Artif. Intell. Res. 2010, 39, 533–579. [Google Scholar] [CrossRef] [Green Version]
  15. Han, X.; Zhang, X.K. Multi-scale theta* algorithm for the path planning of unmanned surface vehicle. Proc. Inst. Mech. Eng. Part M-J. Eng. Marit. Environ. 2022, 236, 427–435. [Google Scholar] [CrossRef]
  16. Shang, E.K.; Bin, D.; Nie, Y.M.; Qi, Z.; Liang, X.; Zhao, D.W. An improved A-Star based path planning algorithm for autonomous land vehicles. Int. J. Adv. Robot. Syst. 2020, 17, 1729881420962263. [Google Scholar] [CrossRef]
  17. Li, F.F.; Du, Y.; Jia, K.J. Path planning and smoothing of mobile robot based on improved artificial fish swarm algorithm. Sci. Rep. 2022, 12, 659. [Google Scholar] [CrossRef]
  18. Li, Q.Q.; Xu, Y.Q.; Bu, S.Q.; Yang, J.F. Smart Vehicle Path Planning Based on Modified PRM Algorithm. Sensors 2022, 22, 6581. [Google Scholar] [CrossRef]
  19. Sun, J.; Han, X.Y.; Zuo, Y.M.; Tian, S.Q.; Song, J.W.; Li, S.H. Trajectory Planning in Joint Space for a Pointing Mechanism Based on a Novel Hybrid Interpolation Algorithm and NSGA-II Algorithm. IEEE Access 2020, 8, 228628–228638. [Google Scholar] [CrossRef]
  20. Zhang, Y.; Xue, Q.; Ji, S. Continuous path smoothing method of B-spline curve satisfying curvature constraint B. Huazhong Keji Daxue Xuebao Ziran Kexue Ban/J. Huazhong Univ. Sci. Technol. Nat. Sci. Ed. 2022, 50, 59–65. [Google Scholar] [CrossRef]
  21. Qinming, H.; Jingang, W.; Xiaojun, Z. Optimized Parallel Parking Path Planning Based on Quintic Polynomial. Comput. Eng. Appl. 2022, 58, 8. [Google Scholar]
  22. Pu, Y.S.; Shi, Y.Y.; Lin, X.J.; Zhang, W.B.; Zhao, P. Joint Motion Planning of Industrial Robot Based on Modified Cubic Hermite Interpolation with Velocity Constraint. Appl. Sci. 2021, 11, 8879. [Google Scholar] [CrossRef]
  23. Oliveira, P.W.; Barreto, G.A.; The, G.A.P. A General Framework for Optimal Tuning of PID-like Controllers for Minimum Jerk Robotic Trajectories. J. Intell. Robot. Syst. 2020, 99, 467–486. [Google Scholar] [CrossRef]
  24. Huang, P.F.; Xu, Y.S.; Liang, B. Global minimum-jerk trajectory planning of space manipulator. Int. J. Control Autom. Syst. 2006, 4, 405–413. [Google Scholar]
Figure 1. Path planning diagram.
Figure 1. Path planning diagram.
Algorithms 15 00477 g001
Figure 2. A* algorithm node search direction.
Figure 2. A* algorithm node search direction.
Algorithms 15 00477 g002
Figure 3. Theta* algorithm path planning schematic.
Figure 3. Theta* algorithm path planning schematic.
Algorithms 15 00477 g003
Figure 4. Trajectory optimization effect figure.
Figure 4. Trajectory optimization effect figure.
Algorithms 15 00477 g004
Figure 5. Comparison between W-Theta* algorithm and Theta* algorithm for maps with three sizes and different obstacle densities.
Figure 5. Comparison between W-Theta* algorithm and Theta* algorithm for maps with three sizes and different obstacle densities.
Algorithms 15 00477 g005aAlgorithms 15 00477 g005b
Figure 6. Comparative experimental results of various algorithms on public dataset maps.
Figure 6. Comparative experimental results of various algorithms on public dataset maps.
Algorithms 15 00477 g006
Table 1. Experimental data table of W-Theta* algorithm and Theta* algorithm for maps with three sizes and different obstacle densities.
Table 1. Experimental data table of W-Theta* algorithm and Theta* algorithm for maps with three sizes and different obstacle densities.
Map Size/m2Obstacle DensityAlgorithmPathfinding Time/sNumber of Traversal NodesPath Length/mMemory Consumption/Bit
40 × 4010%W-Theta*0.01716218156.289939,483
Theta*0.03072719956.289940,971
30%W-Theta*0.01358519058.758955,331
Theta*0.02087431457.719065,555
50%W-Theta*0.02575620563.057071,531
Theta*0.06832051862.241796,451
80 × 8010%W-Theta*0.031979378114.4009121,179
Theta*0.2291641045115.6518183,179
30%W-Theta*0.029807343118.3512177,675
Theta*0.1997581344115.8627258,171
50%W-Theta*0.037211356130.7473234,675
Theta*0.2211511731123.3626344,867
120 × 12010%W-Theta*0.054977570170.3327246,419
Theta*0.7071872385170.1267391,355
30%W-Theta*0.053313487176.7601371,787
Theta*0.9830993658175.7588625,867
50%W-Theta*0.060754444186.6482492,251
Theta*0.6666343104180.2422705,835
Table 2. Map related information table.
Table 2. Map related information table.
Map TypeMap Size/m2Map NameNumber of ObstaclesMax Length Problem in Scenario
Baldurs Gate II80 × 80AR0304SR173479.42640686
AR0513SR207378.15432892
AR0709SR204875.01219330
City maps256 × 256Boston47,768379.5290039
Shanghai48,005359.75945129
Berlin47,540363.33304443
Warcaft III512 × 512Harvest moon114,594567.93311615
Scorched basin80,848507.51175995
Dusk wood127,229615.9625534
Table 3. Experimental data sheet for various algorithms on Baldurs Gate II map.
Table 3. Experimental data sheet for various algorithms on Baldurs Gate II map.
Map NameAlgorithmPathfinding Time/sNumber of Traversal NodesPath Length/mMemory Consumption/bitTotal Path Turning Angle/°
AR0304SRA*0.05377661185.4975249,720405.00
Dijkstra0.172302172097.0955252,208450.00
Theta*0.06530661181.3935335,867140.95
W-Theta*0.03378829082.6155222,792140.95
AR0513SRA*0.199933147386.1543307,2641170.00
Dijkstra0.217634206796.0955356,432540.00
Theta*0.213901147382.3920387,939183.73
W-Theta*0.06050544890.7401223,744121.00
AR0709SRA*0.07746973070.3553248,4081035.00
Dijkstra0.223962202682.7817353,456270.00
Theta*0.08723573067.0026329,115198.43
W-Theta*0.03022725368.0747210,064131.55
Table 4. Experimental data sheet for various algorithms on City maps.
Table 4. Experimental data sheet for various algorithms on City maps.
Map NameAlgorithmPathfinding Time/sNumber of Traversal NodesPath Length/mMemory Consumption/BitTotal Path Turning Angle/°
BostonA*15.29621616,573365.87212,425,2641035.00
Dijkstra42.92491647,688393.21024,925,4162250.00
Theta*15.50417816,573354.51032,792,580280.83
W-Theta*0.8920181576358.40901,225,072126.34
ShanghaiA*8.03456511,632344.52902,026,2802205.00
Dijkstra41.33772247,792354.47014,928,4722160.00
Theta*8.22600911,632332.02402,390,588488.93
W-Theta*0.5357001260333.60911,193,528268.15
BerlinA*18.94783522,984401.07322,948,5365985.00
Dijkstra42.74018447,043415.15644,882,7762250.00
Theta*19.21559722,984381.47923,320,892389.47
W-Theta*0.5800141251384.76101,205,720266.51
Table 5. Experimental data sheet for various algorithms on Warcaft III maps.
Table 5. Experimental data sheet for various algorithms on Warcaft III maps.
Map NameAlgorithmPathfinding Time/sNumber of Traversal NodesPath Length/mMemory Consumption/BitTotal Path Turning Angle/°
Harvest moonA*49.33287418,542506.61948,333,7522205.00
Dijkstra350.203546111,916515.732115,813,992810.00
Theta*50.73533518,542498.017610,988,924383.65
W-Theta*6.6656201812500.49106,990,296223.22
Scorched basinA*74.82493725,722470.93829,983,0803015.00
Dijkstra221.05192779,414490.820414,297,8481350.00
Theta*76.24174325,722452.972713,177,868466.23
W-Theta*8.9084041684456.83088,061,688318.81
Dusk woodA*84.91070531,517521.42348,925,4562250.00
Dijkstra373.709195123,031556.217416,260,7041170.00
Theta*86.417215131,517501.889411,362,259329.87
W-Theta*8.6427833077509.56986,645,664204.20
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zhang, Y.; Hu, Y.; Lu, J.; Shi, Z. Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm. Algorithms 2022, 15, 477. https://doi.org/10.3390/a15120477

AMA Style

Zhang Y, Hu Y, Lu J, Shi Z. Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm. Algorithms. 2022; 15(12):477. https://doi.org/10.3390/a15120477

Chicago/Turabian Style

Zhang, Yi, Yunchuan Hu, Jiakai Lu, and Zhiqiang Shi. 2022. "Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm" Algorithms 15, no. 12: 477. https://doi.org/10.3390/a15120477

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop