Global Path Planning of Unmanned Surface Vehicle Based on Improved A-Star Algorithm
Abstract
:1. Introduction
- Based on the conventional A-star algorithm evaluation function, we introduced a vertical distance node deviation factor based on the line connecting the initial point and the goal point to improve the heuristic function.
- We adopted the bidirectional search strategy to traverse the nodes from the initial point and the goal point at the same time.
- We smoothed the shortest path obtained from the planning combined with the B spline curve.
2. Conventional A-Star Algorithm
2.1. Establishment of Environmental Mode
2.2. Selection of Search Neighborhood
2.3. Theory of Conventional A-Star Algorithm
- Initialization: initialize the initial point, the goal point, an open list, and a closed list. The Open list and the Closed list denote nodes that have been considered but not yet searched and nodes that have been searched, respectively. The initial point is placed in the Open list, its evaluation function f(n) is set to 0, and the parent node is set to null. Moreover, set the Closed list to empty.
- Iterative search: the node n with the smallest f(n) is taken out from the Open list each time and put into the Closed list. if n is the goal point, the algorithm terminates. Otherwise, all neighboring nodes of n are processed as follows:
- (1)
- If the neighboring node is already in the Closed list, ignore and skip.
- (2)
- If the neighboring node is not in the Open list, add it to the Open list and set its parent node to n. Moreover, calculate the evaluation function value of this neighboring node.
- (3)
- If the neighboring node is already in the Open list, compare the current evaluation function value of the neighboring node with the newly calculated evaluation function value. If the new value is smaller, update the parent node of the neighboring node to n and update its evaluation function value.
- Judge and terminate the search: when each node is traversed, judge whether the current node is the goal point, if so, indicate that the shortest path has been found, and terminate the search; if the Open list is empty, the goal point cannot be reached, the search fails, and terminate the search.
- Backtracking path: start from the goal point and follow the information of the parent node back to the initial point to get the shortest path.
3. Improved A-Star Algorithm
3.1. Improving the Evaluation Function
3.2. Introducing the Bidirectional Search Strategy
3.3. Smoothing the Planned Path
3.4. Process and Pseudo-Code of the Improved A-Star Algorithm
4. Simulation Experiment and Analysis
5. Conclusions
- This paper aims to provide a new path planning algorithm for the surface unmanned ship, but in the improvement process, mainly based on the theory of the conventional A-star algorithm method to optimize appropriately, for the unmanned ship kinematics parameters and other considerations are not well thought out, although the simulation experiment proves the algorithm’s superiority, but in the actual use of the unmanned ship characteristics need to be taken into account to make the appropriate adjustments.
- This paper verifies the algorithm as a simulation experiment, which theoretically verifies the feasibility of the algorithm. However, in the actual use of the unmanned ship, it will be affected by the environment and other comprehensive factors, so the reliability of the unmanned ship is required to be higher. Simulation experiments alone may not be able to meet the requirements of actual use, therefore, the subsequent need to carry out relevant real ship experiments to further verify the reliability of the algorithm.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
# Pseudo-code for bidirectional search A-star algorithm def bidirectional_a_star(start, goal): # Initialize forward search and reverse search open_set_forward = PriorityQueue() open_set_reverse = PriorityQueue() open_set_forward.put(start, 0) open_set_backward.put(goal, 0) # Initialize the distance dictionary for forward search and reverse search g_score_forward = {start: 0} g_score_reverse = {goal: 0} # Initialize a dictionary of parent nodes for forward search and reverse searche parent_forward = {start: None} parent_reverse = {goal: None} # Start searching while not open_set_forward.empty() and not open_set_reverse.empty(): # Selecting the next node from forward search for expansion current_forward = open_set_forward.get() # If the current node is already in the CLOSED set of the reverse search, find the path if current_forward in open_set_reverse: # Construct path path = construct_path(current_forward, parent_forward, parent_reverse) return path # Selecting the next node from reverse search for expansion current_reverse = open_set_reverse.get() # If the current node is already in the Closed set of the forward search, find the path if current_reverse in open_set_forward: # Construct path path = construct_path(current_reverse, parent_forward, parent_reverse) return path # Expanding nodes in forward search for neighbor_forward in get_neighbors(current_forward): # Calculate the new g value g_score_new_forward = g_score_forward[current_forward] + distance(current_forward, neighbor_forward) if neighbor_forward not in g_score_forward or g_score_new_forward < g_score_forward[neighbor_forward]: # Update g value and parent node g_score_forward[neighbor_forward] = g_score_new_forward parent_forward[neighbor_forward] = current_forward # Calculate the heuristic function value h_score_forward = heuristic(neighbor_forward, goal) # Calculate the f value f_score_forward = g_score_new_forward + h_score_forward # If the node is not in the Open set, add it to the set if neighbor_forward not in open_set_forward: open_set_forward.put(neighbor_forward, f_score_forward) # Expanding nodes in reverse search for neighbor_reverse in get_neighbors(current_reverse): # Calculate the new g value g_score_new_reverse = g_score_reverse[current_reverse] + distance(current_reverse, neighbor_reverse) if neighbor_reverse not in g_score_reverse or g_score_new_reverse < g_score_reverse[neighbor_reverse]: # Update g value and parent node g_score_reverse[neighbor_reverse] = g_score_new_reverse parent_reverse[neighbor_reverse] = current_reverse # Calculate the heuristic function value h_score_reverse = heuristic(neighbor_reverse, start) # Calculate the f value f_score_reverse = g_score_new_reverse + h_score_reverse # If the node is not in the Open set, add it to the set if neighbor_reverse not in open_set_reverse: open_set_reverse.put(neighbor_reverse, f_score_reverse) # Unable to find path return None # Reconstruct path def reconstruct_path(node, parent_forward, parent_reverse): path = [] while node is not None: path.append(node) node = parent_forward[node] path.reverse() node = parent_reverse[path[−1]] while node is not None: path.append(node) node = parent_reverse[node] return path # Pseudo-code for path smoothing of cubic quasi-uniform B spline curve def smooth_path(path): if len(path) < 3: return path smoothed_path = [path[0]] for i in range(1, len(path) − 1): prev_point = path[i − 1] current_point = path[i] next_point = path[i + 1] # Path smoothing using cubic quasi-uniform B spline curve smoothed_point = (prev_point[0]/6.0 + 2*current_point[0]/3.0 + next_point[0]/6.0, prev_point[1]/6.0 + 2*current_point[1]/3.0 + next_point[1]/6.0) smoothed_path.append(smoothed_point) smoothed_path.append(path[−1]) return smoothed_path |
References
- Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math. 1959, 1, 269–271. [Google Scholar] [CrossRef] [Green Version]
- Hart, P.E.; Nilsson, N.J.; Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. 1968, 4, 100–107. [Google Scholar] [CrossRef]
- Kavraki, L.E.; Svestka, P.; Latombe, J.C.; Overmars, M.H. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE Trans. Robot. Autom. 1996, 12, 566–580. [Google Scholar] [CrossRef] [Green Version]
- Lavalle, S.M. Rapidly-Exploring Random Trees: A New Tool for Path Planning; Research Report TR 98-11; 1998. [Google Scholar]
- Dorigo, M.; Caro, G.D.; Gambardella, L.M. Ant algorithms for discrete optimization. Artif. Life 1999, 5, 137–172. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
- Martins, O.O.; Adefemi, A.A.; Olatayo, M.O.; Olalekan, B.B. An Improved Multi-Objective A-star Algorithm for Path Planning in a Large Workspace: Design, Implementation, and Evaluation. Sci. Afr. 2021; prepublish. [Google Scholar] [CrossRef]
- Hong, Y.; Kim, S.; Kim, Y.; Cha, J. Quadrotor path planning using A-star search algorithm and minimum snap trajectory generation. ETRI J. 2021, 43, 1013–1023. [Google Scholar] [CrossRef]
- Lima, J.; Costa, P.; Costa, P.; Eckert, L.; Piardi, L.; Moreira, A.P.; Nakano, A. A-star search algorithm optimization path planning in mobile robots scenarios. AIP Conf. Proc. 2019, 2116, 220005. [Google Scholar] [CrossRef]
- Yue, G.; Zhang, M.; Shen, C.; Guan, X. Bi-directional smooth A-star algorithm for navigation planning of mobile robots. Sci. Sin. (Technol.) 2021, 51, 459–468. [Google Scholar] [CrossRef]
- Zhao, C.; Jiang, H.; Xu, M.; Man, W.; Yang, W.; Chen, F. Application of improved A-star algorithm in unmanned ship path planning. J. Zhejiang Univ. Technol. 2022, 50, 615–620. [Google Scholar]
- Shu, W.; Zhao, J.; Xie, Z.; Zhang, X.; Ma, X. Path planning for unmanned surface vessels based on improved A-star algorithm. J. Shanghai Marit. Univ. 2022, 43, 1–6. [Google Scholar]
- Chen, X.; Yuan, Y.-H.; Rao, D. Improved A-star Algorithm and Its Application in Path Planning of Unmanned Surface Vehicle. Comput. Simul. 2021, 38, 277–281. [Google Scholar]
- Zhuang, J.; Wan, L.; Miu, Y. Global Path Planning of Unmanned Surface Vehicle Based on Electronic Chart. Comput. Sci. 2011, 38, 211–214, 219. [Google Scholar]
- Chen, D.; Liu, X.; Liu, S. Improved A-star algorithm based on the two-way search for path planning of automated guided vehicle. J. Comput. Appl. 2021, 41, 309–313. [Google Scholar]
- Wang, S.; Tan, G.; Jiang, Q. Path Planning for Mobile Robot Based on Improved A-star Algorithm. Comput. Simul. 2021, 38, 386–389+404. [Google Scholar]
- Jiang, Y.; Zhang, Y. Improved path planning of A* algorithm of domain node search strategy 8. J. Electron. Meas. Instrum. 2022, 36, 234–241. [Google Scholar] [CrossRef]
- Elbanhawi, M.; Simic, M.; Jazar, R. Jazarr Randomized Bidirectional B-Spline Parameterization Motion Planning. IEEE Trans. Intell. Transp. Syst. 2016, 17, 406–419. [Google Scholar] [CrossRef]
- Liu, D.; Gu, D.; Smyl, D.; Deng, J.; Du, J. B-Spline-Based Sharp Feature Preserving Shape Reconstruction Approach for Electrical Impedance Tomography. IEEE Trans. Med. Imaging 2019, 38, 2533–2544. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Method | Map Size/m | Coordinates of Starting Point and Target Point | Total Number of Nodes Traversed | Improving Ratio | Number of Path Inflection Points | Improving Ratio | Maximum Vertical Distance | Improving Ratio | Algorithm Computation Time/s | Improving Ratio | Length of Path/m | Improving Ratio |
---|---|---|---|---|---|---|---|---|---|---|---|---|
A* algorithm | 30 × 30 | (5, 25) | 174 | 12 | 2.83 | 1.878 | 33.4 | |||||
(25, 5) | ||||||||||||
Improving evaluation function | 30 × 30 | (5, 25) | 155 | 10.9% | 10 | 16.7% | 2.12 | 25.1% | 1.806 | 3.8% | 29.7 | 11.1% |
(25, 5) | ||||||||||||
Bidirectional search | 30 × 30 | (5, 25) | 102 | 41.4% | 11 | 8.3% | 2.83 | 0% | 1.533 | 18.4% | 34.7 | −3.9% |
(25, 5) |
Map Name | Map Size/m | Coordinates of Starting Point and Target Point | Total Number of Nodes Traversed | Improving Ratio | Number of Path Inflection Points | Improving Ratio | Maximum Vertical Distance | Improving Ratio | |||
---|---|---|---|---|---|---|---|---|---|---|---|
A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | ||||||
Map1 | 40 × 40 | (3, 37) | 342 | 210 | 37.6% | 7 | 15 | −114.3% | 7.071 | 6.364 | 10.0% |
(37, 3) | |||||||||||
Map2 | 60 × 60 | (5, 55) | 611 | 225 | 63.2% | 24 | 20 | 16.7% | 19.799 | 18.385 | 7.1% |
(55, 5) | |||||||||||
Map3 | 80 × 80 | (5, 75) | 759 | 241 | 68.2% | 10 | 7 | 30.0% | 4.243 | 4.243 | 0.0% |
(75, 5) |
Map Name | Map Size/m | Coordinates of Starting Point and Target Point | Algorithm Computation Time/s | Improving Ratio | Length of Path/m | Improving Ratio | ||||
---|---|---|---|---|---|---|---|---|---|---|
A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | Path Smoothing | ||||||
Map1 | 40 × 40 | (3, 37) | 2.723 | 2.017 | 25.9% | 59.7 | 57.5 | 51.1 | 3.7% | 14.4% |
(37, 3) | ||||||||||
Map2 | 60 × 60 | (5, 55) | 4.683 | 2.673 | 42.9% | 83.4 | 80.5 | 74.2 | 3.5% | 11.0% |
(55, 5) | ||||||||||
Map3 | 80 × 80 | (5, 75) | 7.953 | 3.878 | 52.4% | 112.5 | 109.1 | 100.5 | 3.0% | 10.7% |
(75, 5) |
Map Name | Map Size/m | Coordinates of Starting Point and Target Point | Total Number of Nodes Traversed | Improving Ratio | Number of Path Inflection Points | Improving Ratio | Maximum Vertical Distance | Improving Ratio | |||
---|---|---|---|---|---|---|---|---|---|---|---|
A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | ||||||
Map3 | 80 × 80 | (5, 75) | 759 | 241 | 68.2% | 10 | 7 | 30.0% | 4.243 | 4.243 | 0.0% |
(75, 5) | |||||||||||
Map3 | 80 × 80 | (15, 10) | 728 | 179 | 75.4% | 32 | 11 | 65.6% | 7.49 | 6.66 | 11.1% |
(75, 50) | |||||||||||
Map3 | 80 × 80 | (15, 63) | 342 | 103 | 69.9% | 10 | 9 | 10.0% | 10.19 | 8.613 | 15.5% |
(65, 20) |
Map Name | Map Size/m | Coordinates of Starting Point and Target Point | Algorithm Computation Time/s | Improving Ratio | Length of Path/m | Improving Ratio | ||
---|---|---|---|---|---|---|---|---|
A* Algorithm | Improved A* Algorithm | A* Algorithm | Improved A* Algorithm | |||||
Map3 | 80 × 80 | (5, 75) | 7.953 | 3.878 | 52.4% | 112.5 | 109.1 | 3.0% |
(75, 5) | ||||||||
Map3 | 80 × 80 | (15, 10) | 5.987 | 3.010 | 49.7% | 80.0 | 77.5 | 3.1% |
(75, 50) | ||||||||
Map3 | 80 × 80 | (15, 63) | 4.246 | 2.226 | 47.6% | 72.5 | 70.1 | 3.3% |
(65, 20) |
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. |
© 2023 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, H.; Tao, Y.; Zhu, W. Global Path Planning of Unmanned Surface Vehicle Based on Improved A-Star Algorithm. Sensors 2023, 23, 6647. https://doi.org/10.3390/s23146647
Zhang H, Tao Y, Zhu W. Global Path Planning of Unmanned Surface Vehicle Based on Improved A-Star Algorithm. Sensors. 2023; 23(14):6647. https://doi.org/10.3390/s23146647
Chicago/Turabian StyleZhang, Huixia, Yadong Tao, and Wenliang Zhu. 2023. "Global Path Planning of Unmanned Surface Vehicle Based on Improved A-Star Algorithm" Sensors 23, no. 14: 6647. https://doi.org/10.3390/s23146647
APA StyleZhang, H., Tao, Y., & Zhu, W. (2023). Global Path Planning of Unmanned Surface Vehicle Based on Improved A-Star Algorithm. Sensors, 23(14), 6647. https://doi.org/10.3390/s23146647