Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm
Abstract
:1. Introduction
1.1. Research Background
1.2. Related Work
2. Algorithm Design
2.1. Theta* Algorithm
- 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.
- 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 . Go to the next step.
- Determine whether the current node 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 . Iterate over all neighboring nodes of node (set to ) and perform the following operations.
- If node is an obstacle or is already in the close table, do not process it; instead proceed to the next step.
- If node is not in the open list, initialize the actual cost from the starting point to node to infinity, set its parent node to NULL, and insert node into the open table. If node is in the open list, proceed directly to the next step.
- Update the information of the node. Check if the parent node (set to ) of the current node exists. If it exists, check whether node and node are visible by line of sight (LOS) function [13]. If the two nodes are visible and the of node plus the generation value from node to node is less than the of node , the parent of node is updated to node , and the of node is updated to the of node , plus the generation value from node to node . If the two nodes are not visible and the of node plus the cost from node to node is less than the , then the parent node of node is updated to node and of node is updated to of node plus the generation value from node to node .
- The original of node 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 is recalculated and the information related to node in the open table is updated.
- Remove the already traversed node from the open table and add it to the close table, then return to step 2.
Algorithm 1. Theta* algorithm. |
Input: start point:{sstart}, map arrays:{map}, goal point:{sgoal} |
Output: algorithm planning path: {path} |
1: } 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 do 6: s ≔ open.Pop() 7: if s = sgoal then 8: return path 9: end if 10: {s} 11: nghbrvis(s) do 12: closed then 13: open then 14: 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 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
- 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:
- If the cost function of the current node 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 , 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 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:
- By adding a weight to the heuristic function 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:
2.3. Trajectory Optimization
3. Simulation
3.1. W-Theta* Algorithm Stability Test Experiment
3.2. Experiment of Comparing W-Theta* Algorithm with Other Algorithms
4. Conclusions
- 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
Funding
Data Availability Statement
Conflicts of Interest
References
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- 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]
- Qinming, H.; Jingang, W.; Xiaojun, Z. Optimized Parallel Parking Path Planning Based on Quintic Polynomial. Comput. Eng. Appl. 2022, 58, 8. [Google Scholar]
- 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]
- 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]
- 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]
Map Size/m2 | Obstacle Density | Algorithm | Pathfinding Time/s | Number of Traversal Nodes | Path Length/m | Memory Consumption/Bit |
---|---|---|---|---|---|---|
40 × 40 | 10% | W-Theta* | 0.017162 | 181 | 56.2899 | 39,483 |
Theta* | 0.030727 | 199 | 56.2899 | 40,971 | ||
30% | W-Theta* | 0.013585 | 190 | 58.7589 | 55,331 | |
Theta* | 0.020874 | 314 | 57.7190 | 65,555 | ||
50% | W-Theta* | 0.025756 | 205 | 63.0570 | 71,531 | |
Theta* | 0.068320 | 518 | 62.2417 | 96,451 | ||
80 × 80 | 10% | W-Theta* | 0.031979 | 378 | 114.4009 | 121,179 |
Theta* | 0.229164 | 1045 | 115.6518 | 183,179 | ||
30% | W-Theta* | 0.029807 | 343 | 118.3512 | 177,675 | |
Theta* | 0.199758 | 1344 | 115.8627 | 258,171 | ||
50% | W-Theta* | 0.037211 | 356 | 130.7473 | 234,675 | |
Theta* | 0.221151 | 1731 | 123.3626 | 344,867 | ||
120 × 120 | 10% | W-Theta* | 0.054977 | 570 | 170.3327 | 246,419 |
Theta* | 0.707187 | 2385 | 170.1267 | 391,355 | ||
30% | W-Theta* | 0.053313 | 487 | 176.7601 | 371,787 | |
Theta* | 0.983099 | 3658 | 175.7588 | 625,867 | ||
50% | W-Theta* | 0.060754 | 444 | 186.6482 | 492,251 | |
Theta* | 0.666634 | 3104 | 180.2422 | 705,835 |
Map Type | Map Size/m2 | Map Name | Number of Obstacles | Max Length Problem in Scenario |
---|---|---|---|---|
Baldurs Gate II | 80 × 80 | AR0304SR | 1734 | 79.42640686 |
AR0513SR | 2073 | 78.15432892 | ||
AR0709SR | 2048 | 75.01219330 | ||
City maps | 256 × 256 | Boston | 47,768 | 379.5290039 |
Shanghai | 48,005 | 359.75945129 | ||
Berlin | 47,540 | 363.33304443 | ||
Warcaft III | 512 × 512 | Harvest moon | 114,594 | 567.93311615 |
Scorched basin | 80,848 | 507.51175995 | ||
Dusk wood | 127,229 | 615.9625534 |
Map Name | Algorithm | Pathfinding Time/s | Number of Traversal Nodes | Path Length/m | Memory Consumption/bit | Total Path Turning Angle/° |
---|---|---|---|---|---|---|
AR0304SR | A* | 0.053776 | 611 | 85.4975 | 249,720 | 405.00 |
Dijkstra | 0.172302 | 1720 | 97.0955 | 252,208 | 450.00 | |
Theta* | 0.065306 | 611 | 81.3935 | 335,867 | 140.95 | |
W-Theta* | 0.033788 | 290 | 82.6155 | 222,792 | 140.95 | |
AR0513SR | A* | 0.199933 | 1473 | 86.1543 | 307,264 | 1170.00 |
Dijkstra | 0.217634 | 2067 | 96.0955 | 356,432 | 540.00 | |
Theta* | 0.213901 | 1473 | 82.3920 | 387,939 | 183.73 | |
W-Theta* | 0.060505 | 448 | 90.7401 | 223,744 | 121.00 | |
AR0709SR | A* | 0.077469 | 730 | 70.3553 | 248,408 | 1035.00 |
Dijkstra | 0.223962 | 2026 | 82.7817 | 353,456 | 270.00 | |
Theta* | 0.087235 | 730 | 67.0026 | 329,115 | 198.43 | |
W-Theta* | 0.030227 | 253 | 68.0747 | 210,064 | 131.55 |
Map Name | Algorithm | Pathfinding Time/s | Number of Traversal Nodes | Path Length/m | Memory Consumption/Bit | Total Path Turning Angle/° |
---|---|---|---|---|---|---|
Boston | A* | 15.296216 | 16,573 | 365.8721 | 2,425,264 | 1035.00 |
Dijkstra | 42.924916 | 47,688 | 393.2102 | 4,925,416 | 2250.00 | |
Theta* | 15.504178 | 16,573 | 354.5103 | 2,792,580 | 280.83 | |
W-Theta* | 0.892018 | 1576 | 358.4090 | 1,225,072 | 126.34 | |
Shanghai | A* | 8.034565 | 11,632 | 344.5290 | 2,026,280 | 2205.00 |
Dijkstra | 41.337722 | 47,792 | 354.4701 | 4,928,472 | 2160.00 | |
Theta* | 8.226009 | 11,632 | 332.0240 | 2,390,588 | 488.93 | |
W-Theta* | 0.535700 | 1260 | 333.6091 | 1,193,528 | 268.15 | |
Berlin | A* | 18.947835 | 22,984 | 401.0732 | 2,948,536 | 5985.00 |
Dijkstra | 42.740184 | 47,043 | 415.1564 | 4,882,776 | 2250.00 | |
Theta* | 19.215597 | 22,984 | 381.4792 | 3,320,892 | 389.47 | |
W-Theta* | 0.580014 | 1251 | 384.7610 | 1,205,720 | 266.51 |
Map Name | Algorithm | Pathfinding Time/s | Number of Traversal Nodes | Path Length/m | Memory Consumption/Bit | Total Path Turning Angle/° |
---|---|---|---|---|---|---|
Harvest moon | A* | 49.332874 | 18,542 | 506.6194 | 8,333,752 | 2205.00 |
Dijkstra | 350.203546 | 111,916 | 515.7321 | 15,813,992 | 810.00 | |
Theta* | 50.735335 | 18,542 | 498.0176 | 10,988,924 | 383.65 | |
W-Theta* | 6.665620 | 1812 | 500.4910 | 6,990,296 | 223.22 | |
Scorched basin | A* | 74.824937 | 25,722 | 470.9382 | 9,983,080 | 3015.00 |
Dijkstra | 221.051927 | 79,414 | 490.8204 | 14,297,848 | 1350.00 | |
Theta* | 76.241743 | 25,722 | 452.9727 | 13,177,868 | 466.23 | |
W-Theta* | 8.908404 | 1684 | 456.8308 | 8,061,688 | 318.81 | |
Dusk wood | A* | 84.910705 | 31,517 | 521.4234 | 8,925,456 | 2250.00 |
Dijkstra | 373.709195 | 123,031 | 556.2174 | 16,260,704 | 1170.00 | |
Theta* | 86.4172151 | 31,517 | 501.8894 | 11,362,259 | 329.87 | |
W-Theta* | 8.642783 | 3077 | 509.5698 | 6,645,664 | 204.20 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
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
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 StyleZhang, 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
APA StyleZhang, Y., Hu, Y., Lu, J., & Shi, Z. (2022). Research on Path Planning of Mobile Robot Based on Improved Theta* Algorithm. Algorithms, 15(12), 477. https://doi.org/10.3390/a15120477