1. Introduction
Dynamic path planning is a core aspect of mountain transport vehicle research, in-volving the planning of a driving route from a starting point to a destination in complex terrains with dynamic obstacles. It ensures that the vehicle can safely avoid obstacles and maintain stable passage during movement. Depending on the degree of environmental information available during path planning, path planning algorithms can be categorized into global and local path planning. Currently, common global path planning algorithms include the A* algorithm [
1], particle swarm optimization [
2], and the ant colony algorithm [
3], which primarily optimize the global path based on pre-acquired terrain data. Local path planning typically employs methods such as the artificial potential field (APF) [
4] and fuzzy logic algorithms [
5], which focus on real-time processing of sudden dynamic obstacles encountered during travel, adjusting the path dynamically using sensor data. In obstacle avoidance, geometric and reinforcement learning (RL) approaches address dynamic navigation challenges differently. The VFH+T algorithm [
6] enhances traditional VFH+ with memory-based trap recognition. Meanwhile, an optimized TD3 [
7] allows the robot to take its own actions based on the observations it makes, without defining any trajectory beforehand.
The A* algorithm is a heuristic search algorithm characterized by its concise implementation and higher operational efficiency compared to algorithms such as particle swarm and ant colony algorithms. However, the traditional A* algorithm has notable drawbacks, including an excessive number of inflection points and non-smooth paths in the generated trajectories. Early researchers aimed to reduce pathfinding time by adjusting the weight ratios within the cost function [
8]. Nevertheless, this approach exhibited poor environmental adaptability, particularly in complex mountainous terrains. Subsequent scholars focused on modifying the cost function to enhance the heuristics of the heuristic function. For example, Yu Xiang et al. [
9] improved the A* heuristic function using Euclidean distance and projection distance, a modification that significantly reduced the number of iterations. Bao Jiusheng et al. [
10] proposed incorporating an exponential function as a weighting coefficient for the heuristic function, a strategy that yielded a moderate improvement in the algorithm’s search efficiency.
The APF algorithm determines the next movement direction based solely on the surrounding environment and the robot’s current state, offering advantages such as high computational efficiency and smooth path generation. However, this method is prone to stagnation at local minima, and traditional APF struggles to meet optimal path criteria when facing dynamic obstacles. To address these limitations, Min Gyu Park et al. [
11] addressed the problem that the APF algorithm is prone to getting trapped in local minima during path planning. They proposed a technique that combines the APF algorithm with the simulated annealing algorithm to effectively avoid local minima and achieve path planning. Additionally, Jinseok Lee et al. [
12] proposes a random unit total force (RUTF) algorithm and its repulsion-removed variant (RUTF-RR), which dynamically select force strategies based on the positional and directional conditions of the robot, obstacles, and target. This approach is designed to systematically identify and resolve the local minimum trapping issue inherent in potential field methods, particularly under symmetric robot–obstacle–goal configurations.
In complex mountainous environments, unstructured terrains—such as steep slopes, gullies, and irregular obstacles—and dynamic factors including moving obstacles and real-time environmental perception noise pose significant challenges to vehicle path planning. While single global planning algorithms (e.g., the traditional A* algorithm) can generate globally optimal paths based on prior maps, they struggle to respond in real-time to dynamic obstacles and local terrain mutations. Conversely, local obstacle avoidance algorithms (e.g., the artificial potential field (APF) method) can achieve immediate obstacle avoidance but suffer from local minimum traps and lack global path guidance, leading to deviations from optimal paths and even target unreachability. The inherent limitations of these two algorithms are significantly amplified by the complexity of mountainous environments. Therefore, the organic integration of the systematic global planning with the real-time adaptability of local obstacle avoidance to construct a dynamic obstacle avoidance approach that balances global optimality and dynamic adaptability has become a critical breakthrough for solving navigation problems of mountain vehicles in complex environments.
In the fields of autonomous driving and unmanned aerial vehicles (UAVs), improvements to the A* and APF algorithms primarily focus on path smoothing, dynamic obstacle avoidance, search efficiency, and constraint integration. In autonomous driving, cubic B-spline/Bezier curve fitting is introduced to optimize the curvature continuity of A*-generated paths, addressing issues of redundant inflection points [
13,
14]. Weighted heuristic functions and bidirectional search strategies are employed to enhance search efficiency in complex environments and reduce redundant nodes [
15,
16]. To tackle the local minimum traps of the APF algorithm, repulsive field functions are improved to be distance-sensitive—for example, by incorporating target distance factors or dynamically adjusting repulsive force intensity—and combined with safety distance models or road boundary constraints (e.g., virtual lane line gravitational forces) to enhance global guidance [
17,
18]. In the UAV domain, repulsive-force optimized heuristic functions enable safe path planning and load stabilization, while lightweight search strategies drastically reduce search time [
19].
To address the above challenges, this paper proposes an algorithm that integrates the A* algorithm and the APF algorithm. The algorithm optimizes the set of inflection points in the global path generated by the improved A* algorithm and uses these optimized inflection points as sub-target points for obstacle avoidance in the improved APF algorithm. This approach not only reduces the iteration time but also shortens the path length.
3. Improvement of Path Planning Algorithm
In the operation process of a vehicle, the working environment is a critical factor influencing its path planning. Common methods for constructing environmental maps include the grid method, vector method, and free space method. Among these, the grid method is widely used for its intuitive, simple, and easy-to-establish nature, as well as its good compatibility with the A* algorithm. It works by finely dividing the area where the vehicle operates into numerous grids, thereby constructing an intuitive and easy-to-manipulate representation model.
3.1. Improvement of A* Algorithm
- (1)
Improvement of Heuristic Function
The A* algorithm uses the cost function f(n) to calculate each reachable node, selecting the node with the lowest cost to determine the next step. By reasonably modifying the combined cost function f(n) of the traditional A* algorithm and increasing the weight of the heuristic function h(n), search efficiency can be improved. Specifically, when h(n) is always smaller than the actual cost g(n) from the current node to the target, the search space expands, leading to a larger number of explored nodes. Adjusting the weight of h(n) to give it a larger proportion in the calculation can more accurately direct the search direction, reducing unnecessary node exploration and enhancing the algorithm’s search efficiency. However, an excessive weight on the heuristic function can cause the algorithm to over-explore a single direction during pathfinding, ignoring other possible routes. In this case, the resulting path will no longer be optimal. The improvement method is to modify the heuristic function to not only consider the distance from the current node to the target, but also the distance from the current node to the starting point and the line connecting the target.
Reference [
7] introduces an additional component to the heuristic function, which considers not only the distance from the current node to the target but also the distance from the current node to the line connecting the start and target points. This approach can narrow the search area and enable the algorithm to approach the target more quickly. Specifically, it modifies the heuristic function h(n) to
where
a,
b, and
c are the three parameters of the linear equation representing the line connecting the start and target points.
Reference [
8] does not modify the heuristic function but instead adopts an exponential function as the weighting coefficient for the heuristic function. The optimized cost function f(n) is given by
Both of the above methods aim to enhance the heuristics of the cost function by increasing the proportion of the heuristic function. Thus, this paper integrates these two approaches to form a new cost estimation function. Taking an L-shaped obstacle as an example,
Figure 2 compares the specific path results of four methods. In
Figure 2, white grids represent unexplored nodes; blue grids denote examined nodes; black grids indicate obstacles; the red and blue grids mark the start and target nodes, respectively; and the red solid line shows the final path found by the algorithm.
As shown in
Figure 2, the search area of the traditional A* algorithm is significantly larger than that of the other three methods. Modifying the heuristic function clearly restricts the search scope: the inclusion of the distance from the current node to the line connecting the start and target points increases the heuristic value for nodes deviating from this line, thereby reducing their likelihood of being selected. Additionally, a comparison between
Figure 2c,d reveals that the improved heuristic function exhibits a pronounced convergent effect, narrowing the search focus effectively. Comparing
Figure 2a,c shows that while the exponential weighting method enhances heuristic guidance, it struggles to navigate across rectangular obstacles. In mountainous environments with gullies and fallen trees, relying solely on exponential function improvements is clearly insufficient to adapt to the complex terrain.
The specific data for each algorithm in
Figure 2 are shown in
Table 1. In the “Running Time” column, the first column is the time the algorithm is running, and the second column is the percentage of time saved compared to traditional algorithms In terms of search efficiency, whether by modifying heuristic functions or applying exponential weighting, it has excellent optimization effects compared to traditional algorithms, reducing search time by 57.7% and 56.2%, respectively. However, due to the limitations of exponential weighting, the path generated by this method is significantly longer than those of the other three approaches. Combining the heuristic function modification with exponential weighting overcomes this shortcoming. The results also indicate that the number of nodes has a greater impact on runtime than algorithm complexity to some extent. Since the traditional A* algorithm has weak heuristics and conducts more thorough exploration of surrounding nodes, it is reasonable that it achieves the shortest path among the methods compared.
- (2)
Path optimization
In the scenario depicted in
Figure 2, even after completing path planning, the resulting path still suffers from issues such as an excessive number of inflection points and a relatively long total length. Therefore, it is necessary to optimize this path. First, all inflection points in the path are extracted in sequence. The inflection point is the path inflection points in the global path generated by the improved A* algorithm, which can serve as sub objectives of the APF algorithm to facilitate dynamic obstacle avoidance. Notably, both the start node and the target node are treated as special inflection points and included in the extraction process. After extracting these points, the algorithm traverses each inflection point starting from the start node. If there are no obstacles between the start node and the current inflection point, the algorithm skips this point. If obstacles exist, it retains the previous inflection point and resumes traversal from that point to the subsequent ones, continuing until reaching the target node. Through this series of operations, the final generated path becomes the theoretically shortest path.
To generate random obstacles more consistent with mountainous environments, as shown in
Figure 3, four algorithms were used for path planning in this environment, where the yellow solid line represents the optimized path. As indicated by
Figure 3, after path optimization, the number of inflection points in the path is significantly reduced. Through statistical analysis of various data before and after algorithm optimization,
Table 2 is obtained. The results show that this path optimization can substantially reduce the number of inflection points and effectively shorten the path length.
3.2. Improvement of APF Algorithm
In the process of numerous practical applications, the traditional APF algorithm has two pressing issues to be resolved. The first is the local minimum problem, and the second is the target unreachable problem.
Figure 4 shows the basic flowchart of the APF algorithm. The main idea of this paper is to divide the path into multiple sub-target points under the guidance of the A* algorithm, and when a local optimum point is encountered, the path is replanned. Since these are the two major problems of the APF algorithm, the improvement of the APF in this paper mainly focuses on the target unreachable problem.
In certain special environments, such as when obstacles are close to the target point, the traditional APF algorithm may prevent the robot from reaching the target. This is primarily because when the robot approaches the target, the repulsive force remains unchanged while the attractive force decreases significantly, leading to the attractive force being smaller than the repulsive force from obstacles, thus making it impossible for the robot to reach the target. To address this issue, the repulsive field function is modified by incorporating the distance between the robot and the target point. The improved repulsive field function, i.e., the repulsive force function, is given by
where
n is a real number greater than 0, and
Fobs1 and
Fobs2 represent the repulsive force components. Specifically,
Fobs1 is directed from the obstacle to the vehicle, while
Fobs2 is directed from the vehicle to the target. This separation mirrors the potential field’s dual functional form, enabling independent tuning of distance-based repulsion and goal-oriented navigation behaviors.
3.3. Improved A* Algorithm Combined with APF Algorithm
Through improvements, the A* algorithm effectively addresses the issue of low search efficiency. After path optimization, it can plan an optimal path. The APF algorithm, built upon the paths generated by the improved A* algorithm, is used to solve obstacle avoidance problems in dynamic environments. Meanwhile, when the APF algorithm encounters a local optimum, it replans the path to avoid this limitation. This paper integrates the two algorithms, enabling the combined approach to exhibit strong path-planning capabilities in both static environments and dynamic scenarios, as shown in
Figure 5.
5. Conclusions and Discussion
This study focused on developing an efficient path planning solution for mountain transport vehicles in intricate environments. By integrating an improved A* algorithm with the APF algorithm, significant progress was achieved in both static and dynamic path planning scenarios.
In the improvement of the A* algorithm, the newly designed heuristic function, which combines the distance-based and line-distance-based factors, and the exponential weighting strategy effectively reduced the number of searched nodes and running time. The subsequent path optimization step further streamlined the path by minimizing inflection points and shortening its length. These enhancements contribute to a more efficient global path-planning process.
For the APF algorithm, the modification of the repulsive field function by incorporating the target distance factor successfully overcame the target-unreachable issue. When integrated with the improved A* algorithm, the combined approach used the optimized inflection points from the A* algorithm as sub-target points for the APF, enabling real-time obstacle avoidance in dynamic environments.
In the simulation verification, in static environments, the integrated algorithm outperformed the traditional APF algorithm. It can plan paths around complex obstacles in mountainous terrains, and the secondary path-planning mechanism effectively resolves local-minimum problems. In dynamic obstacle-avoidance scenarios, the algorithm can accurately detect approaching dynamic obstacles and initiate timely avoidance maneuvers while maintaining a safe distance from static obstacles. This indicates its high adaptability and reliability in dynamic environments.
However, there are still areas for improvement. For example, the computational complexity of the integrated algorithm may increase in extremely large-scale and highly complex environments. Future research could explore ways to further optimize the algorithm’s computational efficiency without sacrificing path-planning quality. Additionally, more real-world experimental data is needed to fully validate the algorithm’s performance in diverse mountainous terrains, and we plan to conduct prototype tests in future work.