# Trajectory Planning for a Mobile Robot in a Dynamic Environment Using an LSTM Neural Network
###### Abstract  
Autonomous mobile robots are an important focus of current research due to the advantages they bring to the industry, such as performing dangerous tasks with greater precision than humans. An autonomous mobile robot must be able to generate a collision-free trajectory while avoiding static and dynamic obstacles from the specified start location to the target location. Machine learning, a sub-field of artificial intelligence, is applied to create a Long Short-Term Memory (LSTM) neural network that is implemented and executed to allow a mobile robot to find the trajectory between two points and navigate while avoiding a dynamic obstacle. The input of the network is the distance between the mobile robot and the obstacles thrown by the LiDAR sensor, the desired target location, and the mobile robot's location with respect to the odometry reference frame. Using the model to learn the mapping between input and output in the sample data, the linear and angular velocity of the mobile robot are obtained. The mobile robot and its dynamic environment are simulated in Gazebo, which is an open-source 3D robotics simulator. Gazebo can be synchronized with ROS (Robot Operating System). The computational experiments show that the network model can plan a safe navigation path in a dynamic environment. The best test accuracy obtained was 99.24%, where the model can generalize other trajectories for which it was not specifically trained within a 15 cm radius of a trained destination position. mobile robot; obstacle avoidance; LSTM neural network; dynamic path planning +
Footnote †: journal:A mobile robot is a highly nonlinear system [3]. Mobile robots are known to be nonholonomic, only moving normally following the axis of the wheels. For these reasons, it is arduous to design and implement an autonomous trajectory planning mobile robot. Different AI approaches for mobile robot trajectory planning and navigation have been proposed throughout the last decades. [PERSON] et al. [4] proposed a hybrid path planning algorithm that uses an anytime graph-based path planning algorithm for global planning and deep reinforcement learning for local planning, which is applied for a real-time mission planning system of an autonomous UAV that is adaptive to real-world environments consisting of both static and moving obstacles. [PERSON] et al. [5] presented a mobile robot path planning genetic algorithm (GA) in a static environment with a simplified fitness function that employs the path length. The authors demonstrated that the proposed algorithm was efficient in handling different types of tasks in static environments. [PERSON] et al. [6] developed a GA to generate a collision-free optimal path linking an initial configuration of the mobile robot to a final configuration, and presented an adaptive fuzzy-logic controller to keep track of the robot on the desired path. [PERSON] et al. [7] suggested a membrane evolutionary artificial potential field (memEAPF) approach combining membrane computing with a GA and the artificial potential field (APF) method to find the parameters to generate a safe trajectory for the mobile robot. [PERSON] et al. [8] used improved Q-learning, a type of reinforcement learning, with the flower pollination algorithm (FPA) to find the optimal static trajectory planning of a mobile robot. The authors stated that an ANN-based algorithm could be integrated, since it has shown good results in processing spacious states and actions in trajectory planning [8; 9]. Regarding the use of neural networks as a solution to this problem, other approaches have also been carried out. [PERSON] and [PERSON] [10] proposed a neural network (NN) to represent the dynamic model of an agricultural mobile robot. They trained the NN with a backpropagation (BP) algorithm that was accurate in simulating the mobile robot path. The inputs of the NN were the time series of the steer angles and the changes in the steer angles of the mobile robot that were created by the GA, which was the technique for generating an optimal path.