Two-Stage Path Planning for Long-Distance Off-Road Path Planning Based on Terrain Data

: In the face of increasing demands for tasks such as mountain rescue, geological exploration, and military operations in complex wilderness environments, planning an efficient walking route is crucial. To address the inefficiency of traditional two-dimensional path planning, this paper proposes a two-stage path planning algorithm. First, an improved Probabilistic Roadmap (PRM) algorithm is used to quickly and roughly determine the initial path. Then, the morphological dilation is applied to process the grid points of the initial path, retaining the surrounding area of the initial path for a precise positioning of the search range. Finally, the idea of the A ∗ algorithm is applied to achieve precise path planning in the refined search range. During the process of constructing the topology map, we utilized parallelization acceleration strategies to expedite the graph construction. In order to verify the effectiveness of the algorithm, we used terrain data to construct a wilderness environment model, and tests were conducted on off-road path planning tasks with different terrains and distances. The experimental results show a substantial enhancement in the computational efficiency of the proposed algorithm relative to the conventional A ∗ algorithm by 30 to 60 times.


Introduction
Path planning technology is an interdisciplinary research field involving geographic information science, computer science, transportation engineering, and other disciplines [1].It can be described as generating an optimized path from an initial position to a specified destination within a bounded space, taking into account various constraints such as the environment and obstacles [2].With the rapid development of digital maps, structured road information has become more accurate and comprehensive.Path planning technology based on road networks has become quite mature and is widely used in daily life.However, this technology heavily relies on data such as traffic road networks, which may have significant limitations in complex off-road environments, such as remote rural areas and mountainous regions that lack good road network information [3].
In wilderness rescue search, emergency rescue and disaster relief, and military operations, the off-road environment is often very complex, making it difficult for vehicles to pass.Therefore, decision-makers have to construct off-road environment models through terrain data and utilize path planning algorithms to swiftly plan an approximately shortest walking path [4,5].However, as the spatial dimension increases, the computational complexity of traditional path planning algorithms sharply rises, resulting in low efficiency and slow speed in long-distance off-road path planning, making it difficult to plan reliable paths quickly [6].Therefore, it is necessary to propose an algorithm that can utilize slope information from terrain data to rapidly complete long-distance off-road path planning in 3D environments.
For long-distance off-road path planning, applying the A * algorithm to large-scale Digital Elevation Model (DEM) data may require a large quantity of computational resources and may not complete the path planning in a short time or even fail due to insufficient memory.Meanwhile, using methods such as the PRM algorithm can reduce computational complexity, but it is difficult to guarantee the accuracy of the path.Therefore, this paper proposes a two-stage path planning technique based on DEM data, which improves the PRM algorithm and combines it with the A * algorithm to achieve two-stage path planning.This algorithm first utilizes the non-uniform sampling PRM algorithm to plan an initial path.Subsequently, the initial path is expanded using a morphological dilation algorithm to obtain the second-stage search area.Finally, we use the A * algorithm to obtain the final path.This algorithm not only shortens the time required for path planning but also ensures the accuracy of the planned path.Compared with the A * algorithm, the two-stage path planning technique can achieve a maximum acceleration ratio of up to 60 times.
The remainder of this paper is organized as follows: Section 2 describes the experimental environment model.Section 3 introduces the technical route and method used in the study, detailing the process of the improved PRM algorithm and combining it with the A * algorithm for two-stage path planning.In Section 4, the effectiveness of the algorithm is verified through several groups of comparative experiments and the research results are presented.Finally, Section 5 presents the conclusions.

Related Work
Common path planning methods can be divided into three types.The first type is graph-search-based path planning algorithms, such as the A * algorithm [7][8][9], Dijkstra algorithm [10], and D * algorithm [11].The second type is sampling-based path planning algorithms, such as Probabilistic Road Map (PRM) [12][13][14] and Rapidly exploring Random Tree (RRT) [15].The last type is intelligent algorithms, such as ant colony optimization (ACO) [16,17], neural network algorithm [18,19], genetic algorithm (GA) [20,21], and particle swarm optimization (PSO) [22,23].Among these algorithms, the A * algorithm stands out for its high accuracy and good stability.However, as the number of nodes in the graph increases, the computational complexity also increases sharply, making it unsuitable for rapid planning of long-distance off-road paths [24].The PRM algorithm is typically used to solve high-dimensional problems, capable of handling a rapidly increasing data volume and slow planning speeds.It has high search efficiency but lower path quality and is not suitable for narrow spaces [14,25,26].Intelligent algorithms demonstrate significant advantages when facing complex environments and environments with incomplete information, but they require a lot of initial learning and computational costs and are prone to getting stuck in local optimal values.Therefore, applying intelligent algorithms in large-scale geographical environments has certain limitations [27,28].
Recent studies have proposed some improved PRM algorithms and A * algorithms.Regarding the PRM algorithm, You et al. [25] proposed a method of blending the PRM algorithm with potential fields to enhance the path planning capability of PRM in highdimensional environments and narrow passages.They introduced potential fields into the planning space, divided the number and region of sampled points based on the strength of the potential fields, and designed a variable-radius sampling strategy to make the distribution of sampled points more reasonable, thereby improving the working ability of PRM in high-dimensional environments.Liu et al. [29] addressed the difficulty of robot path planning in complex maps by proposing a path planning algorithm based on triangular meshes, overcoming the shortcomings of random-sampling PRM.Fareh [30] pointed out that most path planning algorithms waste too much processing work in non-critical areas of the map and proposed a path planning strategy that is more inclined to focus on critical areas to improve path quality and reduce computation time.The sampling-based path planning algorithms are typically suitable for free spaces without road networks, where path planning is performed after modeling the space.Although this approach may result in lower path quality in planning, it has fast planning speed.Current research is mainly focused on how to improve path planning success rate and path quality.The PRM algorithm is commonly used in the field of robot obstacle avoidance, but there is limited research on applying the PRM algorithm to large-scale grid maps.Regarding the A * algorithm, in terms of heuristic strategies, Wang [31] used exponential decay as a weighting factor in the heuristic function of A * and incorporated the influence of road conditions into the cost evaluation function to achieve route planning for scenic areas.In terms of algorithm innovation strategies, Hong et al. [32] proposed an improved A * algorithm using a closed list with random access data structures, which improved the efficiency of path planning.In hierarchical search strategies, Felix et al. [33] proposed using the idea of multi-resolution search for path planning, increasing the speed of planning, but the accuracy of the primary search path could not be guaranteed, leading to the inability to obtain the optimal solution.It is worth noting that most existing A * algorithms are mainly applicable to path planning tasks with small-scale data.
In existing research on human walking path planning in mountainous environments, Zhao Dequn et al. [3] referred to the relationship between human walking cost and slope, equating slope distance to horizontal ground distance.They utilized an improved A * algorithm for path planning, thereby obtaining a route that was gentler and more suitable for human walking.In our previous work [34], we proposed a method based on the PRM algorithm which incorporated a non-uniform sampling strategy and optimized the planned path based on a greedy criterion.In this paper, we apply parallel acceleration techniques to expedite the algorithm and utilize a more rational cost function, and in order to improve the quality of planned paths, we propose a two-stage path planning algorithm, which enhances the quality of paths while ensuring the speed of path planning.
Existing optimization methods for path planning in 3D environments are mostly designed for specific application scenarios.While these methods can provide paths that are more adaptive to specific environments, they suffer from issues such as insufficient path planning quality and unstable effects.In the experimental section, we compare the two-stage path planning algorithm with the A * algorithm, PRM algorithm, and nonuniform-sampling PRM algorithm.The results confirm that the two-stage path planning algorithm enhances both the time efficiency and the quality of path planning over long distances in off-road environments.

Study Area and Data Set
In order to verify the effectiveness of the algorithm, this study selected three regions with obvious terrain features as study areas.The first study area was located in northwest mainland China (101  1.In order to provide better reference for path planning, this study used ALOS DEM data with a resolution of 12.5 m.The three-dimensional topographic map of the selected study area was constructed using QGIS software to better visualize the terrain, as shown in Figure 2. In Figure 2, the whiter areas represent relatively higher elevations, while the bluer areas represent relatively lower elevations. The terrain slope is an important parameter affecting the travel time of off-road paths.This study utilized the surface fitting method to process the DEM data of the study area and calculate the slope values within the research region.In this method, a 3 × 3 local moving window was formed based on the elevation information of the grid center cell and the surrounding eight grid points, as shown in Figure 3.The grid center cell represented the grid point for which the slope was to be calculated.The slope at each grid point was calculated using a third-order inverse-distance squared weighted difference algorithm.The calculation formula for the slope in the X direction (slope x ) and the slope in the Y direction (slope y ) is given by Equation ( 1), where g i represents the elevation at the grid point i, and resolution represents the resolution of the grid DEM data [35].
The calculation formula for the slope of grid point g is shown in Equation ( 2).The calculated slope map is represented using a color scheme, where darker colors indicate steeper slopes, as shown in Figure 4.

Two-Stage Path Planning Algorithm
In the first-stage path planning, the algorithm utilizes an improved PRM algorithm with cost function-constrained sampling to perform preliminary path planning on terrain data in order to obtain an initial path.In the search space pruning, a morphological dilation algorithm is used to generate a pruned raster graph based on the initial path obtained from the first-stage path planning and the specified morphological buffer sizes.In the second stage path planning, the A * algorithm is used to find the optimal path in the pruned raster graph.Through this process, the final path is ultimately determined.Figure 5 shows the technical route discussed in this paper.The traditional PRM algorithm is divided into two stages: learning phase and query phase.Learning phase: The main task in the learning phase is to construct a probabilistic map G = (V, E) within the free space C. Firstly, a large number of pose points are randomly sampled in C to form a set of nodes V in the map G.Then, a local planner is used to find neighboring nodes for each node in V, thus forming a set of edges E in the map.
Query phase: The main task in the query phase is to find a feasible trajectory connecting the starting point P s and the end point P g , based on the graph G constructed during the learning phase.Initially, P s and P g are connected to the two closest nodes in the graph using a local planner.Subsequently, we use heuristic search algorithms such as breadth-first search, A * algorithm, etc., to search for an optimal route between the starting point and the end point.

Improved PRM Algorithm
When building a probabilistic map on terrain data, the traditional PRM algorithm uses uniform sampling to generate nodes for sampling.However, this method results in sampling points falling on grid points with steep slopes that are impassable for humans, leading to a significant waste of computational resources.Therefore, incorporating nonuniform sampling guided by a cost function, which favors selecting sampling points from grid points with lower costs, would greatly improve the algorithm's effectiveness.The corresponding pseudocode is described in Algorithm 1.

Algorithm 1:
Regarding path cost calculation, this paper used the human walking time cost as a measure to evaluate the quality of paths.Many scholars have studied the impact of slope on human walking time.This paper adopted the cost function of human walking time per unit horizontal distance estimated by Waldo et al. based on empirical data provided by Imhof [36], as shown in Equation (3).Here, g represents the slope value, and C represents the time cost: Regarding non-uniform sampling, the improved PRM algorithm used the reciprocal of the cost function as the sampling function, as shown in Equation ( 4), where C represents the time cost of a node, C cur represents the time cost of the current node, and P represents the sampling probability of the current node.This method makes it easier for sampling points to fall on grid points with lower costs, thereby improving the rationality of sampling.
Regarding constructing the topological graph after sampling, first, we used a KD − tree to index all sampled points and find the k nearest neighbors for all sampling points.Then, we connected each point with its k neighbor nodes to form k edges.Next, we calculated the grid points traversed by these edges using Bresenham's algorithm and accumulated the time cost of adjacent grid points to obtain the edge weight between neighboring nodes.The corresponding pseudocode is described in Algorithm 2. The process of finding the nearest neighbor points and constructing the topological graph for each point is highly independent, both spatially and logically.Therefore, parallel methods can be used to quickly construct the topological graph.Through parallel processing, the efficiency and speed of constructing the topological graph can be effectively improved.

Search Space Pruning
After obtaining the initial path, it was necessary to obtain the area around the initial path as the search space for the second-stage path planning.In order to ensure that the second-stage search range was around the initial path, a morphological dilation operation was considered for each grid point along the initial path.The morphological dilation operation in this paper involved first connecting the grid points on the initial path using Bresenham's line algorithm to obtain a continuous path in the DEM data.Then, all grid points on this continuous path underwent a cross-shaped dilation, which involved expanding the target grid points in four directions within a range of r units.The simplest method involves performing cross-shaped dilation for each point, resulting in a complexity of O(n p × r), where n p is the number of grid points on the continuous path.However, this method leads to a significant number of redundant operations.To minimize repetitive operations and improve efficiency, this paper proposes an improved cross-shaped dilation method.
When performing dilation on the x-th grid point p x in the same row using the improved morphological dilation method, we only recorded its range endpoints (L x , R x ) and attempted to merge the interval formed by these endpoints with the existing intervals in that row.Whenever a merge was attempted, we searched for Max L i ≤ L x and determined whether merging was necessary based on whether R i < L x .If R i < L x , no merging was required; if R i ≥ L x , merging was necessary, and the interval was updated to (L i , R x ).If L i+1 ≤ Rx, we continued the merging process; if L i+1 > Rx, we stopped the merging.A self-balancing search tree was used to support interval endpoint updates and searches, with the search key being the left endpoint of the interval associated with the right endpoint value.The same operation was performed in the column direction for each grid point in the row, thereby completing the cross-shaped dilation operation on the initial path.The computational complexity of this operation was upper bounded by O(n p × log(n p )).If none of the intervals resulting from the dilation of the grid points could be merged, the maximum number of intervals was n p .The operations of dilating and merging for each row were highly independent both in terms of space and logic, allowing for parallelization to expedite the dilation process.
After quickly obtaining the approximate area around the initial path, all grid points within the search range were transformed into nodes in the graph.Each node was connected to the eight neighboring grid points, forming edges in the graph as shown in Figure 6.The weights of these edges were determined based on a time cost function, thereby constructing a topological graph.

Second-Stage Path Planning
The improved PRM algorithm could quickly plan long-distance path in the off-road environment, but the quality of the planned path was poor.Therefore, during the utilization of this algorithm, adjustments were made to the number of sampling points in the firststage path planning and the morphological buffer sizes in the search space pruning stage to ensure that the path obtained in the first stage adequately covered the optimal path after dilation.In the second-stage path planning, the A * algorithm was used to search for a path in the topological graph obtained by the search space pruning.This improved the quality of the path planning while ensuring the speed of long-distance path planning.So, we introduced the implementation of the A * algorithm in the second-stage path planning.
The A * algorithm combines a heuristic search with a breadth-first search and is considered one of the most efficient direct search algorithms for finding optimal paths in a static environment.The A * algorithm uses a cost function F(n) to guide the search direction.It starts from the starting point and expands to the surrounding nodes.The heuristic function H(n) is used to calculate the cost of each neighboring node to the end point.The node with the minimum cost value is chosen as the next inflation point.This process is repeated until the algorithm reaches the goal node, generating a path from the starting point to the end point.During the search process, since each node on the path has the minimum cost, the final path has the minimum cost.The local heuristic distance cost function of the A * algorithm is shown as Equation (5), where F(n) is the estimated total cost from the start node, passing through node(n), to the goal node, G(n) is the distance cost of node(n) from the start point, H(n) is the heuristic estimated cost from node(n) to the goal node, resolution is the grid resolution, and C n is the time cost of the current node.In this study, we used the Euclidean distance to calculate G(n).
The A * algorithm commonly uses OpenList and ClosedList to manage nodes during path planning.The OpenList is used to store the expanded nodes encountered during the search process and sort them based on the local heuristic distance cost function value of the nodes.At each step, the node with the minimum cost function value is selected from the OpenList as the current node for inflation and then moved to the ClosedList.The search ends when the target node is found or when the OpenList is empty.The ClosedList is used to keep track of the nodes that have been expanded to avoid processing the same node repeatedly.In the A * algorithm, the OpenList needs to frequently perform insertion, deletion, and comparison operations.Therefore, in this paper on path planning using the A * algorithm, a priority queue was used to implement the OpenList.This is because it can reduce the time complexity of insertion and deletion operations from O(n) to O(logn), significantly improving the efficiency of the A * algorithm.

Experiment and Results
Given that the number of sampling points and the morphological buffer sizes are two adjustable parameters in the algorithm, to evaluate the impact of these parameters on the algorithm's performance, the number of sampling points was controlled between 0 and 100,000, and the morphological buffer sizes were set at five levels, with widths of 100, 200, 300, 400, and 500 grid units.To ensure the stability and reliability of the algorithm, 100 algorithmic experiments were conducted for different numbers of sampling points and morphological buffer sizes.The average values of algorithm execution time and path time cost were obtained.In order to measure the quality of the paths obtained by the algorithm, the experiment compared the average path time cost obtained by the algorithm in each case with the optimal path time cost found by the A * algorithm.The path time cost error (error) is shown in Equation (6).
This paper validated the performance of the two-stage path planning algorithm through experiments in different path planning scenarios.To make it more intuitive for readers to distinguish between the traditional PRM algorithm and the improved PRM algorithm, this paper refers to the traditional PRM algorithm as the uniform-sampling PRM algorithm, and the improved PRM algorithm as the non-uniform-sampling PRM algorithm.By comparing path planning tasks under different terrain features and distances, the applicability of the algorithm was verified.By comparing it with the A * algorithm, uniform-sampling PRM algorithm, and non-uniform-sampling PRM algorithm, the execution efficiency of the algorithm was validated.
The experiment was conducted using C++ 17 compiled on g++.The starting and ending point, the number of sampling points, and the morphological buffer sizes were all taken as inputs from the C++ program.The complete code was tested on an Intel Core i9-13900H@2.60GHzprocessor.To ensure the controllability of the experiment, this study set the feasible slope threshold of the human to 30 • in the subsequent experiments.

The Effect of Adjustable Parameters
To verify the impact of two adjustable parameters, the number of sampling points and the morphological buffer sizes, on the algorithm performance, this experiment selected a path in a mountainous region with fixed starting and ending points for testing.The details of the selected start and end points for planning are as shown in Table 1.The chosen path was long in distance and featured complex terrain, making it quite representative.In Figure 7, different path planning results are displayed in the DEM map and the threedimensional topographic map.The green path represents the path obtained from the A * algorithm, and the red path represents the path obtained from the two-stage path planning algorithm, the white path represents the path obtained from the non-uniformsampling PRM algorithm, and the black path represents the path obtained from the uniformsampling PRM algorithm.The results indicate that the planned paths mostly avoided steep mountainous areas and instead sought smoother and relatively closer routes.In Figures 8 and 9, the horizontal axis represents the number of sampling points, the different colored curves represent different morphological buffer sizes of the initial path, and the vertical axis represents the average error in path time cost and the average runtime of the algorithm, respectively.
From the analysis of Figures 8 and 9, it can be observed that in the experiments, when the number of sampling points was below 1000, the quality of paths within various morphological buffer sizes was relatively poor.However, as the number of sampling points increased, the quality of paths under different conditions improved.When the number of sampling points exceeded 30,000, the path quality tended to stabilize.It can be said that the number of sampling points determined the degree of deviation between the initial path and the final path.With an increase in the number of sampling points, the likelihood of obtaining a reasonable initial path was higher.However, when the number of sampling points reached a certain level, the improvement became more gradual.The algorithm's running time also approximately increased linearly with the number of sampling points.Therefore, choosing an appropriate number of sampling points can ensure both speed and accuracy.
Through the comparative analysis of the line chart with different colored lines representing different morphological buffer sizes, it can be observed that overall performance improved significantly when the morphological buffer sizes exceeded 300 grid units.A larger morphological buffer sizes corresponded to better path quality, and once the morphological buffer sizes reached a certain size, the path quality tended to stabilize.The algorithm's running time also increased as the morphological buffer sizes grew.When the morphological buffer sizes reached its maximum, there was no significant difference in performance between the second-stage path planning and directly applying the A * algorithm to the original DEM data.Therefore, reasonably controlling the morphological buffer sizes is crucial for leveraging the utility of the two-stage path planning algorithm.Based on the above experiments and analysis, it can be concluded that when the number of sampling points and the morphological buffer sizes were reasonable, the error between the paths found by the two-stage path planning algorithm and the optimal path found by the A * algorithm could be kept within an acceptable range.To ensure the controllability of the experiment, this study set the number of sampling points to 30,000 and the morphological buffer sizes to 300 in the subsequent experiments.

Two-Stage Path Planning Algorithm for Path Planning in Different Environments
To verify the effectiveness of the proposed path search algorithm in different path planning scenarios, this study involved a total of nine sets of path planning tasks for short-, medium-, and long-distance in desert terrain, hilly terrain, and mountainous terrain, respectively.The article defined distances greater than 70 km between the starting and ending points as long distances, while distances within 70 km were further divided into short distances and medium distances.The selected starting and ending points for each planned route are detailed in Table 2.The path planning started from the starting point listed in Table 2, combining DEM data, slope maps, and a time-cost function to determine the optimal path in terms of time cost to the end point.In Figure 10, different path planning results are displayed.The green path represents the path obtained from the A * algorithm, the red path represents the path obtained from the two-stage path planning algorithm, the white path represents the path obtained from the non-uniform-sampling PRM algorithm, and the black path represents the path obtained from the uniform-sampling PRM algorithm.The results showed that in desert terrain, due to the relatively flat landscape, the planned paths were mostly straight.In hilly and mountainous terrain, due to significant changes in slope, the planned paths were more winding.The non-uniform-sampling PRM algorithm, compared to the uniformsampling PRM algorithm, was closer to the optimal route, demonstrating the effectiveness and reliability of the non-uniform sampling PRM algorithm in path planning.The paths planned by the two-stage path planning algorithm were more refined and reasonable on the basis of the non-uniform-sampling PRM algorithm, and the planned paths were roughly overlapping with those planned by the A * algorithm.
In nine different scenarios, the two-stage planning path algorithm was compared with the traditional A * algorithm, the PRM algorithm with uniform sampling, and the PRM algorithm with non-uniform sampling, evaluating the efficiency performance of the two-stage path planning algorithm.Table 3 shows the time cost of paths, path length, and algorithm runtime in different path planning tasks.The data in the table indicate that the proposed algorithm significantly improved the efficiency of path planning in different scenarios.

Discussion
A visual analysis was conducted on the data in the table and is discussed in the following.
To illustrate the quality of the paths planned by the two-stage path planning algorithm, Figure 11 shows the slope of the paths obtained in experiments 1-9.
Based on Figure 11, it can be observed that in desert terrain, the routes planned by this algorithm kept the slope within 6 • .In hilly and mountainous terrains, where the surface undulations were significant, this algorithm could still control the slope of the planned routes within 15 • .Overall, the routes planned by the two-stage path planning algorithm were relatively gentle, demonstrating strong passability.
According to Figure 12, for the PRM algorithm, in terms of human walking time cost, the non-uniform-sampling PRM algorithm showed an average reduction of 9.8% compared to the traditional PRM algorithm.This indicates that non-uniform sampling led to a more reasonable distribution of sampling points, thereby improving the quality of path planning.Since the A * algorithm is probabilistically complete and capable of achieving the optimal solution in path planning, this study used the path found by the A * algorithm as the path with the optimal time cost.The lines of the two-stage path planning algorithm and the A * algorithm overlapped substantially, indicating that the paths planned by the two-stage path planning algorithm had a small cost error compared to the optimal time cost path, averaging around 0.2%.This provides evidence for the reliability of the two-level path planning algorithm.However, it should be noted that the non-uniform-sampling PRM algorithm showed higher average errors in certain terrains.Specifically, in desert terrain, the average error compared to the optimal path reached 25.98%.In more complex off-road environments such as hilly and mountainous terrains, the average error increased to 94.74%.These findings suggest that relying solely on the PRM algorithm for path planning in such challenging terrains may result in poor path quality.The two-level path planning algorithm significantly improved the quality of paths.In Figure 13, the X-axis represents nine experimental scenes, and the Y-axis represents the multiple of efficiency improvement relative to the A * algorithm.The runtime of the nonuniform-sampling PRM algorithm was nearly the same as that of the uniform-sampling PRM algorithm.Compared to the A * algorithm, the computational efficiency improved by 45-110 times.The two-stage path planning algorithm improved by 30-60 times, indicating a significant optimization efficiency while ensuring the quality of path planning.In cases where the distance was close, the complexity of the terrain had an impact on the efficiency improvement of path planning.As the planned path distance increased, the computational efficiency showed a more noticeable improvement because the retrieval length of the algorithm in this study was directly related to the length of the path.Therefore, longer paths benefited more from the efficiency enhancements provided by the algorithm, making its advantages more pronounced in longer-distance planning tasks.Based on the analysis and discussion above, it can be concluded that the algorithm proposed in this paper not only overcame the shortcomings of slow path searching in complex off-road environment models with the A * algorithm and low path search quality with the PRM algorithm but also greatly enhanced the search efficiency and path accuracy of off-road paths.It achieved a fast response in different off-road path planning scenarios.However, there are still some limitations in this research: 1.This study mainly focused on the comprehensive research of off-road path search algorithms.In terms of off-road environment modeling, the analysis of passability did not comprehensively consider the combined effects of multiple factors but only took into account the slope.2. The time cost of the paths planned by the algorithm did not reach the optimal level and slightly deviated from the optimal solution.Subsequent research will integrate multiple factors to construct an environmental model and further optimize the planning effect based on efficient planning.

Conclusions
This paper proposed a two-stage path planning algorithm to overcome the limitation of slow computational efficiency in long-distance off-road path planning.The algorithm made the following improvements: 1.In the first-stage path planning, a cost function was used to guide the PRM algorithm for sampling, which enhanced the rationality of sampling and enabled the rapid generation of initial paths.2. In the search space pruning, a highly efficient cross-shaped dilation method was proposed, allowing computational resources to be concentrated rapidly in the efficient area of path planning.3.In the second-stage path planning, after pruning the search area, the A * algorithm was used for path planning, and a heuristic function was determined in conjunction with the cost function to improve the quality of path planning.
Finally, using extensive DEM data to construct an off-road environment model, the proposed method was validated.Experimental results showed the following: 1.The algorithm proposed in this article could complete path planning for long distances within 1.5 s.Compared to the A * algorithm, the efficiency of the proposed algorithm in path planning was at least 30 times faster, with a maximum acceleration of up to 60 times.This acceleration factor increased with larger data volumes or higher data precision.It is evident that the path search efficiency of the proposed algorithm far exceeded that of the A * algorithm, especially in long-distance planning tasks.2. The time cost of the paths searched by the proposed algorithm approximated the time-optimal paths planned by the A * algorithm, with an average error controlled within 0.2%.In conclusion, the algorithm proposed in this paper significantly outperforms the A * algorithm in terms of execution efficiency, enabling rapid completion of long-distance off-road path planning tasks.

Figure 5 .
Figure 5. Technical route for two-stage path planning.

Algorithm 2 : 5 c+ = n c ; 6
Algorithm to compute the time cost.Input: source vertex s, target vertex t, DEM data dem Output: time cost c 1 k ←bresenham(s, t) //k is the list of points from s to t; 2 Time cost c ← 0; 3 for each vertex k i in k do 4 compute the neighbor cost n c (k i , k i+1 ) based on C = 0.6 1 + g 2 • e 3.5•|g+0.05|; Return c;

Figure 7 .
Figure 7. Path planning result.(a) Path planning result in the DEM map.(b) Path planning result in the three-dimensional topographic map.

Figure 8 .
Figure 8. Error of path time cost.

Figure 9 .
Figure 9. Runtime of the algorithm.

Figure 10 .
Figure 10.Path planning results.(a) Short-distance path planning result on desert terrain.(b) Mediandistance path planning result on desert terrain.(c) Long-distance path planning result on desert terrain.(d) Short-distance path planning result on hilly terrain.(e) Median-distance path planning result on hilly terrain.(f) Long-distance path planning result on hilly terrain.(g) Short-distance path planning result on mountainous terrain.(h) Median-distance path planning result on mountainous terrain.(i) Long-distance path planning result on mountainous terrain.

Figure 11 .
Figure 11.Slope of the paths obtained in experiments 1-9.(a) Slope diagram of the short-distance path planning result on desert terrain.(b) Slope diagram of the median-distance path planning result on desert terrain.(c) Slope diagram of the long-distance path planning result on desert terrain.(d) Slope diagram of the short-distance path planning result on hilly terrain.(e) Slope diagram of the median-distance path planning result on hilly terrain.(f) Slope diagram of the long-distance path planning result on hilly terrain.(g) Slope diagram of the short-distance path planning result on mountainous terrain.(h) Slope diagram of the median-distance path planning result on mountainous terrain.(i) Slope diagram of the long-distance path planning result on mountainous terrain.

Figure 12 .
Figure 12.Comparison diagram of the time cost of four path planning algorithms.

Figure 13 .
Figure 13.Comparison chart of search efficiency compared to A * algorithm.

covering a total area of 77.85 × 71.19 km 2 and characterized by desert terrain. The second study area was located in central mainland China (107 • 77 ′ E-108 • 73 ′ E, 25 • 71 ′ N-26 • 60 ′ N), covering a total area of 99.49 × 91.26 km 2 and characterized by hilly terrain. The third study area was located in eastern mainland China (118 • 85
′ E-119 • 65 ′ E,27• 78 ′ N-28 • 40 ′ N), covering a total area of 95.46 × 74.08 km 2 and characterized by mountainous terrain.The Region of Interest (ROI) is shown in Figure

Table 1 .
Detailed information of the path planning task.

Table 2 .
Detailed information of the different path planning tasks.

Table 3 .
The time cost of paths, path length, and algorithm runtime in different path planning tasks.