1. Introduction
Automatic guided vehicles (AGV) are intelligent industrial transportation devices characterized by their high autonomy, flexibility, programmable control, and adaptability [
1]. Currently, they serve as a crucial component in the intelligent and automated production of industries.
In AGV systems, path planning is a paramount aspect [
2], serving as a prerequisite for the correct movement of AGV vehicles. The results of path planning determine the intelligence level and availability of AGV vehicles [
3]. Various researchers have proposed different methods to address path planning issues, such as the traditional A* [
4] and D* [
5] algorithms. The A* algorithm combines Dijkstra and BFS algorithms, enhancing search speed through learning a heuristic function. Additionally, drawing inspiration from nature, many researchers have introduced novel algorithms, including artificial potential field [
6,
7] algorithms, artificial bee colony [
8,
9], genetic algorithms [
10], particle swarm optimization [
11], ant colony algorithms [
12], and more. With the advancement of research in artificial intelligence and deep learning, numerous researchers have proposed leveraging a Large Language Model (LLM) for robot path planning [
13,
14,
15]. These algorithms, compared to others, require iteration and optimization to find the optimal path, potentially leading to longer times being needed to obtain effective paths in complex environments [
16].
In contrast to previous algorithms, path planning methods based on random sampling have been widely applied and researched due to their higher planning speeds [
17]. Among these, the most traditional random sampling path planning methods are Rapidly Exploring Random Trees (RRT) [
18,
19] and Probabilistic Roadmap methods (PRM) [
20]. Compared to previous methods, random sampling algorithms use sampled points to describe the free space [
21]. The Rapidly Exploring Random Trees (RRT) algorithm randomly selects a free point at each step and employs a separate query process to solve the path planning problem [
22]. The PRM algorithm constructs the free space, simultaneously selecting all sampled points and conducting queries [
23]. In comparison with the RRT algorithm, the PRM algorithm, by pre-constructing the free space, can rapidly obtain the shortest path. The algorithm primarily consists of two phases: the learning phase and the query phase [
24]. The learning phase primarily involves the use of different sets of points to represent the entire workspace, with these points being randomly sampled throughout the workspace. The algorithm also connects each point with all other points, conducting a collision detection, and stores the generated collision-free lines to represent the connected segments of the entire workspace. Consequently, after the learning phase, the original workspace transforms into a workspace composed of freely sampled points and collision-free lines generated by the algorithm. The query phase of the algorithm builds upon the previous step by using a planning algorithm to perform path planning on the generated collision-free lines, creating a connecting line from the starting point to the destination. The PRM algorithm can pre-construct free points and collision-free lines that are tailored to a specific environment, significantly reducing the time required for collision detection and optimizing the efficiency of path planning.
However, due to the PRM algorithm’s reliance on random sampling for free point selection, it exhibits a low success rate in solving path planning problems in narrow passages and complex environments. To enhance the performance of the PRM algorithm, researchers have proposed various methods to optimize the map-learning techniques of free spaces in a narrow passages and complex environments. Boor, V et al. introduced Gaussian sampling [
25], which increases the sampling count in narrow passages by transforming obstacle points into free points on the obstacle boundaries through random perturbation. Hsu, D et al. proposed bridge sampling [
26,
27], determining collision-free midpoints that serve as sampling points in narrow passages. Chen Yan [
28] and others suggested a deep-learning-based approach to train and optimize sampling, but these sampling methods often require additional computational efforts to determine the landing positions of the sampling points, which may not meet real-time requirements. Han Chao [
29] and colleagues introduced a light node-based sampling method, simulating illumination to sample unsampled areas and ensure the connectivity of the region. While this method effectively meets the requirements of simple narrow passage maps, it exhibits poor adaptability to irregular narrow passages and general maps.
In order to address the issue of prolonged search times for current heuristic and bio-inspired algorithms on large maps, as well as the inadequacy of sampling algorithms in narrow passages, this paper proposes a grid-based non-uniform PRM (GN-PRM) algorithm. By strategizing the point selection across different grids, the algorithm enhances the probability of point selection in narrow passages. Additionally, the connection strategies and methods are optimized to improve the algorithm’s operational speed. We achieved a rapid and robust path planning for AGVs in complex environments on large maps. The primary contributions of this paper are as follows:
To ensure the connectivity of the sampling graph and increase the number of samples in the narrow passages, we optimize the strategy of extracting sampling points by gridding, identifying, and classifying the features in each grid of the graph. Different sampling strategies are used for different grids. The number of sampling points in open areas is reduced and the number of sampling points in narrow passages is increased, without changing the total number of sampling points, to ensure feasibility in narrow passages.
In order to accelerate the algorithm’s running speed and better meet the real-time requirements of path planning algorithms, we optimize the connection strategy of sampling points, reduce the generation of undirected line segments by over 50%, and further optimize the path through pruning. Without significantly increasing the length of the route, this approach reduces over 40.9% the time needed to connect collision-free lines during the program, thereby enhancing the algorithm’s operational speed.
To ensure the optimality of the planned path, we prune and optimize the routes generated in the query phase, reducing the generation of redundant points. The optimized route nodes are reduced by an average of 38.7%, and the route length experiences a reduction of approximately 17.6%.
Section 2 primarily provides an overview of the operation process and principles of the traditional PRM algorithm.
Section 3 elaborates on the innovations and improvements made in this paper concerning the GN-PRM algorithm, including grid partitioning, non-uniform probability density sampling methods, and the optimization of route connections and searches.
Section 4 demonstrates the optimization results of the improved algorithm through a comparison with the original.
Section 5 concludes the entire document.
2. Traditional PRM Algorithm
The traditional PRM algorithm is a well-known global path planning algorithm that allows for robots to find a collision-free path from a specified initial position to the corresponding final destination. In the traditional PRM algorithm, the description of free space is directly represented by free points and collision-free line segments. Through this approach, the algorithm can effectively reduce the occupancy of the workspace during path planning. The PRM algorithm primarily consists of a learning phase and a query phase. In
Figure 1, (a) illustrates an original map with a size of 500 × 500, (b) and (c) depict the sampling of red points and the connection between undirected blue line segments performed by the traditional PRM algorithm in the learning phase, and (d) shows the algorithm searching all undirected line segments and providing the optimal path in red during the query phase. The specific operations and descriptions of each phase are detailed below.
2.1. The Learning Process
The primary objective during the learning phase is to construct a simplified free space in the workspace through random sampling, which will be utilized for subsequent path planning. During the learning phase, the algorithm primarily has two tasks: sampling points and connecting sampled points to construct undirected line segments. The time complexity of point sampling is typically approximately linear, i.e., , while the time complexity of constructing undirected line segments is usually approximately , where is the number of sampled points.
Based on the data from the corresponding input map, we can divide the map space
into free space
and obstacle space
. The operations in the learning phase are mainly as illustrated in
Figure 2.
Firstly, the algorithm reads and initializes the map data, dividing the overall space into the free space and the obstacle space . Subsequently, random sampling points are selected by performing random sampling in the entire space , and the sampled points are added to the list of sampling points . Finally, the algorithm checks whether the sampling task is complete. If the number of samples is less than the specified value, the algorithm continues sampling until the task is completed.
Upon completing the description of the space using the set of points, we use collision-free line segments between points to represent effective local paths. These collision-free lines ensure that the robot can navigate the free space. While learning the collision-free lines, the algorithm selects the first free point and another free point to construct a line segment. Subsequently, collision detection is performed on the learned line segment. If a collision occurs, the segment is discarded, and the process continues to another sampling point Otherwise, the two endpoints of the path are added to the set of line segments until the entire set of points is traversed. It is worth noting that substantial resources are consumed when learning undirected line segments using this process to traverse the set of points.
2.2. The Query Process
The primary objective of the query process in the PRM algorithm is to leverage the collision-free paths constructed during the learning phase to identify paths between the starting and ending points. By employing local path planning, the algorithm aims to discover an effective path, thereby obtaining a practical route from the initial position to the final destination. Since collision-free local paths are established during the learning process, the search for the optimal path is confined to the set of undirected line segments derived from the learning process, rather than spanning the entire free space.
In the query process of the traditional PRM algorithm, the primary local path planners typically involve A* or Dijkstra algorithms. The Dijkstra algorithm employs the greedy algorithm’s concept by progressively extending the shortest known paths, gradually determining the shortest paths from the starting point to other vertices and ultimately identifying the shortest path to the endpoint. In comparison to the Dijkstra algorithm, the A* algorithm incorporates a heuristic function to determine the optimal path, resulting in greater efficiency in path planning for static workspaces. Therefore, in the query process of the traditional PRM algorithm, the A* algorithm has emerged as the predominant local path planner. When utilizing the A* algorithm to complete the query process, the cost function for evaluating paths is as follows:
where,
represents the estimated total cost,
denotes the actual cost from the path’s starting point to the current node
and
represents the minimum estimated cost from node
to the target endpoint, which is typically calculated using the Euclidean distance. If
is zero, only
is effective, and the A* algorithm degenerates into the Dijkstra algorithm. If
is much larger than
,
can be approximated to zero, and the A* algorithm degenerates into the BFS algorithm.
The flowchart for the entire query phase is shown in
Figure 3.
During the query process, we initially create two lists, the open list and the closed list, to store the parameters of the points being queried. The closed list is used to store points that have already been queried and can be disregarded, while the open list is used to store the free points that need exploration. Next, we identify the overall nearest free points that can form a local path with the initial query point and estimate the cost of these nearest free points according to the formula. Then, we select point with the minimum cost serving as the best-performing point, and remove the current query point from the open list. Finally, we check if the best-performing point is the endpoint. If it has not reached the endpoint, we use the previously selected as the query point for the next iteration, and continue querying the point with the lowest cost around until reaching the endpoint.
Through the aforementioned learning and querying processes, the traditional PRM algorithm can be used in path planning for AGV cars in common environments. However, due to the inherent randomness in the sampling points during the learning process, the completeness of the traditional PRM algorithm is relatively poor. This deficiency becomes more apparent in specific types of maps, such as those containing narrow passages and multiple corners, where it often fails to establish connectivity from the starting point to the endpoint, resulting in path planning failures. A simple solution to this problem is to increase the number of sampling points on the map. However, this inevitably generates a large number of invalid points, leading to an increase in algorithm runtime and the wastage of computational resources. To address these issues, this paper proposes a grid-based non-uniform-sampling optimized PRM algorithm.
4. Simulations
4.1. Simulation Simulation Comparison between PRM and GN-PRM
In this section, we primarily evaluate the performance of the optimized PRM path algorithm. The experiment comprises four maps, as illustrated in
Figure 10a–d: a regular map, a map with simple narrow passages, a map with complex narrow passages, and a map with irregular narrow passages, respectively. The size of each map is 500 × 500, with the starting point set at (10,10) and the endpoint at (490,490). To ensure the accuracy of our data, each map underwent 10 experiments, and the final data represent the average of these 10 trials. The simulations in this section were conducted on a personal computer with a 3.70 GHz Intel-Core (i5-8400) CPU and 32 GB of memory.
To demonstrate the performance of the optimized sampling algorithm, we conducted a comparative analysis with the traditional PRM algorithm. Each algorithm was executed 50 times, and the planning success rate, average planning time, and average planning length were selected as metrics to compare their merits. Based on the results presented in
Table 2, the following conclusions can be drawn:
(1) In the regular map (a), both the traditional algorithm and the improved algorithm demonstrate effective path planning. With an increase in the number of sampled points, the learning and query times for both PRM algorithms also increase. However, the optimized PRM algorithm proposed in this paper not only ensures an average planning length that is superior to traditional algorithms but also significantly reduces planning time by minimizing redundant routes, thus improving the algorithm’s real-time performance.
(2) In the maps with simple narrow passages (b), complex narrow passages (c), and irregular narrow passages (d), by comparing the success rates when constructing a free space under the same sampled value (K), our algorithm exhibits a higher successful solution rate than the traditional algorithm. The traditional PRM algorithm struggles to complete route planning when the sampled point number (K) is small, whereas our algorithm maintains a high planning completion rate. As K increases, although the success rate of the traditional PRM algorithm improves compared to smaller K values, it still faces challenges in successfully planning routes.
(3) Through a comparison of the constructed route lengths, it is evident that, despite the improved algorithm discarding some connections between undirected line segments, the optimization through pruning that occurs in the experiments on all four maps consistently results in better average route lengths for the improved algorithm under the same K values.
4.2. Simulation Simulation Comparison between GA and GN-PRM
To analyze and compare the GN-PRM algorithm with other algorithms, we used the GN-PRM and the Genetic Algorithm (GA), using each algorithm 50 times. We used planning success rate, average planning time, and average planning length as key indicators for the comparative analysis between the two algorithms. The maps considered in this comparison consist of two simple maps, one simple narrow passages map and one complex narrow passages map, as illustrated in
Figure 11.
The parameters of the experimental platform remain consistent with previous settings. The predefined parameters for the Genetic Algorithm (GA) include the number of iterations and the population size. A larger number of iterations and a larger population generally lead to improved planning effectiveness and a higher planning success rate. However, this improvement comes at the cost of an increased iteration time, resulting in a higher overall time requirement for the algorithm. To strike a balance between time efficiency and success rate, we set the population size of the GA algorithm to 50, with 10 iterations, for an optimal real-time performance in a simple map. In a more complex map, we adjusted the population size to 300 and increased the number of iterations to 25 to enhance the planning success rate. For the GN-PRM algorithm, we consistently set the sampling point parameter as
. The simulation data are presented in
Table 3. Based on the data in
Table 3, we can conduct an analysis and draw conclusions.
(1) In simple maps (a) and (b), both the Genetic Algorithm and GN-PRM demonstrate an almost 100% success rate in completing trajectory planning. However, given the iterative nature of the GA algorithm, its computational time is relatively high. The GN-PRM algorithm, on the other hand, exhibits an average running time that is more than 80% lower than that of the GA algorithm, showcasing superior real-time performance. Concerning the average planned path length, the GA algorithm, which lacks optimization pruning methods, yields a route approximately 5–10% longer than that of the GN-PRM algorithm.
(2) In a narrow passage map (c), although the success rate of the GN-PRM algorithm remains nearly constant, the success rate of the GA algorithm drops to only 80%. However, due to the extensive iterations and population size in complex maps, the average running time of the GA algorithm is more than 50 times that of the GN-PRM algorithm, rendering it unable to meet the real-time requirements of path planning. In the tightly folded narrow passage map (d), the GA algorithm struggles to plan viable paths, while the GN-PRM algorithm consistently achieves a 100% planning success rate with efficiency.
5. Conclusions
In this paper, we propose a novel GN-PRM algorithm that is designed to effectively address the path planning problem for mobile robots navigating through complex environments with narrow passages. Firstly, we employed a grid-based discretization of the map and assigned labels to each grid point based on the distribution of obstacles, implementing diverse sampling strategies for different labeled grid points to enhance the algorithm’s sampling ability within narrow passages. Secondly, we reduced the generation of free segments by limiting the connections between free points and other excessively distant free points, thereby decreasing the algorithm’s computational overhead and enhancing its operational speed. Thirdly, we utilized pruning techniques to eliminate redundant points from the path, ensuring that, even with the exclusion of certain undirected line segments, the algorithm can still yield shorter paths. Finally, extensive comparative experiments with the original PRM and RRT algorithms demonstrated that our proposed PRM algorithm not only improves planning success rates but also significantly reduces algorithm execution times, effectively addressing path planning challenges in narrow workspace environments. The GN-PRM algorithm can be widely applied in industrial production, distribution logistics for AGVs, wheeled robots, and in other areas. Researchers involved in AGV or robot path planning can refer to our paper for insights, utilizing our grid-based non-uniform probability density sampling method to reproduce the paper’s results or to pioneer new algorithms. The results of this paper are reproducible.
The GN-PRM algorithm proposed in this paper primarily addresses the path planning problem for mobile robots in a globally static state. However, the planned route might not be suitable for the robot’s kinematic model in real-world scenarios, especially when dealing with large turning angles. Furthermore, in practical workspaces, the information regarding complex environments often changes over time. Therefore, integrating the PRM algorithm with other methodologies to achieve enhanced navigation results and address path planning challenges in dynamic environments is a crucial research direction. Combining this algorithm with dynamic window methods, deep learning approaches, and other dynamic obstacle-avoidance methods is a promising research avenue, providing valuable insights for fellow researchers.