## 3 Multi-Sensor-Based Remote Autonomous Navigation and Close-Range
### Automatic Redarging Path Planning Algorithm  
#### 3.2.1 Improved A*  
Algorithm  
Path planning and localization are closely integrated in automatic recharging tasks. Path planning relies on localization information to obtain the robot's current position, while localization depends on the map and other information provided by path planning to estimate the position more accurately. By combining path planning and localization, the robot can navigate and avoid obstacles in a known environment, achieving autonomous navigation. This paper uses the A* algorithm to effectively find the shortest path between the start node and the target node. The key idea behind the A* algorithm is to use a heuristic function to estimate the cost from each node to the target. The traditional A* algorithm searches often traverse many unnecessary nodes, affecting search efficiency. This issue is mainly caused by the design of the heuristic function. If the heuristic estimate is less than the actual cost, many nodes are searched, resulting in low computational efficiency but the possibility of finding the optimal path. If the heuristic estimate is greater than the actual cost, fewer nodes are searched, which is more efficient but may not find the optimal path. The best efficiency occurs when the heuristic estimate equals the actual cost. Since the heuristic function is the Euclidean distance, the heuristic value is always less than or equal to the actual distance from the current point to the target. When the current point is far from the target, the heuristic estimate is much smaller than the actual value, causing the algorithm to search many nodes and resulting in low efficiency. To improve efficiency, the weight of the estimate should be increased. As the current point approaches the target, the estimate value approaches the actual value. To prevent the estimate from being too high and missing the optimal path, the weight of the estimate should be reduced accordingly. Therefore, this paper improves the cost function as follows:  
\[f(n)=g(n)+\Big{(}1+\frac{r}{R}\Big{)}h(n) \tag{5}\]  
where \(f(n)\) is the total estimated cost, \(h(n)\) is the estimated cost from the current point to the target point, and \(g(n)\) is the actual cost from the start point to the current point. \(R\) is the distance from the start point to the target point, and \(r\) is the distance from the current point to the target point. Although the above improvement enhances search efficiency, the path still contains many unnecessary redundant points, which is not conducive to path following. This paper proposes a redundant point removal strategy to eliminate redundant nodes and retain only necessary turning points. The specific redundant point removal strategy is as follows:  
Traverse all nodes in the path sequentially. If the current node and the two adjacent nodes are collinear, remove the current node. After removing redundant points on the same straight line, let the nodes in the path be \(\{P_{k}\mid k=1,2,\ldots,n\}\). Connect \(P_{1}\) and \(P_{3}\). If the distance between the line segment \(P_{1}P_{3}\) and obstacles is greater than the set safety distance, then connect \(P_{1}\) and \(P_{4}\) until the distance between \(P_{1}P_{k}\) and obstacles is less than the set safety distance. Then, connect \(P_{1}\) and \(P_{k-1}\), remove the intermediate nodes, and repeat the above operation starting from \(P_{2}\) until all nodes in the path have been traversed. After applying the redundant point removal strategy, the path planned by the A* algorithm only contains the start point, end point, and necessary nodes, effectively reducing the path length. In this study, we conducted three sets of simulations to evaluate the performance of the traditional A* algorithm and the improved A* algorithm in path planning. As shown in Figure 4, the improved A* algorithm consistently demonstrates better performance in terms of smoother trajectory and fewer turns compared to the traditional A* algorithm.