Introduction

Since the beginning of the twenty-first century, the world has entered an era of global economic integration, with a significant increase in international trade between countries1. Approximately 80% of transnational trade now occurs via maritime routes, highlighting the pivotal role that ports play in facilitating country-to-country trade2. Nations are increasingly prioritizing the development of port infrastructure to enhance their competitive edge in the global market. For example, China’s 2013 launch of the “Belt and Road” initiative underscores the importance of the “Maritime Silk Road” as a vital trade corridor connecting nations3. In 2016, trade on sea routes accounted for 90% of African total trade, and the economic benefits generated by trade in ports have become deeply bound up with the well-being of the African population4. Based on this economic environment, establishing a reliable and efficient port trading system is crucial for the economic development of port cities and their countries. Especially for developing countries, which are highly dependent on global trade for their economic growth, building smart ports is urgent5.

In assessing the efficiency of a port, various evaluation indicators are considered, such as size, geographical location, equipment condition, and workforce size. Among these indicators, the intelligence and automation level of the port are crucial factors for evaluation6. Among the many automated devices, Automated Guided Vehicles (AGVs) are highly valued by researchers because of their ability to autonomously perform braking, turning, navigation, and handling tasks without human intervention.

In order to fulfill the various tasks in the port, AGV needs to plan out a path that is safe, feasible, and time-efficient7. AGV path planning is typically segmented into two key stages based on the detailedness of the map information: global path planning and local path planning8. Global path planning involves charting the shortest path for the AGV, given a known map layout. There are various classical algorithms for the global planning path, such as the Dijkstra algorithm9, the BFS algorithm10, the A* algorithm, the JPS algorithm, etc. Of these, Dijkstra’s algorithm, although reasonable in determining the shortest path, has lagged in its search efficiency and has therefore decreased in use in recent years; in contrast, the BFS algorithm addresses the efficiency issue but BFS algorithm cannot guarantee that the end result is the shortest path11. The A* algorithm integrates the strengths of both Dijkstra algorithm and BFS algorithm. This algorithm significantly enhances search efficiency and ensures that the path identified is the shortest. This makes the A* algorithm one of the most critical global planning algorithms today12. The JPS algorithm is based on the A* algorithm, ignoring unnecessary nodes and focusing on key nodes, which is superior to the A* algorithm in terms of search efficiency13. Many researchers have also improved these algorithms for these algorithms in recent years, for example, Zhang et al. dynamically adjusted the AGV turning process by judging the angle of the AGV when turning and improved the A* algorithm based on this idea, reducing the number of turns in the pathfinding process to make the path smoother14. Sun et al. combined the octagonal search method with the Dijkstra algorithm to significantly reduce the probability of collision with obstacles during AGV travel15. Zhang et al. proposed the “Congestion Control” strategy, combining it with the JPS algorithm to solve the congestion problem during AGV handling16.

In addition to global planning algorithms, local path planning algorithms are also extremely important in the entire path planning process, as they allow AGV to avoid obstacles that suddenly appear during driving and deal with moving obstacles. Local path planning algorithms mainly include the DWA algorithm17, artificial potential field algorithm18 combined with deep learning algorithm, etc. To improve path planning for mobile robots, many researchers have optimized local path planning algorithms; for example, Wu et al. further refined the evaluation function in the DWA algorithm to improve the precision of path planning19. Li et al. split the DWA evaluation function into two segments based on the distance between the obstacle and the front and rear ends of the AGV, which improves the precision of path planning and safety during travel20.

Unfortunately, despite the abundance of research on AGV path planning, path planning algorithms for AGV in port environments still have many shortcomings. For example, Hao et al. utilized the ant colony algorithm to reduce obstacle collisions during AGV path planning21. However, no significant enhancements were observed in path planning time and path length. On the other hand, Meng et al. improved path planning speed employing the artificial fish swarm algorithm22, while Tang et al. minimized redundant nodes in the path planning process through the geometric A* algorithm, leading to improved path planning speed23. Zhong et al. solved the shortest distance model with the help of Dijkstra’s algorithm to solve the problem of vehicle congestion and conflicts in port24. Yue et al. combined the Dijkstra algorithm with the Q-Learning algorithm to reduce the probability of path conflicts between multiple AGVs in port25. However, the above mentioned studies have only improved the global path planning algorithm. Based on these issues, it remains to be verified whether there is a real improvement in the local obstacle avoidance capability and the integrated path planning efficiency of AGVs in the port environment.

A practical path planning algorithm should have short search and navigation times, minimize path lengths and turn frequency, generate smooth paths, and be able to avoid sudden and dynamic obstacles while finding a path. Addressing these requirements, the main contributions of this paper are as follows:

  1. 1.

    Firstly, the key obstacle was introduced based on the heuristic function of the traditional JPS algorithm, which is modified to reduce the search space and the number of collisions with obstacles.

  2. 2.

    Considering that AGV can fall into local optima when using the traditional DWA algorithm for dynamic obstacle avoidance, this paper subdivides the braking distance evaluation function into two parts based on whether the obstacle is a key obstacle, effectively solving the problem of the DWA algorithm potentially falling into local optima and further controls the safe distance between the AGV and the obstacle.

  3. 3.

    The improved JPS algorithm and the DWA algorithm are merged and applied to planning the AGV path in the port environment. After comparing with other mainstream algorithms, significant improvements in navigation time, number of turns, number of collisions with unknown obstacles, and navigation path were found.

Kinematic modeling

Kinematic modeling is conducted based on the following assumptions:

  1. 1.

    When AGV is in turning motion, it is considered a rigid body, mainly moving in a two-dimensional plane, and the wheels do not deform due to contact with the ground.

  2. 2.

    The motion of AGV is purely rolling without any occurrence of tangential sliding.

Based on the above two assumptions, the kinematic model of AGV is constructed as shown in Fig. 1a. A coordinate system \(O-XY\) is established with the starting point of the AGV movement, and an AGV coordinate system \(C-XcYc\) is established with the geometric center of the AGV, where \(\theta \) represents the angle of direction. The constraint equations of this simplified model are as follows:

$$\begin{aligned} \dot{y_c}cos\theta -\dot{x_c}sin\theta =0 \end{aligned}$$
(1)

The kinematic model of the AGV chassis can be represented by the following equation:

$$\begin{aligned} {\dot{q}}=[\dot{x_c},\dot{y_c},{\dot{\theta }}]^T \end{aligned}$$
(2)

Based on the simplified differential kinematic model, Eqs. (3 and 4) are defined as follows:

$$\begin{aligned} \eta =[v,\omega ]^T \end{aligned}$$
(3)
$$\begin{aligned} S(q)=\begin{pmatrix} cos\theta & 0\\ sin\theta & 0\\ 0 & 1\\ \end{pmatrix} \end{aligned}$$
(4)

Where v is the linear velocity, \(\omega \) is the angular velocity, according to Eqs. (3 and 4), \({\dot{q}}\) can be expressed as Eq. (5).

$$\begin{aligned} {\dot{q}}=\eta S(q) \end{aligned}$$
(5)

According to the rigid body kinematic model, the linear velocity and angular velocity at the geometric center of the simple rigid body model can be determined:

$$\begin{aligned} \begin{matrix} {\left\{ \begin{array}{ll} v = \frac{v_l+v_r}{2} \\ \omega = \frac{2(v_l-v_r)}{l} \\ \end{array}\right. } \end{matrix} \end{aligned}$$
(6)

According to Eq. (6), we can determine the kinematic law of the velocity change relative to the position of the AGV differential, as shown in Eq. (7).

$$\begin{aligned} {\dot{q}}=\begin{pmatrix} \frac{cos\theta }{2} & \frac{cos\theta }{2}\\ \frac{sin\theta }{2} & \frac{sin\theta }{2}\\ \frac{l}{2} & \frac{-l}{2}\\ \end{pmatrix} \end{aligned}$$
(7)
Fig. 1
figure 1

AGV kinematic discrete modeling. (a) AGV kinematic modeling. (b) AGV discrete kinematic modeling.

In practical problems, discretizing Eq. (7) is often necessary. The discretized model is shown in Fig. 1b. According to this model, the pose of the AGV is calculated, and the distance moved by the AGV within \(\Delta t\) is determined as:

$$\begin{aligned} \Delta S_k=v \Delta t \end{aligned}$$
(8)

The change in heading angle of the AGV relative to the initial position is:

$$\begin{aligned} \Delta \theta _k= \omega \Delta t \end{aligned}$$
(9)

As a result, the position of the AGV is:

$$\begin{aligned} q=[x_c(k+1),y_c(k+1),\omega _c(k+1)] \end{aligned}$$
(10)

The movement of the AGV during this short period can be regarded as arc motion, with the radius of the arc being:

$$\begin{aligned} r_k=\frac{\Delta S_k}{\Delta \theta _k}(\Delta \theta _k \ne 0) \end{aligned}$$
(11)

At this point, the pose of the AGV is:

$$\begin{aligned} \begin{pmatrix} x_c(k+1) \\ y_c(k+1) \\ \theta (k+1) \\ \end{pmatrix} =\begin{pmatrix} x_c(k)+r_c(sin(\theta (k)+\Delta \theta _k)-sin \theta (k)) \\ y_c(k)+r_c(cos(\theta (k)+\Delta \theta _k)-cos \theta (k)) \\ \theta (k) + \Delta \theta _k \\ \end{pmatrix} \end{aligned}$$
(12)

When \(\Delta \theta _k=0\), the movement time of the AGV is very short. At this time, the movement path of the AGV can be approximated as a branch line, and the posture of the AGV at this time is shown in Eq. (13).

$$\begin{aligned} \begin{pmatrix} x_c(k+1) \\ y_c(k+1) \\ \theta (k+1) \\ \end{pmatrix} \begin{pmatrix} x_c(k)+\Delta S_k cos \theta (k) \\ y_c(k)+\Delta S_k sin \theta (k) \\ \theta (k) \\ \end{pmatrix} \end{aligned}$$
(13)

The main parameters of the AGV used in this paper are shown in Table 1.

Table 1 Main parameters of the AGV.

The optimal path problem

Traditional path planning algorithms focus mainly on finding the shortest path. In Fig. 2, the red numbers indicate the length of movement between neighboring points. To illustrate, if one intends to travel from point 1 to point 7, the primary concern is the path incurs the least cost. That is, traditional global path planning algorithms solve the problem of:

$$\begin{aligned} F=Min\{L_{path}\} \end{aligned}$$
(14)

where \(L_{path}\) represents the path length.

Fig. 2
figure 2

The shortest path problem.

However, the shortest path is often not the optimal path. For example, the shortest path often results in the AGV traveling close to obstacles, but the AGV itself has a certain volume, and this kind of path is not feasible in practical applications, or a path although the shortest distance needs to turn frequently, AGV in the process of turning time is not taken into account. Especially in port environments with many obstacles and complex environments, these problems can greatly affect the efficiency of AGVs and may even lead to safety problems. Some variables are listed to make the actual situation more compatible with the port environment studied in this paper, as shown in Table 2.

Table 2 Variable table.

With F as the objective function, the formula is as follows:

$$\begin{aligned} F=Min\{\alpha i+\beta T_f+\gamma L_{path}\} \end{aligned}$$
(15)

subject to:

$$\begin{aligned} V \le V_{max} \end{aligned}$$
(16)
$$\begin{aligned} S_A < S_{OA} \end{aligned}$$
(17)
$$\begin{aligned} T_i = \frac{A_i}{\omega } \end{aligned}$$
(18)
$$\begin{aligned} T_f = \frac{L_{path}}{V} + T_i \end{aligned}$$
(19)

where \(\alpha \),\(\beta \),\(\gamma \) are weighting coefficients, which can be adjusted according to specific needs, in a more efficiency-oriented port environment, shorter total journey time and safer travel process are more significant compared to shorter paths, so the weights of \(\alpha \) and \(\beta \) can be appropriately increased.

JPS algorithm improvement

Traditional JPS algorithm

JPS algorithm, full name is Jump Point Search algorithm. It adds valuable nodes to the OpenList based on two specific rules26. The two rules are the Look Ahead Rule and the Jump Rule27. The basic idea revolves around sorting the cost of optional nodes around the current node, selecting the node with the lowest cost, and repeating the process until the destination point is reached. Its evaluation function is consistent with the A* algorithm, and the expression is as follows:

$$\begin{aligned} f(n)=g(n)+h(n) \end{aligned}$$
(20)

In Eq. (20), g(n) represents the actual cost of AGV from the starting point of the path to the current node n, and h(n) is the minimum estimated cost from AGV’s current node n to the destination point. Typically, h(n) is defined as the Manhattan distance from the starting node to the current node n, expressed as follows:

$$\begin{aligned} h(n)=|x_n-x_0|+|y_n-y_0| \end{aligned}$$
(21)

Improvements to the JPS algorithm

In the port environment, numerous fixed obstacles, such as large containers and operating equipment, differ distinctly from environments such as orchards or urban streets. Unlike the orderly arrangement of obstacles in orchards or the fixed positions of obstacles in urban streets, port terminals present obstacles diverse in shapes and complex arrangements. Moreover, due to the constant movement of cargo, the positions of these obstacles frequently change. As a result, global path planning in a port environment is computationally intensive. Therefore, it is imperative to reduce the computational complexity of the algorithm, improve the efficiency of path planning, and minimize collisions with obstacles to facilitate smoother navigation.

Key obstacle heuristic function

The heuristic function h(n) plays a dominant role in the traditional JPS algorithm. In the traditional JPS algorithm, the heuristic function h(n) is calculated based on the Manhattan distance from the AGV’s current node to the target node. As shown in Fig. 3, the traditional JPS algorithm considers most nodes on the path.

Fig. 3
figure 3

JPS algorithm search path and scope. (a) JPS Search Path. (b) JPS search scope.

Based on this issue, this paper proposes a new heuristic function: the Key Obstacle Heuristic Function.

In Fig. 4a, black grids represent regular obstacles, and to get from the starting point to the target point, the AGV must pass through the brown grid. There are multiple feasible paths for the AGV to reach these key points. However, as shown in Fig. 3b, the traditional JPS algorithm must traverse most of the nodes to plan the path, which is too computationally intensive.

Fig. 4
figure 4

Judging key obstacles. (a) Simulated girds map. (b) Red grids represent grids that AGV will definitely pass through on the path. (c) Red grids are key obstacles, and yellow grids are key nodes adjacent to key obstacles.

In reality, the AGV does not need to search all the nodes to plan a feasible path; it only needs to focus on the paths that must be traveled to reach the key points. As shown in Fig. 4b, the AGV that wants to arrive at the target point will inevitably pass through one or more of the red grids no matter which path it chooses, and the obstacles adjacent to these red grids are called “Key Obstacle.” Among the nodes adjacent to these key obstacles, we need to identify a node to ensure that the AGV can reach the target point safely and with a shorter path. For this purpose, we give the critical obstacle function K(O):

$$\begin{aligned} K(O)=|x_s-x_o| \times |y_s+y_o|+|x_o-x_k| \times |y_o-y_k| \end{aligned}$$
(22)

where the current coordinates is \((x_o,y_o)\), where the starting point coordinates are \((x_s,y_s)\) and the key point coordinates are \((x_k,y_k)\). Through Eq. (22), the key obstacle function values can be calculated for different nodes, and the node with the minimum value is selected. As illustrated in Fig. 4c, the yellow grid represents the node with the minimum K(O) value, and the red obstacle associated with this grid is considered the key obstacle. After identifying the key obstacle, the AGV only needs to directly reach the node with minimum cost near the key obstacle.

Once the key obstacle is determined, the AGV no longer needs to traverse to find useless nodes on the path from the starting point to the key point; it only needs to focus on the key obstacle. Similarly, when the AGV reaches the key point, the key obstacle for the next key point is determined similarly until it reaches the target point. The search area of the improved algorithm is shown in Fig. 5, which is significantly reduced compared to the traditional JPS algorithm in Fig. 3.

Fig. 5
figure 5

Improvement of JPS algorithm to search area. (a) Improvement of JPS Search Path. (b) Improvement of JPS search scope.

Fig. 6
figure 6

Comparison of global path planning results. (a) Simulated path of the traditional JPS algorithm. (b) Simulated path of the improved JPS algorithm.

As shown in Fig. 6a, the global path planned by the traditional JPS algorithm, while Fig. 6b depicts the global path planned by the JPS algorithm with the inclusion of key obstacle determination. Evidently, the improved path is smoother, with fewer turning points, lower planning costs, and adequate safety distance reserved when turning to avoid obstacles.

The pseudo code of the improved JPS algorithm is shown in Algorithm 1.

Algorithm 1
figure a

Improvement Jump Point Search

DWA algorithm improvement

Traditional DWA algorithm

The DWA algorithm is a local path planning algorithm that corrects the path. Sampling the linear and angular velocities of the AGV at each moment simulates the trajectories that the AGV could take under various combinations of velocities. It predicts potential new obstacles in \(\Delta t\) time. An evaluation function is used to choose the optimal trajectory for the locally re-planned path. In light of the actual circumstances, the pose sampling space of the AGV is restricted by its maximum and minimum linear velocities, angular velocities, motor power, and braking distance28.

Based on these constraints, by introducing an evaluation function to predict the next trajectory, the prediction of the velocity component at the next moment of the AGV can be realized, and the locally optimal path can be planned on this basis. The following equation can express the evaluation function:

$$\begin{aligned} g(v,\omega )=\alpha \cdot heading(v,\omega )+\beta \cdot dist(v,\omega )+\gamma \cdot velociity(v,\omega ) \end{aligned}$$
(23)

In Eq. (23), \(heading(v,\omega )\) is used to evaluate the AGV’s heading deviation, \(dist(v,\omega )\) represents the minimum braking distance between the AGV and obstacles at a certain linear velocity and angular velocity, and \(velocity(v,\omega )\) denotes the sampled velocity. \(\alpha \),\(\beta \),\(\gamma \) are the weighting coefficients. These weighting factors can be adjusted to optimize the final planned path, allowing the algorithm to adapt to more different scenarios.

Optimisation of the evaluation function of the DWA algorithm

In the traditional DWA algorithm, the weight of \(dist(v,\omega )\) in the evaluation function determines the distance from the AGV to the nearest obstacle. In order to improve the obstacle avoidance performance of the DWA algorithm in complex environments and make it more suitable for port environments, and avoid falling into local optima, this paper subdivides \(dist(v,\omega )\) in the evaluation function by incorporating the concept of key obstacles, dividing it into \(dist \_ a(v,\omega )\) for evaluating the distance between the AGV and non-key obstacles, and \(dist \_ b(v,\omega )\) for evaluating the distance between the AGV and key obstacles.

$$\begin{aligned} dist \_ a(v,\omega )=\begin{pmatrix} \frac{1}{min(|x_t-x_s|-|y_t-y_s|)},min(|x_t-x_s|-|y_t-y_s|) \ge 1.2R \\ 0,min(|x_t-x_s|-|y_t-y_s|) < 1.2R \end{pmatrix} \end{aligned}$$
(24)

The coordinates \((x_t, y_t)\) represent the predicted coordinates of the DWA algorithm at time t, while \((x_s, y_s)\) represents the coordinates of non-key obstacles, and R is the length of half of the longest side of the robot chassis. To further ensure that the robot does not collide with obstacles, a space of 0.2R is reserved as the safety distance.

$$\begin{aligned} dist \_ b(v,\omega )=\begin{pmatrix} \frac{1}{min(|x_t-x_k|-|y_t-y_k|)},min(|x_t-x_k|-|y_t-y_k|) \ge 1.2R \\ 0,min(|x_t-x_k|-|y_t-y_k|) < 1.2R \end{pmatrix} \end{aligned}$$
(25)

The coordinates \((x_k, y_k)\) is the coordinates of the key obstacle. After subdividing \(dist(v,\omega )\), different weights can be assigned to key obstacles and non-key obstacles based on the actual environment. Utilizing the results of global path planning to guide local path planning further helps to avoid falling into local optima.

The evaluation function of the optimized DWA algorithm is as follows:

$$\begin{aligned} g(v,\omega )=\alpha \cdot heading(v,\omega )+\beta \cdot dist \_ a (v,\omega )+\mu \cdot dist \_ b (v,\omega )+\gamma \cdot velociity(v,\omega ) \end{aligned}$$
(26)

Implementation of the hybrid algorithm

The improved JPS algorithm enables AGV to obtain optimal solutions in global path planning in port environments and perform well in static working environments. However, relying solely on a global planning algorithm may fail to avoid unknown obstacles in the environment promptly. On the other hand, although improving the DWA algorithm for path planning allows for obstacle avoidance in the environment, it lacks global planning capabilities. This means that relying solely on the DWA algorithm may lead to getting stuck in local optima, especially in environments with many obstacles, and may even result in path planning failure. Therefore, it is necessary to integrate these two algorithms, using the concept of key obstacles as a bridge, to blend the strengths of both approaches. Its flowchart is shown in Fig. 7.

Fig. 7
figure 7

The flowchart of the hybrid algorithm.

Experimental results and analysis

Simulation experiment results and analysis

The port terminal environment features numerous obstacles with irregular shapes. The main thoroughfares are relatively clear, with numerous moving obstacles, among other characteristics29. Based on these conditions, the imitation port environment is built in reality, as shown in Fig. 8a. The grid map of the environment in Fig. 8a is created in Matlab, resulting in Fig. 8b.

Fig. 8
figure 8

Building the Port Environment. (a) Field Simulation of port environment. (b) Establishing grid map in Matlab.

As shown in Fig. 9, black blocks represent known obstacles, while blank areas represent movable areas. The start point is labeled “Start,” and the target point is labeled “Target.” The number of corners in the path can be considered as the number of turns and is marked with red dots. Compared with the traditional JPS algorithm, the improved JPS algorithm plans a path with fewer turns on the same map. The traditional JPS algorithm plans a path with 7 turns, while the improved JPS algorithm plans a path with only 4 turns.

Fig. 9
figure 9

Comparison of traditional and improved algorithms. (a) Traditional algorithm path. (b) Improved algorithm path.

While significantly reducing the number of turning points, collisions between AGV and obstacles during travel are also reduced. As shown in Fig. 10a, in the global path planned by the traditional JPS algorithm, the AGV may collide with the corners of obstacles at multiple locations. In contrast, these collision points are absent in Fig. 10b. The comparison in Table 3 shows that the improved JPS algorithm improves the navigation time by about 15.94%, reduces the number of turns by 42.85%, and also solves all the points where collisions may occur. The navigation cost becomes 10% longer; this is because the traditional JPS algorithm causes the AGV to drive or turn close to obstacles, which is unreasonable in practical applications. After all, it will lead to a collision between the AGV and the obstacles. In order to avoid this situation, AGVs are required to keep a certain distance from obstacles, which inevitably leads to a longer navigation path. This problem is solved by integrating with local path planning algorithms.

Fig. 10
figure 10

Comparison of collision points between traditional and improved algorithms. (a) Traditional algorithm paths have multiple potential collision points. (b) Improved algorithm paths have no collision points.

Table 3 Comparison of traditional JPS algorithm and improved JPS algorithm.

Simulate local path planning, selecting weight parameters for the traditional evaluation function (Eq. 23) as \(\alpha =0.2\), \(\beta =0.3\), \(\gamma =0.4\). For the improved evaluation function proposed in this paper (Eq. 26), the selected weight parameters are \(\alpha =0.2\), \(\beta =0.3\), \(\mu =0.15\), \(\gamma =0.3\).

To test the obstacle avoidance performance of traditional DWA and improved DWA algorithms in dynamic scenarios involving moving and unknown obstacles, build the simulation environment shown in Fig. 11a, yellow grid blocks represent moving obstacles. In contrast, gray grid blocks represent unknown obstacles that will not be recognized in the global path. This environment evaluates the differences in obstacle avoidance performance between traditional DWA and improved DWA algorithms.

Fig. 11
figure 11

Improvement of DWA effects. (a) Global path of improved algorithm. (b) Comparison between traditional algorithm and improved algorithm.

The navigation process is shown in Fig. 11b, where Start represents the starting point, Target represents the target point, AGV position indicates the current position of the AGV, improved path is the optimal path obtained from the hybrid algorithm, and global path represents the globally planned path.

As shown in Table 4., with the same use of the JPS algorithm to plan the global path, the improved DWA algorithm improves navigation time by 22.14%, reduces the number of turns by 2, reduces the number of possible collisions with obstacles by 2, and reduces the navigational path by 17.36%. As can be seen in Fig. 11b, the conventional algorithm needs to select a longer path to bypass the moving obstacle due to inefficient navigation; it can be seen that improving the efficiency of navigation is crucial for path selection.

Table 4 Comparison of traditional DWA algorithm and improved DWA algorithm.

Results and analyses of physical experiments

A mapping command is issued to the AGV, and the startup file of the Gmapping algorithm is executed autonomously in ROS to construct a 2D map of the test environment and use laser SLAM to map the real environment illustrated in Fig. 8a. Figure 12b shows the AGVs used for the physics experiments. As shown in Fig. 12b. The black area represents the actual position of obstacles in reality mapped by Lidar, and the white area represents the passable area. The navigation map is shown in Fig. 12c, where “Start” is the starting point, and “Target” is the target point. Have a person walk randomly around the red area to simulate moving obstacles in the port.

The hybrid algorithm improved in this paper is compared with some mainstream algorithms currently used. The selected algorithms include the traditional A*+DWA hybrid algorithm, the traditional JPS+DWA hybrid algorithm, traditional RRT+DWA hybrid algorithm, bidirectional RRT+DWA hybrid algorithm30, and A*+traditional DWA hybrid algorithm with the obstacle coefficient K introduced(hereinafter referred to as A*+K+DWA)20. They are shown sequentially in Fig. 12d–h. The algorithm in this paper is shown in Fig. 12i.

In order to compare the differences between the algorithms more intuitively, some key information is differentiated by different colors. In Fig. 12 the green circle is the position where the AGV makes a larger turn, and the blue circle is the position where the AGV collides or rubs against the obstacles. The red path is the path the AGV has traveled, the pink path is the subsequent path planned by the global path algorithm, and the green path is the actual path planned by the hybrid algorithm.

Fig. 12
figure 12

Comparison of results of physical experiments.

From the path comparison of each algorithm in Fig. 12, it can be seen that the algorithm in this paper has improved in path length, path smoothness, number of turns, number of collisions, and other indexes compared to the previous ones. Among them, except for this paper’s algorithm and the A*+K+DWA algorithm, the other algorithms cannot bypass the moving obstacles in time because of the lack of search efficiency or path planning efficiency and have to choose a longer path. Compared with the A*+K+DWA, the algorithm in this paper has fewer turns and smoother paths.

Compare the navigation time, number of turns, number of collisions with obstacles, and navigation path for each algorithm. The results are summarized in Table 5. The percentage of performance improvement is shown in Table 6.

Table 5 Comparison of this paper’s algorithm with mainstream algorithms in four metrics.
Table 6 Percentage performance improvement.

The experimental results indicate that the new algorithm proposed in this paper can meet the navigation requirements of AGV in port terminal environments. In comparison with several traditional and improved main algorithms, it can be observed that the algorithm proposed in this paper shows significant improvements in navigation time, number of turns, number of collisions with unknown obstacles, and navigation path compared to traditional and improved main algorithms. Optimization of the evaluation function significantly reduces navigation time, and the JPS algorithm is more suitable for environments with more complex obstacles than the A* and RRT algorithms. The improvement of the algorithm effectively reduces the number of turns and significantly shortens the navigation path. There is a general performance improvement of 20% to 30% in navigation time, with an increase of up to 38.57% compared to the traditional RRT+DWA hybrid algorithm. In addition, there is at least a 40% improvement in the number of turns, and collisions with unknown obstacles are reduced to zero, ensuring the safety of the AGV during travel. The improvement in navigation path ranges from 27 to 35%; this is largely due to the improved search efficiency and path smoothing of the algorithms in this paper, which allows the AGV to reach the target point faster without having to choose a longer path due to moving obstacles.

Summaries

In this paper, a hybrid algorithm is proposed for planning the route in the port environment based on key obstacles. The evaluation function and algorithmic flow of the JPS algorithm and the DWA algorithm are improved using the key obstacle concept proposed in this paper, and the improved algorithm in this paper is verified to be smoother on the path, with fewer turns and higher safety compared to the traditional algorithm by simulation experiments in Matlab. After the hybrid of the improved algorithms, physical experiments are carried out using a port environment built in reality, and comparing with five mainstream algorithms; it is verified that the algorithm of this paper has the advantages of shorter navigation paths, shorter navigation time, smoother paths, higher security, and better handling of moving obstacles in the port environment. However, there are still some unsolved problems in this paper; for example, this paper has not considered how to deal with the unevenness of the ground if it exists in the real environment and whether the experimental results in the 2D plane can be directly applied to the 3D harbor environment. These issues need to be further investigated.