Introduction

Path planning technology is crucial for ensuring that mobile robots can navigate safely and efficiently through complex and dynamic environments1. In this process, the robot must determine a precise and adaptable path based on its surroundings2. The planned route should minimize travel distance while ensuring that the path is smooth and unobstructed to prevent collisions and enhance operational safety3. Among the various algorithms, the A* algorithm is one of the most widely used and holds a central role in path planning. However, there is still considerable room for improvement and optimization. Yang et al.4 have innovatively combined the A* search algorithm with the Artificial Potential Field (APF) method to enhance safety and ensure smoother global path planning for autonomous vehicles, particularly addressing vehicle turning constraints. Zhang et al.5 developed a path fitting and navigation technique that combines the improved A-Star algorithm and Support Vector Machine Regression (SVR) to meet the needs of autonomous navigation robots for accurate autonomous navigation in an orchard environment. Then, a minimum radar cross-section (RCS) tactic is proposed for path replanning against robber threats. Duan et al.6 integrated the DWA with the enhanced A* algorithm for robot navigation. This approach adaptively adjusts the cost function to enhance search efficiency by incorporating environmental data into the augmented A* algorithm. To optimize the global path, critical nodes are prioritized for planning, unnecessary nodes are removed, and only essential path points are retained. The DWA evaluation function is then based on data from these critical nodes, with the local path defined through dynamic window regulation, focusing on critical nodes as midpoint targets to improve path smoothness while achieving global path optimization and real-time obstacle avoidance7. In environments that are variable and unpredictable, relying solely on global path-planning algorithms often proves inadequate, as these methods cannot anticipate or avoid unknown obstacles8. Therefore, during navigation, mobile robots must employ more detailed and specific local planning strategies to promptly avoid obstacles. Common local path planning strategies include APF9, DWA10, and temporal elastic band algorithms11.

The DWA algorithm uses path information generated by global path planning12 to perform local path planning and then outputs the robot’s velocity information to drive the robot. Jiang et al.13 applied a two-delay depth deterministic strategy gradient algorithm to an automated guided vehicle (AGV) system. This approach generates auxiliary candidate trajectories through reinforcement learning in the prediction domain and introduces a variable sampling mechanism to enhance the flexibility and adaptability of trajectory generation. Liu et al.14 focused on optimizing the trajectory evaluation function of the DWA, improving it to make local path planning smoother and more coherent. This enhancement significantly reduces the difficulty the robot faces in executing motion commands and improves overall navigation efficiency. Wang et al.15 redefined obstacle avoidance as an optimal learning incentive problem and optimized the DWA obstacle avoidance trajectory evaluation function by integrating the reward incentive mechanism of deep deterministic policy gradient with experience replay techniques. This approach not only addresses the limitation of the DWA algorithm’s tendency to fall into local optima in complex environments but also solves challenges related to the robot’s motion control during continuous speed changes and steering angle selections, thereby achieving a more intelligent and flexible obstacle avoidance strategy.

Numerous studies mentioned above have achieved good planning path results for planning local or global paths for mobile robots. However, the traditional A* and DWA algorithms have slow iteration speeds and poor robustness for autonomous navigation of mobile robots in multiple indoor environments. Simple serial superposition of relations may lead to the deterioration of path planning efficiency, which leads to the problem of long task execution time for mobile robots. Therefore, to address the above problems, this study proposes an IA-DWA algorithm, which makes it suitable for fast response of global and local path planning for mobile robots, improves the efficiency of obstacle avoidance, and reduces the response time. The paper makes the following contributions:

  1. 1.

    The A* global path planning algorithm is improved by refining aspects such as heuristic function selection, weight coefficients, search neighborhoods, and search strategies. This optimized algorithm is then integrated with the DWA algorithm.

  2. 2.

    Improved IA-DWA simulates path planning through raster maps of varying complexity. Evaluate the improved method, the original A* algorithm, and the DWA algorithm to verify their reliability.

  3. 3.

    A mobile robot experimental platform is constructed for SLAM and autonomous navigation experiments, verifying the feasibility of the proposed research.

Methodology

Odometer and IMU data fusion

In this paper, raster maps are employed to construct the map model, and IMU sensors are incorporated to enhance map construction accuracy. The common EKF algorithm is used to fuse information from the IMU and odometer, reducing errors caused by wheel slippage and providing more precise positioning for the mobile robot. The IMU, which includes a gyroscope and an accelerometer, measures an object’s angular velocity and acceleration in three-dimensional space16. The fusion of IMU and odometer data using EKF is illustrated in Fig. 1.

Fig. 1
figure 1

Flow chart of IMU and odometer data fusion.

Robot global path planning

This paper delves deeply into optimization strategies for the A* algorithm, significantly enhancing its performance through multi-dimensional refinements. A new path planning and obstacle avoidance algorithm is developed by integrating the optimized A* algorithm with the DWA. To demonstrate the effectiveness of this integrated approach, simulations are conducted on the MATLAB platform, showcasing the path planning and obstacle avoidance processes in complex environments.

  1. 1)

    Selection of the heuristic function

The heuristic function has a great impact on the performance of the A* algorithm. Its main role is to guide the A* algorithm towards the right goal. In this paper, the European distance formula is used.

  1. 2)

    Weighting factor

Unlike traditional A* algorithms17, path prediction of the improved method incorporates arcs and straight-line segments instead of relying solely on straight lines. Dynamic constraints and various factors influence the duration of both straight and arc trajectories differently. For enhanced accuracy, the prediction process is segmented into steering and straight-line travel components. Consequently, the prediction function equations have been revised to Eqs. (1-3).

$$f(n) = g(n) + \left( {1 + \frac{d}{D}} \right)\left( {h_{1} (n) + h_{2} (n)} \right)$$
(1)
$$h_{1} \left( n \right) = \left\lceil {\frac{{\Delta \varphi_{n} }}{{\varphi_{\max } }}} \right\rceil * dT$$
(2)
$$h_{2} \left( n \right) = \frac{{\sqrt {\left( {x_{t} - x_{on} } \right)^{2} + \left( {y_{t} - y_{on} } \right)^{2} - R^{2} } }}{{\mathop v\nolimits_{\max } }}$$
(3)

where \(d\) is the distance from the current state to the target, \(D\) is the distance from the start state to the target, \(\Delta \varphi_{n}\) is the deviation of the current state of the robot from the direction of the steering target; \(\varphi_{\max }\) is the maximum deviation of the robot’s direction within the stroke dT; and the coordinates of the target. \(x_{on}\) and \(y_{on}\) are the coordinates of the turning center; vmax is the maximum speed of the robot.

  1. 3)

    Search neighborhoods

Based on the relative positions of the endpoints and the robot18, the direction search without results is canceled, thus reducing the waste of time and improving the robot’s pathfinding efficiency. In the process of searching the path, the angle between the line connecting the current point and the target point and the direction of the number 2 is set to α. Figure 2 shows the search node graph. In this paper, new direction search rules in Table 1 are developed.

Fig. 2
figure 2

Graph of search nodes.

Table 1 Direction of search rules.
  1. 4)

    Search strategy

The A* algorithm primarily aims to select the path with the shortest distance during the search process19. However, this approach results in traversing an excessive number of nodes, which adversely impacts search efficiency. To address this issue, we propose a bidirectional A* search strategy. This approach mitigates redundant node computations by simultaneously searching paths from both the start and end points in both directions. A detailed flowchart of the bidirectional A* search algorithm is shown in Fig. 3.

Fig. 3
figure 3

Flow of the bi-directional search A* algorithm.

  1. 5)

    Path smoothing

To ensure continuity and smoothness of the path and avoid wheel slippage, three quasi-uniform B-spline curves are employed to enhance the optimal path’s smoothness. To tackle issues such as inadequate B-spline curve fitting and excessive curvature, we propose an improved path-smoothing method for these three quasi-uniform B-spline curves. This method adaptively adjusts the path control points to meet the desired constraints. By increasing the number of control points, smoother curves that more closely approximate the optimal path are achieved. Various coefficients are applied to adjust the number of control points based on the mobile robot’s corner dimensions. Equation (4) provides the formula for selecting the control point distances.

$$x = \frac{d}{3} + \left( {\frac{d}{5} - \frac{d}{3}} \right) \cdot \frac{90 - \theta }{{90}}$$
(4)

where the turning angle is \(\theta\), the turning distance is \(d\), and the control point distance is \(x\). When \(\theta \ge 90\), \(x = \frac{d}{3};\) when \(\theta < 90\), \(x\) is between \(\frac{d}{5}\) and \(\frac{d}{3}\), depending on the turning angle.

The polynomial form of the triple quasi-uniform B-spline curve is Eq. (5).

$$P\left( u \right) = \left[ {P_{0} P_{1} \cdots P_{n} } \right]\left[ {\begin{array}{*{20}c} {B_{0,3} \left( u \right)} \\ {B_{1,3} \left( u \right)} \\ \vdots \\ {B_{n,3} \left( u \right)} \\ \end{array} } \right] = \sum\limits_{i = 0}^{n} {P_{i,3} (u)}$$
(5)

When \(n = 3\), the basis function is Eq. (6).

$$\left\{ {\begin{array}{*{20}c} {B_{0,3} \left( u \right) = \frac{1}{6}\left( {1 - t} \right)^{3} } \\ {B_{1,3} \left( u \right) = \frac{1}{6}\left( {3u^{3} - 6u^{2} + 4} \right)} \\ {B_{2,3} \left( u \right) = \frac{1}{6}\left( { - 3u^{3} + 3u^{2} + 3u + 1} \right)} \\ {B_{3,3} \left( u \right) = \frac{1}{6}u^{3} } \\ \end{array} } \right.$$
(6)

The expression for the curvature of the triple-fitted uniform b-sample curve is Eq. (7).

$$\rho \left( u \right) = \frac{{p^{\prime \prime } \left( u \right) * p^{\prime } \left( u \right)}}{{p^{\prime } (u)^{3} }},\;\rho \left( u \right) \le \rho_{\max }$$
(7)

When the road curvature at a corner fails to meet the curvature constraints, the smoothing section is updated by resetting the control points. This involves replacing the node that does not satisfy the curvature constraint with two new nodes. As shown in Fig. 4, the two control points, as determined by Eq. (4), together with the corner points, create an isosceles triangle. This adjustment transforms the original obtuse angle into two acute angles, resulting in a refitted path that complies with the maximum curvature requirement.

Fig. 4
figure 4

Improved smoothing method operation diagram.

Fusion of global and local path planning algorithms

In this study, a novel path-planning algorithm is developed by integrating the improved A* algorithm with the DWA path-planning technique. This integration significantly enhances the global search capability of the DWA algorithm, allowing the robot to consistently follow the optimal path by incorporating key point information from the global path into its computational framework. This approach not only improves the accuracy of path selection but also ensures that the robot’s trajectory steadily converges towards the global optimum, thereby effectively enhancing the robot’s efficiency and stability, as optimized in Eq. (8).

$$\begin{aligned} g(\partial ,\lambda ) = \eta [\alpha * p\_dist(\partial ,\lambda ) + \lambda * g\_dist(\partial ,\lambda ) \hfill \\ {\kern 1pt} \, + \beta * dist(\partial ,\lambda ) + \gamma * vel(\partial ,\lambda )] \hfill \\ \end{aligned}$$
(8)

Equation (10), \(p\_dist(\partial ,\lambda )\) is the distance from the simulated target point to the global path and \(g\_dist(\partial ,\lambda )\) is the distance from the target point to the critical point. The flow of the fusion algorithm is shown in Fig. 5.

Fig. 5
figure 5

Integration of processes to improve A* and DWA.

Simulation and analysis of results

To test the feasibility of the fusion algorithm in autonomous navigation, comparative experiments with different types of raster maps were conducted in MATLAB R2023b. Figure 6 shows three maps with different levels of complexity. Simulating the path planning algorithm in different map environments can better verify the effectiveness and robustness of the algorithm20. Figure 6a is for a simple obstacle map, Fig. 6b is for an irregular obstacle map, and Fig. 6c is for a complex map with multiple obstacles. The three maps mentioned are referred to as Map-1, Map-2, and Map-3.

Fig. 6
figure 6

Different types of raster maps.

Figure 7a shows path planning in a low-complexity map. Its obstacle distribution is sparse, and the improved algorithm path planning is straighter. Figure 7b shows the corresponding medium complexity map with diverse obstacle distribution the improved algorithm path removes redundant nodes and avoids dense regions. Figure 7c shows a high-complexity map where the improved algorithm’s planned path is shorter than the original algorithm and no redundant nodes are generated.

Fig. 7
figure 7

The effect of different map path planning.

Figure 8 compares the path length results of automatic path navigation. In Fig. 8a, the IA-DWA algorithm requires an average path length of 26.3 cm, 1.03 cm shorter than the original A* algorithm and 0.42 cm shorter than the A*-DWA algorithm. In Fig. 8b, the IA-DWA algorithm requires an average path length of 25.9 cm, 1.63 cm shorter than the original A* algorithm and 0.49 cm shorter than the A*-DWA algorithm. In Fig. 8c, the IA-DWA algorithm has an average path length of 46.12 cm, 1.04 cm shorter than the original A* algorithm and 0.25 cm shorter than the A*-DWA algorithm. The IA-DWA algorithm shows the most significant improvement on complex maps.

Fig. 8
figure 8

Comparison of autonomous navigation path lengths.

The rotation times of the autonomous navigation cart are illustrated in Fig. 9. In Fig. 9a and b, the IA-DWA algorithm achieves the shortest rotation times, with reductions of 2.54 s and 3.18 s compared to the original A* and A*-DWA algorithms, respectively. In Fig. 9c, due to the increased map size, the IA-DWA algorithm still demonstrates superior performance, requiring 3.54 s less rotation time than the original A* algorithm and 3.98 s less than the A*-DWA algorithm.

Fig. 9
figure 9

Comparison of autonomous navigation turning times.

The iterative process of the optimized path algorithm for the autonomous navigation cart is shown in Fig. 10. In Fig. 10a and b, the IA-DWA algorithm achieves the fastest iteration speed, obtaining the optimal path after 60 iterations with the shortest path length. In Fig. 10c, the IA-DWA algorithm converges after 33 iterations, whereas the A* and A*-DWA algorithms converge more slowly, averaging 59 iterations. This demonstrates the reliability of the improved algorithms in path planning.

Fig. 10
figure 10

Comparison of autonomous navigation iteration process.

Experiment

Hardware platform construction

This section presents the construction of an experimental platform using a microcomputer mainframe and LIDAR, among other components. The platform is then utilized to analyze the navigation system. A two-wheel differential mobile robot realizes autonomous navigation experiment in real environments. The robot hardware platform is shown in Fig. 11. The built mobile robot motion control substrate mainly consists of modules such as a microcomputer host, a one-two dual-drive hub driver, two 400 motors, and a power supply. One of the key feedback elements is the wheel encoder of the MDR400 dual motor drive, which is mainly used to obtain information such as wheel speed, displacement, and direction for precise control. Specific MDR400 motor drive parameters are shown in Table 2.

Fig. 11
figure 11

Hardware platforms for mobile robots.

Table 2 MDR400 motor drive parameter.

Experiments in SLAM mapping for mobile robots

To evaluate the effectiveness of the mobile robot in mapping after integrating the IMU data, we chose a corridor. Obstacles were placed to assess the ability of the mobile robot to localize the map. The experimental setup is shown in Fig. 12.

Fig. 12
figure 12

Experiments on synchronized localization and map building for mobile robot.

Figure 13 shows a map of the corridor. Initially, the ends of the corridor and the middle section were selected as measurement points. At each designated location, the width was measured three times using a tape measure, and the average width was calculated. Subsequently, by analyzing the number of raster and their dimensional proportions in the real environment, the corridor’s width at each measurement point on the map was accurately determined, as shown in Tables 3 and 4. The tables indicate that while the initial error of the map is minimal, the error in the robot’s map building increases as the distance traveled by the mobile robot grows. Comparison results show that the maps generated by integrating odometer and IMU data have less error and reflect the real environment more accurately.

Fig. 13
figure 13

Map of the corridor.

Table 3 Accuracy of single odometer raster maps.
Table 4 Accuracy of raster maps incorporating odometer and IMU.

The basic framework of the Gmapping algorithm is built in a physical prototype of a mobile robot. In order to ensure the reliability of subsequent autonomous navigation and avoid the influence of navigation and localization errors on trajectory planning, therefore, multiple SLAM methods are compared, and the SLAM with the highest accuracy is used as the basic framework, as shown in the Table 5 for the comparison results.

Table 5 Comparison results of different SLAM algorithms.

As shown in Table 5, the RBPF-SLAM algorithm has the worst localization effect. The Hector-SLAM algorithm has a worse localization effect in the corridor environment, with a relative error of 6.3%. The Karto SLAM algorithm relies on the accuracy of the odometer, with an absolute error of 0.04 m and a relative error of 3.5%. The Gmapping and Karto SLAM algorithms have the best effect in indoor map building, but to ensure real-time operation, Gmapping with a shorter running time is chosen as the localization and map building method.

Mobile robot autonomous navigation experiment

The IA-DWA algorithm is deployed in the ROS system to make it applicable in the current trajectory path planning and execution of mobile robots. The algorithm deployment and packaging process is shown in Fig. 14. First build the IA-DWA class file, add the cpp and h file to the library of CMakeLists, register the class to convert it to a structured Xml file, which contains the library name, address, and type. Import the library file into the ROS system, use the Launch execution file to command the robot to perform basic mobile operations, including path position movement, rotation, and obstacle avoidance operations, and finally realize the path planning process of the mobile robot entity.

Fig. 14
figure 14

The algorithm deployment and packaging process.

When an endpoint is designated in the Rviz software, the robot can employ this algorithm to devise a comprehensive global path, as illustrated in Fig. 15. The results show that the fusion algorithm presented in this study notably elevates the efficacy of path planning, demonstrating superior adaptability and stability.

Fig. 15
figure 15

Global path planning for mobile robot.

Mobile robots may encounter both static and dynamic unknown obstacles while navigating in real-world environments. Thus, static unknown barriers are introduced, and dynamic, unpredictable obstacles with pedestrians are modeled. This complex setup enables a comprehensive evaluation of the performance of the obstacle avoidance strategies and algorithms employed by the mobile robot when facing unknown obstacles. Figure 16 shows a scenario where the robot encounters dynamic pedestrians during navigation. As the robot begins its journey from the starting point, it can promptly scan for pedestrians as they appear, allowing it to plan a path that avoids these dynamic obstacles promptly.

Fig. 16
figure 16

Robot encounters a dynamic pedestrian situation.

Figure 17 shows the robot navigating toward the target point while avoiding obstacles. Global paths are presented as green curves and local paths are presented as red curves. Figure 17 demonstrates that the robot avoids obstacles and continues along the optimal path. The local path consistently converges towards the global optimal state during local obstacle avoidance. In this autonomous navigation experiment, the improved algorithm enables the mobile robot to swiftly identify a smooth, collision-free path with the shortest distance, allowing it to reach the designated target point safely, the experimental results verify the feasibility of the algorithm in this paper.

Fig. 17
figure 17

Motion process of a robot avoiding an unknown static obstacle (a) scanning for obstacles; (b) dodge the first obstacle; (c) dodge the second obstacle; (d) dodge the third obstacle; (e) get to the end point.

In above Fig. 17, there are four obstacles. The IA-DWA algorithm employs a new path-smoothing strategy to improve the path execution accuracy. Therefore, wheel slip is used as an important evaluation index. This experiment monitors the wheel slip phenomenon when passing through four obstacles. The wheel slip before and after using the improved algorithm is shown in Fig. 18.

Fig. 18
figure 18

Wheel slip before and after using the improved algorithm.

As shown in Fig. 18, 20 sets of trajectories are navigated using the original method with improved algorithms, and data collection is performed on the slip. The average error of autonomous navigation of the mobile robot through four obstacles in an indoor hallway is between 0.56 and 0.89 cm. Using the improved method, path smoothing resulted in a decrease in wheel slip, and the average error of the mobile robot passing four obstacles was between 0.24–0.62 cm, and the overall slip decreased by 0.29 cm, which verified the reliability of trajectory smoothing in the improved algorithm for reducing wheel slip.

Conclusion

In this paper, IMU sensors are integrated with the Gmapping algorithm to enhance robot localization, and the odometer and IMU data are fused using the EKF to achieve more accurate position estimation. The improved A* algorithm and DWA algorithm are combined for path planning, and the effectiveness of this fusion in path planning and obstacle avoidance is demonstrated through simulation, achieving full autonomous navigation of the mobile robot. An experimental platform for the mobile robot is then constructed, and map construction and autonomous navigation experiments are conducted in various indoor environments. In the map construction experiment, maps generated before and after fusing odometer and IMU data are compared, showing that the fused data significantly improves map accuracy. In the autonomous navigation experiments, the robot successfully plans a smooth, collision-free path with the shortest distance to reach the target point safely. These experiments demonstrate that the proposed autonomous navigation system significantly enhances the intelligence and automation of robots.

The current work lacks algorithmic trajectory optimization for mobile robots under kinematic and dynamic constraints, and there is a lack of research on trajectory planning for dynamic obstacles. In future work, the improvement method should be carried out in a variety of factory or indoor environments for operational experiments and consider dynamic obstacles and human–robot collaboration for further performance enhancement of the IA-DWA algorithm. The mobile robot based on the IA-DWA algorithm can be applied in the future to multiple complex environments such as multi-task point path handling under factories or indoor cleaning and disinfecting, to achieve global and local path optimization and to improve the efficiency of executing tasks.