# Electric Logistics Vehicle Path Planning Based on the Fusion of the Improved A-Star Algorithm and Dynamic Window Approach

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Improved the A* Algorithm

#### 2.1. A* Algorithm

#### 2.2. Improvement of Heuristic Function

#### 2.3. Three Optimizations of the Path

## 3. Improved A* Algorithm to Fuse DWA

#### 3.1. Dynamic Window Approach

#### 3.2. Improved A* Algorithm Fused with Dynamic Window Approach

- First, we obtain the map information and convert the map into a raster(1) $MAP=\left[\begin{array}{ccccc}0& 0& 1& \dots & 0\end{array}\right]$, 0 denotes the doable area, while 1 denotes the area with obstacles;
- Set the start point $({x}_{start},{y}_{start})$, target point $({x}_{target},{y}_{target})$ and the obstacle representation, with the start point position marked as $\Delta $ and the target position marked as o;
- For path planning, use the A* algorithm with an enhanced heuristic function to obtain the global planning path $Optima{l}_{path}=\left\{{X}_{i}\right|i=0,1,2,\dots ,n\}$;
- Based on improving the A * algorithm, further optimize the path three times, the first time to achieve the path optimization of avoiding obstacle boundaries, and the path $Optima{l}_{path1}=\left\{{O}_{i}\right|i=0,1,2,\dots ,m\}$; the second time to achieve the path optimization of removing redundant nodes, and the path $Optima{l}_{path2}=\left\{{P}_{i}\right|i=0,1,2,\dots ,n\}$; the third implementation of the path optimization to reduce the turning angle, to obtain the optimized final path $NewOptima{l}_{path0}=\left\{{W}_{i}\right|i=0,1,2,\dots ,o\}$;
- Set unknown static obstacles and unknown dynamic obstacles $Ob{s}_{dj}=\left[\begin{array}{ccccc}0& 0& 1& \dots & 0\end{array}\right]$, put the newly generated temporary obstacles into CLOSED and display them on the map;
- Initialize the initial values of the maximum and minimum values, acceleration, and evaluation function weights of the DWA algorithm’s electric logistics vehicle;
- Run the DWA algorithm for speed sampling and search the predicted trajectory $Pr{e}_{path}=\left\{{PT}_{i}\right|i=0,1,2,\dots ,k\}$, calculate the evaluation function according to the predicted trajectory, and select the optimal path according to the evaluation function $Bes{t}_{path}=\left\{{BT}_{i}\right|i=0,1,2,\dots ,j\}$;
- The electric logistics vehicle proceeds to the end of the optimal path $Bes{t}_{path}$ and determines whether the current node is the target point. If the current node is not the target point, steps (7) and (8) are repeated until the electric logistics vehicle reaches the target point. Figure 4 depicts the path-planning flowchart of the enhanced A* fusion DWA algorithm.

Algorithm 1: Improved A* Algorithm |

Algorithm 2: Improved A* Algorithm Integrated with DWA |

## 4. Simulation Experiment Verification and Analysis

#### Simulation Verification of RVIZ in ROS

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## Abbreviations

A* | A-star |

DWA | Dynamic Window Approach |

IDA* | Iterative Deepening A* algorithm |

LPA* | Lifelong Planning A* algorithm |

APF | Artificial Potential Field |

NMPC | Nonlinear Model Predictive Control |

SLM | Simultaneous Localization and Mapping |

## References

- Xu, H.; Wu, Z.; Liang, Y. A Review of Reinforcement Learning-Based Path Planning Methods for Self-Driving Cars. Appl. Res. Comput.
**2023**, 40, 1–8. [Google Scholar] - Zheng, Y.; Luo, Q.; Wang, H.; Wang, C. Improved Ant Colony Algorithm for Adaptive Probabilistic Selection Model. Autom. Technol. Appl.
**2021**, 40, 6–10. [Google Scholar] - Sathyamoorthy, A.; Liang, J.; Patel, U.; Guan, T.; Chandra, R.; Manocha, D. DenseCAvoid: Real-time Navigation in Dense Crowds using Anticipatory Behaviors. In Proceedings of the 2020 IEEE International Conference on Robotics and Automation (ICRA), Paris, France, 31 May–31 August 2020. [Google Scholar]
- Jasmin, V.; Lamija, V.; Belma, I. Mobile Robot Motion Framework Based on Enhanced Robust Panel Method. Int. J. Control Autom. Syst.
**2020**, 18, 1264–1276. [Google Scholar] - Cheng, C.; Hao, X.; Li, J.; Zhang, Z.; Sun, G. Global Dynamic Path Planning Incorporating Improved A* Algorithm and Dynamic Windowing Method. J. Xi’An Jiaotong Univ.
**2017**, 51, 137–143. [Google Scholar] - Shi, Y.; Chen, H.; Zhang, L.; Sun, P.; Pei, P.; Li, D. Research on Path Planning of AGV Transfer Robot Based on Improved A* Algorithm. Manuf. Technol. Mach. Tools
**2022**, 719, 19–22. [Google Scholar] - Qi, F.; Wang, X.; Zhang, G. Improved A* Algorithm for AGV Obstacle Avoidance Path Planning. Comput. Appl. Res. Mach. Tools Hydraul.
**2023**, 51, 34–39. [Google Scholar] - Chen, Z.; Chen, H.; Ren, W.; Gui, F.; Tian, X.; Lu, R. A Direction-Adaptive Robot Obstacle Avoidance Algorithm in Unknown Environments. J. North China Inst. Sci. Technol.
**2022**, 19, 71–78. [Google Scholar] - Kim, J.; Yang, G. Improvement of Dynamic Window Approach Using Reinforcement Learning in Dynamic Environments. Int. J. Control Autom. Syst.
**2022**, 20, 2983–2992. [Google Scholar] [CrossRef] - Tsatcha, D.; Saux, É.; Claramunt, C. A bidirectional path-finding algorithm and data structure for maritime routing. Int. J. Geogr. Inf. Sci.
**2014**, 28, 1355–1377. [Google Scholar] [CrossRef] [Green Version] - Huang, B.; Wu, Q.; Zhan, F. A shortest path algorithm with novel heuristics for dynamic transportation networks. Int. J. Geogr. Inf. Sci.
**2007**, 21, 625–644. [Google Scholar] [CrossRef] - Tian, J.; Bei, S.; Li, B.; Hu, H.; Quan, Z.; Zhou, D.; Zhou, X.; Tang, H. Research on Active Obstacle Avoidance of Intelligent Vehicles Based on Improved Artificial Potential Field Method. World Electr. Veh. J.
**2022**, 13, 97. [Google Scholar] [CrossRef] - Zheng, L.; Yu, W.; Li, G.; Qin, G.; Luo, Y. Particle Swarm Algorithm Path-Planning Method for Mobile Robots Based on Artificial Potential Fields. Sensors
**2023**, 23, 6082. [Google Scholar] [CrossRef] [PubMed] - Zang, L.; Wang, Z.; Zhang, Z.; Li, Y.; Shi, T. Research on Intelligent Vehicle Path Planning Based on Improved Artificial Potential Field Method. In Proceedings of the 2019 International Conference on High Performance Big Data and Intelligent Systems (HPBD&IS), SAE Technical Papers, Shenzhen, China, 9–11 May 2019. [Google Scholar]
- Lai, X.; Wu, D.; Wu, D.; Li, J.; Yu, H. Enhanced DWA Algorithm for Local Path Planning of Mobile Robot. Ind. Robot.
**2023**, 50, 856–892. [Google Scholar] [CrossRef] - Yang, H.; Xu, X.; Hong, J. Automatic Parking Path Planning of Tracked Vehicle Based on Improved A* and DWA Algorithms. IEEE Trans. Transp. Electrif.
**2023**, 9, 283–292. [Google Scholar] [CrossRef] - Bruno, B.; Boaz, F.; Laura, F.; Javier, A. Model Predictive Contouring Control for Collision Avoidance in Unstructured Dynamic Environments. IEEE Robot. Autom. Lett.
**2019**, 4, 4459–4466. [Google Scholar] - Mahmood, A.; Alireza, R.; Rustam, S. Motion Planning and Control of an Omnidirectional Mobile Robot in Dynamic Environments. Robotics
**2021**, 10, 48. [Google Scholar] - Kong, H.; Xia, L.; Zhang, Q. Collision Avoidance Path Planning for Intelligent Vehicles Based on Improved Artificial Potential Field Method. J. Hefei Univ. Technol. (Natural Sci. Ed.)
**2023**, 46, 583–589. [Google Scholar] - Zhao, L.; Li, C.; Zhang, W.; Chen, D.; Li, Z. Optimization of Robot Static-Dynamic Local Path Planning Method Based on Fusion of Attraction-Repulsion and Dynamic Window Approach. Inf. Control
**2023**. [Google Scholar] [CrossRef] - Xu, W.; Tang, J.; Zhang, C. Improved A* and Dynamic Window Approach for Mobile Robot Path Planning. Comput. Simul.
**2023**, 40, 447–452. [Google Scholar] - Lai, R.; Wu, Z.; Liu, X.; Zeng, N. Fusion Algorithm of the Improved A* Algorithm and Segmented Bézier Curves for the Path Planning of Mobile Robots. Sustainability
**2023**, 15, 2483. [Google Scholar] [CrossRef] - Guo, Y.; Yuan, J.; Zhao, K. Robot Path Planning Based on Improved A* Algorithm and Dynamic Window Approach. Comput. Eng. Sci.
**2022**, 44, 1273–1281. [Google Scholar] - Zou, W.; Han, B.; Li, P.; Tian, J. Fusion of improved A* algorithm and optimized dynamic window method for path planning. Comput. Integr. Manuf. Syst. 2022. Available online: http://kns.cnki.net/kcms/detail/11.5946.TP.20220409.1931.002.html (accessed on 18 July 2023).
- Xin, P.; Ma, X. Optimization and Improvement of A* and Dynamic Window Approach for Robot Path Planning. Comb. Mach. Tools Autom. Mach. Technol.
**2022**, 578, 7–10. [Google Scholar] - Tagor, H.; Habibullah, H.; Rafiqul, I.; Ricardo, P. Local path planning for autonomous mobile robots by integrating modified dynamic-window approach and improved follow the gap method. J. Field Robot.
**2021**, 39, 371–386. [Google Scholar] - Wu, F.; Guo, S. Dynamic Path Planning of AGV Based on Improved A* Algorithm and Dynamic Window Approach. J. Field Robot.
**2020**, 20, 12452–12459. [Google Scholar]

**Figure 2.**(

**a**) Diagram of an unoptimized approach; (

**b**) Primary path optimization diagram; (

**c**) Secondary path optimization diagram; (

**d**) Tertiary path optimization diagram.

**Figure 3.**(

**a**) Motion trajectory analysis diagram of electric logistics vehicle; (

**b**) Speed sampling space.

**Figure 5.**Simulation validation of the improved A* algorithm (The figure references the 2017 article by Cheng et al. for comparison [5]): (

**a**) 20 × 20 map scene 1; (

**b**) 20 × 20 map scene 2 (

**c**) 20 × 20 map scene 3.

**Figure 6.**Comparison Chart of Path Planning using DWA (The figure references the 2020 article by Wu et al. for comparison [27]): (

**a**) Process for improving the A* fusion DWA algorithm; (

**b**) Static obstacle path-planning diagram; (

**c**) Dynamic obstacle path-planning diagram.

**Figure 7.**Comparing the linear velocity, angular velocity, and attitude angle of various algorithms (unknown static and dynamic obstacles. (The figure references the 2020 article by Wu et al. for comparison [27]): (

**a**) Angular velocity diagram of four algorithms electric logistics vehicle; (

**b**) Linear velocity diagram of four algorithms electric logistics vehicle; (

**c**) Attitude angle diagram of four algorithms electric logistics vehicle.

**Figure 8.**Three algorithms path-planning diagram: (

**a**) A* algorithm path-planning diagram; (

**b**) Improved A* algorithm path-planning diagram; (

**c**) Improved A* algorithm fused with DWA algorithm path-planning diagram.

**Figure 9.**SLAM mapping path-planning map: (

**a**) Unimproved algorithm path-planning map; (

**b**) Improved algorithm path-planning map.

Parameters | Values |
---|---|

Maximum speed | 2 m/s |

Maximum rotation speed | 20 rad/s |

Maximum rotational acceleration | 50 rad/s2 |

Time to simulate trajectory forward | 3 s |

Weighting of heading scores | 0.05 |

Distance score weighting | 0.2 |

Speed score weighting | 0.5 |

Algorithm Name | Turning Points Number/Each | Number of Nodes Traversed/Each | Path Length/m | Search Time/s |
---|---|---|---|---|

A* algorithm using Euclidean distance | 5 | 108 | 27.0026 | 79.904031 |

Cheng 2017 proposed improvements to A* | 8 | 247 | 27.9319 | 85.142965 |

A* algorithm with improved heuristic function | 5 | 172 | 26.0413 | 77.020405 |

A* algorithm with improved heuristic function and optimized folds | 4 | 88 | 24.8729 | 66.907335 |

Algorithm Name | Turning Points Number/Each | Number of Nodes Traversed/Each | Path Length/m | Search Time/s |
---|---|---|---|---|

A* algorithm using Euclidean distance | 9 | 112 | 23.3848 | 61.042 |

Cheng 2017 proposed improvements to A* | 5 | 201 | 22.6624 | 109.136 |

A* algorithm with improved heuristic function | 5 | 95 | 25.7279 | 48.357 |

A* algorithm with improved heuristic function and optimized folds | 2 | 92 | 24.3454 | 47.867 |

Algorithm Name | Turning Points Number/Each | Number of Nodes Traversed/Each | Path Length/m | Search Time/s |
---|---|---|---|---|

A* algorithm using Euclidean distance | 13 | 820 | 62.2548 | 491.858 |

Cheng 2017 proposed improvements to A* | 12 | 1976 | 59.9827 | 1367.009 |

A* algorithm with improved heuristic function | 14 | 225 | 64.0122 | 118.024 |

A* algorithm with improved heuristic function and optimized folds | 8 | 211 | 60.0237 | 118.618 |

**Table 5.**Operational data for the DWA algorithm as well as the fusion algorithm (Static obstacle avoidance).

Algorithm Name | Path Length/m | Search time/s |
---|---|---|

Dynamic Window Approach | 27.0026 | 79.904031 |

A* Algorithm Fusion DWA | 27.9319 | 85.142965 |

Improved A* Fusion DWA proposed by Wu 2020 | 26.0413 | 77.020405 |

In this paper, we improve the A* algorithm to fuse DWA | 24.5729 | 66.907335 |

**Table 6.**Operational data of the DWA algorithm as well as the fusion algorithm (dynamic obstacle avoidance).

Algorithm Name | Path Length/m | Search time/s |
---|---|---|

Dynamic Window Approach | 28.4446 | 79.300621 |

A* Algorithm Fusion DWA | 25.4588 | 94.402967 |

Improved A* Fusion DWA proposed by Wu 2020 | 26.3942 | 88.878559 |

In this paper, we improve the A* algorithm to fuse DWA | 24.6606 | 66.881723 |

Parameters | Values |
---|---|

Initial position | (−1.95, −1.95, 0) |

Initial target point | (13.5, 16.5, 90) |

Straight line width | 0.05 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Yu, M.; Luo, Q.; Wang, H.; Lai, Y.
Electric Logistics Vehicle Path Planning Based on the Fusion of the Improved A-Star Algorithm and Dynamic Window Approach. *World Electr. Veh. J.* **2023**, *14*, 213.
https://doi.org/10.3390/wevj14080213

**AMA Style**

Yu M, Luo Q, Wang H, Lai Y.
Electric Logistics Vehicle Path Planning Based on the Fusion of the Improved A-Star Algorithm and Dynamic Window Approach. *World Electric Vehicle Journal*. 2023; 14(8):213.
https://doi.org/10.3390/wevj14080213

**Chicago/Turabian Style**

Yu, Mengxue, Qiang Luo, Haibao Wang, and Yushu Lai.
2023. "Electric Logistics Vehicle Path Planning Based on the Fusion of the Improved A-Star Algorithm and Dynamic Window Approach" *World Electric Vehicle Journal* 14, no. 8: 213.
https://doi.org/10.3390/wevj14080213