Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 11, No. 3, 2024 198 Intelligent Decision and Path Planning Algorithm of AGV Vehicle based on Deep Learning Hongwei Huang 1, Xiangda Wang 2, Xinyu Song 1, Renyu Yang 3, Run Guo 4, Shuyang Liu 1, * 1 College of Information Engineering, Shanghai Maritime University, Shanghai, China 2 School of Mechatronic Engineering and Automation, Shanghai University, Shanghai, China 3 Business School, University of Shanghai for Science and Technology, China 4 Shanghai University of Political Science and Law, Language and Culture College (International Exchange College), China * Corresponding author: Shuyang Liu (Email: lsy201922@163.com) Abstract: With the widespread application of intelligent unmanned vehicles, intelligent navigation, path planning, and obstacle avoidance technologies have become important research topics. This paper proposes an AGV (Automated Guided Vehicle) intelligent decision-making and path planning algorithm based on deep learning. This algorithm uses environmental information to trace a route to the target point while avoiding both static and dynamic obstacles, making it adaptable to different environments. By employing a combination of global planning and local obstacle avoidance decision-making, this method addresses the path planning problem with better globality and robustness, and the obstacle avoidance problem with improved dynamism and generalizability, while also reducing iteration time. During the network training phase, traditional algorithms such as PID and A* are integrated to enhance the convergence speed and stability of the proposed method. Finally, various experimental scenarios for navigation and obstacle avoidance were designed in the Robot Operating System (ROS) and simulation program Gazebo. The simulation results verified that the proposed method, which takes into account both global and dynamic aspects, is reliable and that the generated paths and time efficiency have been optimized. Keywords: Intelligent Navigation; Path Planning; AGV; Network Training Phase. 1. Introduction As a type of mobile robot, intelligent vehicles are becoming increasingly important in today's world and have become essential tools across various industries. They can be widely applied for flexible handling and transportation in sectors such as machinery and electronics, and can also be used as transport tools for cargo handling at stations and airports.[1] Additionally, they can be extensively utilized in locations such as hotels, hospitals, and banks to provide business guidance functions. Furthermore, they can replace humans in completing dangerous tasks such as emergency rescue operations and lunar exploration. Since autonomous mobile robots operate in unpredictable and partially unknown environments, navigation in dynamic and dense settings presents numerous challenges. This means that the robot must have the ability to navigate without interference and avoid any obstacles within its movement constraints[2]. Traditional path planning techniques can be used to solve path planning problems in known environments and are easy to implement. However, they have poor exploratory capabilities in dynamic or complex environments, slow convergence speeds, long execution times, and are prone to getting stuck in local optima. Additionally, when the environment changes, the algorithm needs to be adjusted. In contrast, deep learning methods, based on heuristic strategies obtained through data training, can be applied to many path planning tasks[3]. Currently, there are not many solutions using reinforcement learning for global planning, with some works utilizing the Q- learning algorithm. Gao et al. divided the state space using a grid map, where the coordinates of grid cells without obstacles were considered states in the Q-table, and the actions involved moving one cell left, right, up, or down[4]. The Q-learning algorithm was then used for exploration and planning, which achieved global path planning in a discrete environment. Sichkar attempted to randomly sample points in a continuous state map, use these points as states in the Q- table, connect all points into multiple line segments, and eliminate segments that crossed obstacles[5]. Thus, for a given state, the action was to move to an adjacent point. This improved method is similar to Q-learning based on grid maps, converting the continuous environment into a discrete one solvable by Q-learning. However, this algorithm is essentially still based on discrete environments and actions[6]. Panov et al. proposed using the DQN algorithm to solve the global planning problem on grid maps, effectively addressing the curse of dimensionality in state space, though the action space remained discrete[6]. The aforementioned works using reinforcement learning for global planning are all limited to discrete spaces. However, in the future, one direction is to use PPO, DDPG, SAC, and other algorithms based on continuous actions to attempt to solve the global path planning problem. This can improve the reliability of global planning. 2. PATH PLANNING BASED ON DEEP REINFORCEMENT LEARNING Global planning addresses the problem of how an unmanned vehicle navigates to its destination, allowing the optimal path to be calculated from the global map. However, many uncertainties arise during actual movement, such as the appearance of additional obstacles when the global map does not match local conditions. In such cases, local obstacle avoidance becomes crucial, as it can control the vehicle to avoid obstacles at specific locations. Without global planning, 199 local obstacle avoidance cannot complete planning tasks in larger scenarios. Therefore, global planning and local obstacle avoidance complement each other, and combining both algorithms can solve most path planning problems for unmanned vehicles. The algorithm first plans the driving route using a global planning algorithm, and then uses local obstacle avoidance for continuous local control as the robot moves. Figure 1 shows the overall framework for path planning of an unmanned vehicle. This framework illustrates how global planning and local obstacle avoidance are combined to accomplish the path planning and navigation tasks. First, the coordinates of the target point are input into the global planning module. The global planning uses the SAC algorithm to explore the path based on the known global map and the current position coordinates, outputting nnn intermediate exploration points [xi,yi], where i∈{0,1,…,n}, and stores them. Figure 1. Overall path planning framework For these n intermediate exploration points, they are input into the local planning module in the order from 0 to n. This means that the local planning is expected to navigate to each exploration point in sequence and finally reach the target point. Each exploration point from the global planning serves as a target point for the local planning. The local planning calculates continuous control quantities _vt and wt for the vehicle over a period of time through the Actor network of DDPG by inputting a specific point [xi,yi] and some perception information, and navigates the vehicle to [xi,yi]. Once it is confirmed that the vehicle has approached this point, [xi+1,yi+1] is then input into the local controller to navigate the vehicle to the next exploration point. This process is repeated for each navigation to the final target point, requiring n calls to the local obstacle avoidance and generating a large number of control quantities. This way, the vehicle can make real-time obstacle avoidance actions while ensuring it does not deviate from the guidance of the global path. If the local obstacle avoidance control encounters an obstacle, it will return the result to the global planning. The global planning, after obtaining the planning status from the local obstacle avoidance, will make a judgment and take re-planning measures, clearing the exploration points and re-initiating the global planning. 2.1. Local Obstacle Avoidance based on DDPG Local path planning focuses on the robot's current local environmental information in situations where the environment is either completely unknown or partially known, ensuring that the robot has good obstacle avoidance capabilities. The robot uses sensors to detect the working environment, acquiring geometric and positional information of obstacles, and can dynamically update and correct its understanding of the environment at any time. The local planning method integrates environment perception and search, requiring the robot system to have high robustness to environmental errors, as well as high-speed information processing and computing capabilities, allowing it to implement feedback and correction of the planning results[7]. Due to the need for adjusting numerous parameters in traditional obstacle avoidance algorithms such as the DWA algorithm, which cannot directly benefit from continuous large-scale datasets, a novel learning-based approach is proposed to achieve faster speed and more stable learning performance. By directly mapping sensor data to motion control quantities, this approach solves the problem of traditional local planning requiring extensive computation of cost maps[8]. Additionally, this reactive obstacle avoidance can handle uncertain and dynamic environments, for which deep reinforcement learning is suitable. It improves the network by exploring the environment and obtaining rewards. To enable unmanned vehicles to navigate obstacles in different dynamic environments, model-free deep reinforcement learning algorithms are needed. They directly learn action policies by collecting data from simulated or real environments without the need for pre-modeling the environment. If model-based deep reinforcement learning models are unstable, their learning performance will be greatly reduced, and their asymptotic performance will not be as good as model-free methods. Especially for dynamic environment models, modeling them is very challenging. Model-free experience-driven deep reinforcement learning algorithms do not need to make assumptions about the environment and can change strategies during runtime by accumulating experience to adapt to environmental changes[9]. Local obstacle avoidance requires collecting sensor information, thus requiring improved sampling efficiency. As a deterministic policy gradient algorithm for offline learning, DDPG introduces the Actor-Critic framework, as well as concepts like experience replay buffers and target networks. Its algorithm exhibits high sampling efficiency and stability, preventing the correlation of different events during the training stage, avoiding convergence oscillations caused by directly copying parameters, and preventing overfitting phenomena caused by solely using new data, thus enhancing the algorithm's robustness and generalization. Therefore, the problem of obstacle avoidance for mobile robots can be addressed using deep reinforcement learning with DDPG, resolving issues related to the large exploration space, high number of steps required for network convergence, and high variance. The research focus of this method is unmanned vehicles equipped with laser rangefinder sensors, capable of perceiving obstacles within 0 to 10 meters. When encountering obstacles within this range, the laser beams are obstructed, and each beam returns a distance value. State S in DDPG algorithm includes the following: (1) The observation data from the laser rangefinder sensor consists of laser scans within a 180° range in front of the vehicle, stored in an array called laser_scan with dimensions of 360, representing the laser values observed within every 0.5° range (d1, d2, ..., d360). As the laser sensor cannot guarantee capturing all laser data, parts where di = None are changed to di = dmax = 10 during laser data preprocessing. To reduce observation data errors and computational costs, the 360-dimensional data is reduced to 40 dimensions, where every 9 distance values are averaged to obtain (d1, d2, ..., d40). After obtaining the distribution of obstacles at each angle, 200 normalization is performed by di = di / dmax = di / 10 to obtain new normalized data (d1, d2, ..., d40). Subsequently, the normalized data collected from the past two times and the most recent normalized data are merged to form a data set (d1, d2, ..., d120), which serves as the input for the laser rangefinder observation data. (2) The driving state of the unmanned vehicle is determined by the current linear velocity v and angular velocity w of the vehicle, which are input into the network. The driving state can be obtained from the odometer-recorded information. (3) The status information of the target point is input with the coordinates of the target point with the vehicle as the coordinate center. The current position coordinates and heading angle deviation of the unmanned vehicle at the current time can also be obtained from the odometer information as (x, y, θ). With this information, the coordinates of the target point (xtarget, ytarget) in the coordinate system of the unmanned vehicle can be calculated as: ' arg arg( )*cos ( )*sint et t etx x x y y     (1) ' arg arg( )*sin ( )*cost et t etx x x y y      (2) That is, (x', y') represents the coordinates of the target point relative to the coordinate system centered on the vehicle. These coordinates are input into the network. For the DDPG algorithm, the action A is a continuous control value passed from the local obstacle avoidance module to the unmanned vehicle, representing linear velocity v and angular velocity w. This control value directly guides the motion control of the vehicle. The reward function for DDPG is as follows: 1 , ( , ) , min( ) ( ), goal t goal t t collision i collision t t r s d r s a r d d k s s else       (3) Where st denotes the current distance of the vehicle from the target point. When the distance of the vehicle from the target point is less than the dgoal threshold, it can be considered as reaching the target point, and the environment provides a positive reward rgoal. When the minimum distance feedback from the laser sensor is less than the safety threshold dcollision, indicating that the vehicle is about to collide with an obstacle, in order to give the vehicle a chance to change its direction of motion, a threshold iii can be set, representing the number of times allowing min(di)