Research on Path Planning for Robots with Improved A* Algorithm under Bidirectional JPS Strategy
Abstract
:1. Introduction
- Improve the heuristic function of the A* algorithm: firstly, utilize the Octile distance formula instead of the commonly used distance formula to approximate the predicted cost of the heuristic function to the actual path length. Afterward, environmental constraints, i.e., the percentage of obstacles, are introduced to make the algorithm adaptive to the changes of the environmental map;
- Incorporating a bidirectional JPS search strategy: the searched jump points are added to OpenList for access and expansion. This replaces the need to access and compute a large number of neighboring nodes in the A* algorithm, thereby reducing memory consumption and significantly accelerating the path search speed through a bidirectional search strategy;
- Further optimize the generated paths: first reduce the number of redundant nodes on the paths, then eliminate unnecessary inflection points on the paths, and, finally, smooth the paths further using the dynamic circular cutting method to improve the turning angles of the paths.
2. Traditional A* Algorithm
2.1. Modeling of Grid Maps
2.2. Traditional A* Algorithm
3. Improved A* Algorithm
3.1. Improvement of the Heuristic Function
3.1.1. Selection of Heuristic Function
3.1.2. Introduction of Environmental Constraints
3.2. Combining the Bidirectional JPS Algorithm
3.2.1. Traditional JPS Algorithm
- When moving horizontally, the natural neighbor node n satisfies the following equation:
- When moving diagonally, the natural neighbor node n satisfies the following equation:
- n is not a natural neighbor of node x;
- n satisfies the following equation:
- If node n is a starting or goal point, then n is a jump point;
- If node n has at least one forced neighbor, then n is a jump point;
- A node n is a jump point if the parent node P(x) is in a diagonal direction from node n and n has nodes in the horizontal or vertical directions that satisfy conditions (1) and (2) above.
3.2.2. Bidirectional JPS Algorithm
- Create four lists, OpenList1, OpenList2, CloseList1, and CloseList2. Place node s into OpenList1 and node g into OpenList2;
- Start the bidirectional search; during the forward search, place jump point a into OpenList1; during the reverse search, place jump point b into OpenList2. Place node s into CloseList1 and node g into CloseList2;
- Continuing the forward search with a as the current node yields jump points c and d, which are added to OpenList1. In the reverse search, jump point e is found for b and added to OpenList2. Nodes a and b are placed into CloseList1 and CloseList2, respectively;
- Since d is the node with the smallest value of f(n) in OpenList1, the forward search expands d to obtain jump points e and f, which are added to OpenList1. In the reverse search, jump point h is found for e and added to OpenList2. Nodes d and e are placed into CloseList1 and CloseList2, respectively;
- Node e has the smallest value of f(n) in OpenList1, so e is selected as the current node for forward expansion. Since e exists in CloseList2, the path search is successful.
3.3. Path Smoothing
3.3.1. Primary Smoothing
- Plan the optimal path using the improved algorithm and save information such as the path length and number of nodes;
- Create a collection of path nodes, R = {}, i [0, n], where is the start node, is the goal node, and , …, are the intermediate nodes;
- Determine whether the vectors and formed by points , , and are parallel using the principle of vector parallelism. If they are parallel, the three points are collinear, and the redundant node is removed. If they are not parallel, then the three points are not collinear, and there is no redundant node. If node is removed, then continue to evaluate nodes , , and to determine whether they are collinear. Otherwise, evaluate nodes , , and for collinearity. Repeat this process until no more collinear nodes exist in the path. Create a new set P of path nodes and add the reserved nodes to set P. Set P = {}, j [0, m], where is the start node, is the goal node, and , …, are the intermediate nodes;
- Create the set K of nodes that the path must pass through. Add to set K and consider as the current point for evaluation. First, connect nodes and to determine whether the straight line segment passes through obstacles. If it does not, is considered a viable path, and one should add to set K. If is obstructed, connect to and continue the evaluation. If is clear, add to set K. If is obstructed, connect to and continue evaluating. Continue this process until the must-pass node is identified and added to set K. Then, use as the current point and repeat the evaluation process. Repeat these steps until is added to set K;
- Connect the nodes extracted from set K sequentially; the resulting path is the path after one smoothing. The schematic diagram of the redundant node removal process is shown in Figure 11.
3.3.2. Quadratic Smoothing
- Determine whether all the turning corners have been smoothed. If yes, the secondary smoothing is completed; otherwise, continue with step 1.
4. Simulation Analysis and Experimental Validation
4.1. Simulation Analysis
4.2. Experimental Validation
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Qu, D.K.; Du, Z.J.; Xu, D.G.; Xu, F. Research on Path Planning for a Mobile Robot. J. Robot. 2008, 30, 97–101+106. [Google Scholar]
- Cui, W.; Zhu, F.Z. Review of Path Planning Algorithms for Robot Navigation. J. Comput. Eng. Appl. 2023, 59, 10–20. [Google Scholar]
- Xu, Y.; Guan, G.F.; Song, Q.W.; Jiang, C.; Wang, L.H. Heuristic and random search algorithm in optimization of route planning for Robot’s geomagnetic navigation. J. Comput. Commun. 2020, 154, 7–12. [Google Scholar] [CrossRef]
- Zhi, C.B.; Zhang, A.J.; Du, X.Y.; Peng, P. Research on Global Path Planning of Mobile Robot Based on Improved A* Algorithm. J. Comput. Simul. 2023, 40, 486–491. [Google Scholar]
- Qi, F.L.; Wang, X.Q.; Zhang, W.Y. Research on AGV Obstacle Avoidance Path Planning Based on Improved A* Algorithm. J. Mach. Tool Hydraul. 2023, 51, 34–39. [Google Scholar]
- Chen, C. Research on Robot Shortest Path Planning with Improved A* Algorithm. J. Comput. Digit. Eng. 2023, 51, 1697–1701. [Google Scholar]
- Zhong, X.Y.; Tian, J.; Hu, H.S.; Peng, X.F. Hybrid Path Planning Based on Safe A* Algorithm and Adaptive Window Approach for Mobile Robot in Large-Scale Dynamic Environment. J. Intell. Robot. Syst. 2020, 99, 65–77. [Google Scholar] [CrossRef]
- Sang, T.T.; Xiao, J.C.; Xiong, J.F.; Xia, H.Y.; Wang, Z.Z. Path Planning Method of Unmanned Surface Vehicles Formation Based on Improved A* Algorithm. J. Mar. Sci. Eng. 2023, 11, 176. [Google Scholar] [CrossRef]
- Huang, C.J. Robot Path Planning Design Based on Improved Ant Colony Algorithm. J. Value Eng. 2023, 42, 51–53. [Google Scholar]
- Fu, Q.; Ning, Y.K.; Ji, Y.F.; Sun, X.Y. Path Planning Based on Improved RRT and DWA Fusion Algorithm. J. Comput. Simul. 2023, 40, 429–435. [Google Scholar]
- Wang, Y.; He, T.; Silva, P. Wide-band high-accuracy ADC using segmented DAC with DWA and mismatch shaping. J. Electron. Lett. 2017, 53, 713–714. [Google Scholar] [CrossRef]
- Gao, F.X.; Hao, W.J.; Wu, Y.; Sun, C. Research on Robot Obstacle Avoidance Path Planning Based on Improved Artificial Potential Field Method. J. Comput. Simul. 2023, 40, 431–436+442. [Google Scholar]
- Zhang, M.; Wu, Y.Z. Optimization of transfer robot path planning based on A* algorithm. J. Mod. Electron. Tech. 2023, 46, 135–139. [Google Scholar]
- Gong, Y.X.; Liu, G.H.; Zhang, W.K.; Yu, D.Y.; Cui, Y.X.; Shen, Z.B. Path Planning Method of Improving A* Algorithm Using Convex Corner. J. Comput. Eng. Appl. 2023, 59, 309–315. [Google Scholar]
- Harabor, D.; Grastien, A. The JPS pathfinding system. In Proceedings of the 5th Annual Symposium on Combinatorial Search, Niagara Falls, ON, Canada, 19–21 July 2012. [Google Scholar]
- Zhao, X.; Wang, Z.; Huang, C.K.; Zhao, Y.W. Mobile Robot Path Planning Based on an Improved A*Algorithm. J. Robot. 2018, 40, 903–910. [Google Scholar]
- Lv, T.Z.; Zhao, C.X.; Xia, P.P. Global path planning based on simultaneous visibility graph construction and A* algorithm. J. Nanjing Univ. Sci. Technol. 2017, 41, 313–321. [Google Scholar]
- Jeddisaravi, K.; Alitappeh, J.R.; Pimenta, A.C.L.; Guimarães, G.F. Multi-objective approach for robot motion planning in search tasks. J. Appl. Intell. 2016, 45, 305–321. [Google Scholar] [CrossRef]
- Zhang, W.M.; Zhang, Y.; Zhang, H. Path planning of coal mine rescue robot based on improved A*algorithm. J. Coal Geol. Explor. 2022, 50, 185–193. [Google Scholar]
- Harabor, D.; Grastien, A. Online graph pruning for pathfinding on grid maps. In Proceedings of the 25th AAAI Conference on Artificial Intelligence, Menlo Park, CA, USA, 7–11 August 2011. [Google Scholar]
Map Size | Experimental Algorithms | Number of Nodes Traversed (Number) | Path Length (Meters) | Number of Turns (Times) | Search Time (Seconds) | Percentage of Obstacles |
---|---|---|---|---|---|---|
20 × 20 | A* algorithm | 77 | 24.7279 | 7 | 0.233068 | 30% |
JPS algorithm | 20 | 24.7279 | 7 | 0.157325 | ||
Improved algorithm | 26 | 24.1381 | 6 | 0.115842 | ||
40 × 40 | A* algorithm | 326 | 61.0122 | 17 | 0.707153 | |
JPS algorithm | 39 | 61.0122 | 17 | 0.386459 | ||
Improved algorithm | 32 | 58.0070 | 10 | 0.268241 | ||
60 × 60 | A* algorithm | 290 | 88.3259 | 11 | 1.101714 | |
JPS algorithm | 38 | 88.3259 | 11 | 0.549135 | ||
Improved algorithm | 30 | 93.5291 | 6 | 0.345265 | ||
80 × 80 | A* algorithm | 836 | 131.6396 | 21 | 3.334070 | |
JPS algorithm | 51 | 131.6396 | 21 | 1.585116 | ||
Improved algorithm | 52 | 134.3342 | 15 | 0.912868 | ||
100 × 100 | A* algorithm | 876 | 160.5097 | 23 | 5.128762 | |
JPS algorithm | 55 | 160.5097 | 23 | 2.237949 | ||
Improved algorithm | 48 | 159.7931 | 16 | 1.109351 |
Map Size | Experimental Algorithms | Number of Nodes Traversed (Number) | Path Length (Meters) | Number of Turns (Times) | Search Time (Seconds) | Percentage of Obstacles |
---|---|---|---|---|---|---|
20 × 20 | A* algorithm | 131 | 29.3137 | 12 | 0.448762 | 70% |
JPS algorithm | 40 | 30.7279 | 9 | 0.379653 | ||
Improved algorithm | 57 | 30.2587 | 9 | 0.331437 | ||
40 × 40 | A* algorithm | 183 | 62.6274 | 25 | 1.247487 | |
JPS algorithm | 79 | 62.6274 | 25 | 0.956823 | ||
Improved algorithm | 125 | 60.3749 | 18 | 0.757804 | ||
60 × 60 | A* algorithm | 280 | 100.7696 | 34 | 2.161697 | |
JPS algorithm | 86 | 100.7696 | 32 | 1.513218 | ||
Improved algorithm | 128 | 99.3118 | 29 | 1.027475 | ||
80 × 80 | A* algorithm | 694 | 136.9117 | 31 | 4.919608 | |
JPS algorithm | 113 | 136.9117 | 31 | 3.414556 | ||
Improved algorithm | 132 | 134.7762 | 24 | 2.055904 | ||
100 × 100 | A* algorithm | 791 | 173.3970 | 35 | 7.117738 | |
JPS algorithm | 127 | 173.3970 | 35 | 4.593951 | ||
Improved algorithm | 144 | 169.9316 | 27 | 2.378748 |
A* Algorithm | JPS Algorithm | The Algorithms in This Paper | |
---|---|---|---|
Path length/m | 16.8 | 16.7 | 16.5 |
Search time/ms | 267.89 | 84.43 | 56.25 |
A* Algorithm | JPS Algorithm | The Algorithms in This Paper | |
---|---|---|---|
Path length/m | 14.7 | 14.7 | 15.0 |
Search time/ms | 217.43 | 78.10 | 45.47 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Wang, F.; Sun, W.; Yan, P.; Wei, H.; Lu, H. Research on Path Planning for Robots with Improved A* Algorithm under Bidirectional JPS Strategy. Appl. Sci. 2024, 14, 5622. https://doi.org/10.3390/app14135622
Wang F, Sun W, Yan P, Wei H, Lu H. Research on Path Planning for Robots with Improved A* Algorithm under Bidirectional JPS Strategy. Applied Sciences. 2024; 14(13):5622. https://doi.org/10.3390/app14135622
Chicago/Turabian StyleWang, Fujie, Wei Sun, Pengfei Yan, Hongmei Wei, and Huishan Lu. 2024. "Research on Path Planning for Robots with Improved A* Algorithm under Bidirectional JPS Strategy" Applied Sciences 14, no. 13: 5622. https://doi.org/10.3390/app14135622
APA StyleWang, F., Sun, W., Yan, P., Wei, H., & Lu, H. (2024). Research on Path Planning for Robots with Improved A* Algorithm under Bidirectional JPS Strategy. Applied Sciences, 14(13), 5622. https://doi.org/10.3390/app14135622