#### Abstract

In order to improve the motion route planning effect and obstacle avoidance effect of mobile robots, this paper combines the deep learning theory to analyze the motion route planning and obstacle avoidance process of mobile robots. According to the obstacle avoidance trajectory and constraints, this paper establishes a safe distance model for obstacle avoidance, then analyzes the braking process of the robot, and designs an improved safety model for obstacle avoidance. This model integrates two relatively mature safety models, complements their advantages and disadvantages, and comprehensively considers robot safety and the utilization of the motion path. According to the simulation test research, the robot based on deep learning proposed in this paper has a good motion route planning effect and obstacle avoidance effect and can effectively improve the autonomous motion effect of the robot.

#### 1. Introduction

At present, mobile robots are widely used in industry, aviation, and other fields. Among them, the differential drive robot can perform the continuous and real-time autonomous movement on roads and in the wild and is an intelligent machine system that integrates environmental perception, dynamic decision-making, and execution. In the work of robots, it is inevitable to encounter different obstacle environments. In order to successfully complete the work content, the research on obstacle avoidance route planning is particularly important. Obstacle avoidance route planning is to search for a safe path from the initial point to the target point for the robot in an environment with obstacles. According to the different understanding of the environmental data, the corresponding algorithm can be used to find the most suitable path so as to quickly pass through all the obstacles ahead and successfully complete the movement task.

In the path planning method of the robot, the traditional methods include the artificial potential field method, Dijkstra algorithm, and A algorithm. As the working environment of mobile robots becomes diverse, some traditional methods cannot meet their operating requirements in complex environments, and the emergence of intelligent algorithms overcomes the shortcomings of traditional methods [1]. At present, the path planning of most mobile robots adopts intelligent algorithms, such as the ant colony algorithm, particle swarm algorithm, and artificial fish swarm algorithm. Among them, the ant colony algorithm is widely used due to its advantages of fast convergence, good performance, and robustness of the algorithm. The traditional ant colony algorithm has a long search time and slow convergence speed and is prone to the problem of algorithm stagnation. Therefore, many researchers have proposed improved methods such as the elite ant system [2], maximum-minimum (MAX-MIN) ant colony system, and adaptive ant colony algorithm. Literature [3] established a local pheromone diffusion model in the algorithm, improved the heuristic function and pheromone volatilization factor, and improved the convergence speed of the algorithm. Literature [4] uses Manhattan distance instead of Euclidean distance as the distance calculation method, which introduces the direction angle heuristic factor and increases the angle between the direction vector of the current node and the next node and the direction vector of the next node and the endpoint. The probability of the path improves the efficiency of the algorithm. Literature [5] combines the estimation function of the A algorithm into the heuristic factor of the ant colony algorithm and improves the pheromone volatility factor, which makes the ant colony algorithm improve both the convergence and the optimization path. Literature [6] adds the distance between the current node and the next node in the heuristic function and uses the La-place distribution to improve the pheromone volatility factor, which prevents the algorithm from falling into the local optimum and accelerates the convergence. Literature [7] proposes to add an obstacle avoidance strategy in the early stage of the algorithm, use the principle of high-quality ant update to guide the update of pheromone, and perform secondary planning on the obtained path to make the obtained path better and improve the operating efficiency of the robot. Aiming at the shortcomings of the traditional ant colony algorithm, which is easy to fall into local optimum and slow to converge, the traditional ant colony algorithm is improved. First, an obstacle avoidance factor is added to the state transition probability formula to reduce the number of deadlocks in the process of ants searching for a path. The Manhattan distance is used instead of the Euclidean distance to calculate the distance between nodes to reduce the approximation caused by the square root. Error effects speed up the calculation. Then, the pheromone volatility factor is improved from a fixed value to a dynamic value that changes with the number of iterations, and the range of the pheromone is limited to avoid algorithm stagnation. After comparing the simulation results, the improved ant colony algorithm converges faster than the traditional ant colony algorithm, and it can also perform efficient and reasonable path planning in complex maps [8].

Active obstacle avoidance technology is the basis of unmanned driving technology, and path planning and tracking control are important components of active obstacle avoidance technology. In literature [9], obstacle avoidance path planning is based on polynomials, and a robust controller is designed for trajectory tracking control in the literature [10]. In literature [11], the tentacle algorithm is used to design the obstacle avoidance strategy, and the improved artificial potential field method is proposed in literature [12] to plan the obstacle avoidance path and verify the feasibility of the obstacle avoidance algorithm in different scenarios through hardware-in-the-loop experiments. Among the obstacle avoidance planning algorithms, polynomial programming has the characteristics of a simple algorithm, small computational complexity, and strong versatility and practicability. Path-following control algorithms mainly include optimal control, sliding mode control, robust control, fuzzy control, and model predictive control [13]. Model predictive control is an algorithm for rolling optimization control based on a simple model, which is widely used in the field of robot control.

The traditional obstacle avoidance path planning methods for multimobile robots mainly include the particle swarm optimization method, error feedback correction method, and end position parameter adjustment method. Literature [14] proposed robot obstacle avoidance and dynamic target tracking in unknown environments. Adding velocity difference and acceleration difference to the gravitational formula improves the flexibility of the robot’s dynamic target tracking and its adaptability to the environment, but it takes a long time. Literature [15] proposed an exploration of obstacle avoidance algorithm for mobile robots based on mixed strategies by using the vector field histogram method combined with neural network algorithm to achieve basic obstacle avoidance, but this method requires a large number of sample training sets, and the adaptive ability is not strong.

As a typical implementation method of trajectory planning, Dijkstra’s algorithm [16] is based on a breadth-first search strategy and generates the shortest path according to the increasing order of path length. In order to achieve algorithm acceleration, A algorithm introduces heuristic value from node to target point in Dijkstra’s cost estimation [17]. Since the environment in which the autonomous driving robot is located contains some unknown change information, the D algorithm will use the unaffected node information for replanning so as to adapt to the trajectory planning of the dynamic environment [18]. Since the planning space is expressed in the form of a discrete grid, the planning result is a polyline segment with discontinuous curvature. Considering the constraints of the robot’s steering mechanism, the results of the above algorithm are not suitable for direct execution by the robot. Therefore, by improving the expansion of nodes, the hybrid A derived from the method and the state lattice derived from the improved node connection method are the latest development direction based on the search algorithm. The planning result is a group of arcs and straight line segments, the curvature of the planned path is still discontinuous, and the results based on the search method need further smoothing before the robot can execute [19]. Different from the search method, the sampling-based method represented by RRT (rapidly-exploring random tree) is to expand the trajectory nodes in a continuous feature space. In order to improve the real-time performance of the algorithm, Bi-RRT (bidirectional RRT), which is bidirectionally extended from the starting point and end point, and hRRT (heuristic RRT), which introduces a heuristic function to increase the probability of low-cost nodes being extended, are derived. However, the sampling-based algorithm always contains a random seed generator, so it inevitably contains tortuous nodes [20], making the planning result to need further smoothing.

The existing local dynamic programming methods include the artificial potential field method, genetic algorithm, fuzzy logic algorithm, ant colony algorithm, and bacteria algorithm. Although the local planning algorithm can plan the path in real-time according to the detected environmental information, it is easy to lose the target point due to the lack of global information, resulting in the phenomenon of target unreachability and oscillation.

This paper combines the deep learning theory to analyze the process of mobile robot motion route planning and obstacle avoidance and builds an intelligent model through simulation research to improve the robot motion planning and obstacle avoidance effect.

#### 2. Research Con Safe Distance Model and Obstacle Avoidance Strategy

##### 2.1. Commonly Used Local Route Planning Methods

When the robot changes its motion path at high speed, the trajectory it travels needs to be stable and gentle, satisfy the conditions of lateral acceleration constraints, and yaw angular velocity so as to improve the safety and stability of the robot for lateral obstacle avoidance. The planned path plays the role of navigation in the process of the robot’s lateral obstacle avoidance, guiding the robot to transition from the current position to the target position. In the research of this paper, the starting point and the endpoint of the whole process of changing the motion path of the robot will be set according to the requirements based on the known robot dynamics model and motion conditions. Then, according to the proposed constraints, a collision-free, safe, and comfortable driving path is planned for the robot to meet the requirements of the robot for lateral obstacle avoidance. Several commonly used local route planning methods will be introduced below.

The lane-changing method based on the sine function model is a widely used route planning method. Its lane-changing trajectory is based on a sine function image, and its parameters are adjusted according to the actual lateral obstacle avoidance situation, as shown in Figure 1. The mathematical expression for this method is as follows:

This paper improves the problem that the endpoint curvature does not meet the conditions in the route planning method based on the sine function model. Because the B-spline curve has good properties such as geometric invariance, flexibility, and convexity, a method is proposed to express the desired trajectory of lateral obstacle avoidance with its optimized sine and cosine functions. Moreover, the polygons are controlled in the form of curve fitting to make the driving process of the robot more stable. In this method, a 3rd-order spline can be selected to simulate the planned path, and the splicing of segments is used to achieve the purpose of transitioning from the current position to the target position. The image of the route planning method of the B-spline curve is shown in Figure 2, and its mathematical expression is as follows:

In the formula, is the control point, and is the basic function of the B-spline curve.

However, this kind of route planning method has high requirements for the selection of control points. The selection of control points directly affects the function of the planning curve, and the whole calculation process is complicated, and it also requires more information and data and a larger theory to support it.

The route planning method based on trapezoidal acceleration mainly controls the variation range of the lateral acceleration of the robot in the process of changing lanes within the range of constraints. Its lateral acceleration curve with time is two positive and inverse trapezoids with exactly the same size and shape, and its image is shown in Figure 3.

##### 2.2. Lateral Obstacle Avoidance Trajectory and Safety Distance Model

When the robot travels on a multimotion path, it will choose different lane-changing methods according to the surrounding dynamic robot information. During the lane-changing process, the possible collision types mainly include robot rear-end collision, robot corner collision, and robot side scraping. Based on these three collision methods, different types of minimum safe distance models are established. We assume that the self-robot is *M* , and _{0} are the front and rear robots of the current motion path, respectively, and and are the front and rear robots of the target motion path, respectively (as shown in Figure 4).

In this sports environment, there are four main types of safety distances that need to be considered:(1)During the lane change process, the *M* robot may encounter corner collision, rear-end collision, and side scraping with the _{0} robot.(2)In the process of changing lanes, the *M* robot may collide and rear-end with the _{0} robot.(3)During the lane change process, the *M* robot may have rear-end collision, corner collision, and side scraping with the robot.(4)During the lane change process, the *M* robot may have a corner collision and side scraping with the robot.

In the research process of this subject, in order to facilitate the calculation of the minimum safe distance model, the motion environment of the robot’s lane-changing process has been simplified. This paper makes 4 ideal assumptions for the robot’s lateral obstacle avoidance process:(1)Since the shape and volume of the robot and the robot wheel have no effect on the research results during the lane-changing process, the robot and the robot wheel are treated as rigid bodies(2)We assume that the former robot has been driving in a straight line on the current motion path, and the lateral acceleration and lateral displacement are always 0(3)The robot independently selects and changes the motion path, and there are no interfering obstacles behind the current motion path and the front and rear of the target motion path(4)During the process of lateral obstacle avoidance of the robot, the friction force of the road surface is large enough, and the robot rotates in pure rolling motion without sliding

The local route planning trajectory used in this paper is a quintic polynomial route planning algorithm, which is characterized by using a relatively simple calculation process and a smooth and gentle planned route, and can achieve the purpose of the robot’s lateral obstacle avoidance and meet the constraints of robot dynamics and environment. The general form of a quintic polynomial is as follows:

In the formula, *x* is the longitudinal coordinate of the robot in the process of lateral obstacle avoidance, is the lateral coordinate of the robot in the desired trajectory, and , and are the five coefficients of the quintic polynomial, respectively.

The position state of the robot at the beginning of the lateral obstacle avoidance control is set as , and the position state of the robot at the end of the lateral obstacle avoidance control is set as .

From the boundary conditions, we get .

When it is substituted into formula (3), the solution is

We assume that the maximum lateral displacement value of the designed planning trajectory is *s*, that is, . Moreover, we assume that the distance between the robot and the previous robot at the initial moment of executing the obstacle avoidance control is *d*, that is, *d* = *x*{2}-x{1}. Therefore, .

When it is substituted into formula (5), the reference path expression for lateral obstacle avoidance is obtained as

The lane-changing trajectory generated by using the quintic polynomial route planning algorithm and the constraints that the lateral obstacle avoidance path should satisfy are reliable and safe. Moreover, it satisfies various constraints of the path and robot dynamics, is suitable for complex road conditions, and can be directly generated by the set boundary conditions.

During the entire lateral obstacle avoidance process of the robot, the critical condition for successful obstacle avoidance between the robot and the preceding robot is that the lateral displacement of the self-robot is greater than the width *h* of the front robot when the head of the self-robot moves to the tail position of the front robot.

The path expression by using quintic polynomial planning is as follows:

The above formula is rewritten into the desired lane-changing path function expression with time as the parameter variable:

Among them, *s* is the lateral displacement of the robot to complete the entire lane-changing process, and is the time taken for the entire lane-changing process. Therefore, the critical conditions for the robot to achieve lateral obstacle avoidance are as follows:

In terms of the longitudinal displacement during the lane-changing process, the obstacle avoidance conditions that the self-robot and the front robot need to meet are as follows:

In the formula, is the longitudinal displacement of the front robot, is the longitudinal displacement of the self-robot, *h* is the width of the front robot, I is the length dimension of the robot, and is the time from the robot head to the front robot tail.

The above formula is organized into the following:

The critical condition of the minimum safe distance model of the robot’s lateral obstacle avoidance is that the head of the self-robot is connected with the tail of the preceding robot. If it is assumed that the safe distance without collision when the two robots change lanes is *b*, we can get the following:

In the formula, is the acceleration of the front robot, and is the acceleration of the self-robot. When the robot performs lateral obstacle avoidance at high speed, the heading angle of the robot is usually relatively small, and Bakhsh et al. believe that the heading angle is usually less than 5° in this process. Therefore, in the process of changing lanes of the robot, it is considered that the longitudinal speed of the robot remains unchanged, which is equal to the original robot speed.

Considering the length of the robot and the static safety distance _{0} during the robot’s driving process, according to the above formula, the expression for the minimum longitudinal safety distance is as follows:

Among them, the static safety distance is 2 m.

##### 2.3. Establishment of Longitudinal Obstacle Avoidance Safety Distance Model

The specific braking process of the robot’s longitudinal obstacle avoidance is as follows: First, after the driver finds the obstacle ahead, he realizes that the obstacle avoidance operation should be performed. Then, the driver moves his foot from any position to the brake pedal area, depresses the brake pedal, and keeps it until the final speed of the robot is 0. The braking process is represented in Figure 5 and includes the following stages:(1)The stage of discovery of danger : it refers to the time required for the driver to realize the obstacle avoidance operation and stop the acceleration operation after discovering the obstacle ahead(2)Leg movement stage : it refers to the movement time required by the driver to move the foot from any position to the brake pedal area(3)Braking gap elimination stage : when the brake pedal is stepped on, the actual robot itself does not start braking because there is a gap in each component of the braking system; it takes a certain amount of time to cancel at this time(4)Growth stage of deceleration : it refers to the duration that the deceleration of the robot increases from 0 to the maximum deceleration(5)Hold stage of maximum deceleration : at this time, the braking force and deceleration of the robot reach the peak value, and the robot maintains the maximum braking deceleration until the robot stops completely(6)The release stage of the braking force : it refers to the time required for the driver to release the brake pedal until the brake pressure drops to zero after the driver successfully completes the obstacle avoidance operation

The following is an analysis of the driving distance of the robot in each braking phase:

We assume that the initial speed of the robot is , and the maximum deceleration is . During the driver’s reaction time, foot-moving time, and braking coordination time period, the braking force is zero, and the robot runs at a constant speed, so

In the braking force growth stage, the braking deceleration increases linearly, the robot performs variable deceleration motion, and the deceleration reaches the maximum value when the robot finally reaches a stable state, so the acceleration is as follows:

The initial speed is , and the speed of the robot at time *t* is , so

The velocity at time is .

The deceleration in the braking force holding stage is the maximum value, and the robot performs a uniform deceleration movement, so

In summary, the total braking distance during the braking process is as follows:

When ignoring higher-order small quantities, we have the following:

In the above formula, is the danger detection stage and leg movement stage, which are combined into the driver operation delay stage, and is the braking gap elimination stage and the deceleration growth stage, which are combined into the braking delay stage.

From the aforementioned analysis of the braking process of the robot and Figure 6, it can be obtained that the critical warning distance of the robot is set as follows:

Therefore, the minimum safe distance for braking is the difference between the critical warning distance and the distance traveled by the driver’s operation delay stage, namely,

Among them, is the minimum robot distance to be maintained after both robots stop.

When the actual distance between the two robots reaches , the system judges that the robot has entered a potentially dangerous state and sends a warning signal to the driver to remind the driver that a dangerous situation is about to occur and corresponding measures need to be taken. When the distance between the two robots keeps approaching until it reaches , the self-robot still does not brake, the robot enters an emergency state, and the system automatically controls the robot to brake to prevent the two robots from colliding.

The distance of the robot can maintain a small linear relationship with the driving speed of the self-robot. The safety distance model established by this characteristic is as follows:

Among them, *S*_{w} is the safety distance, *T*_{h} is the time distance of the robot head, *V*_{r} is the speed of the following robot, and S_{0} is the distance between the two robots when the robot stops.

Although the algorithm of the safe distance between the robot head is relatively simple, it still has certain drawbacks. The focus of this algorithm is biased towards road usage. When the robot is running, the speed difference between the front and rear robots is large, and the safety distance model established by this algorithm is more dangerous, and the distance between the two robots will be too close to ensure the safety of movement.

Through the classification of the robot’s travel speed in the motion path, the new safety distance expression is obtained as follows:

The critical warning distance is expressed as follows:

In the formula, is the safe robot distance and is the robot speed. Under low-speed conditions, the 25 m before reaching the critical braking distance is regarded as the critical warning distance, and is the driver’s response delay time, which is generally 0.3–1.2 s, and 1.0 s is taken in this paper. is the brake delay time, 0.6 is taken in this paper, is the maximum braking deceleration, is taken in this paper, is the time distance of the robot head, generally 1.2–2.0 s, and 1.2 s in this paper, and is the robot distance after the two robots stop at high speed and low speed, generally 2–5 m, and 3 m in this paper.

#### 3. Design of Obstacle Avoidance Strategy

The robot’s active obstacle avoidance system should be able to monitor the information through the robot’s perception layer, including real-time motion factors such as the robot’s distance from the previous robot, the robot’s speed relative to the previous robot, and the driving status of the robot in different motion paths. In this way, the safety situation of the robot in its current state is judged, and the selection of vertical obstacle avoidance or horizontal obstacle avoidance is performed. When the driver faces an uncontrollable danger, the active obstacle avoidance system should choose a lower-risk obstacle avoidance strategy for the robot. This risk is not only a risk to the self-robot but also a risk to the entire moving environment. Therefore, when designing the obstacle avoidance strategy, this paper mainly considers motion safety.

Common robots drive normally. During the braking process, only the relative speed and relative displacement relationship between the self-robot and the front robot need to be considered, and it has no effect on robots in other motion paths. Therefore, in the process of active obstacle avoidance, priority should be given to braking obstacle avoidance, which is the safest decision for the entire sports driving process. However, when obstacle avoidance cannot be performed by braking, for example, if the robot in front encounters an emergency danger and suddenly brakes suddenly, the relative speed of the self-robot and the front robot is too large, or the relative displacement is too small. The self-robot still cannot successfully brake and avoid obstacles at the maximum deceleration that can be achieved. At this time, lateral lane change should be considered to avoid obstacles. However, when changing lanes to avoid obstacles, the robot’s information on the target movement path of the lane-changing target should also be considered.

During the process of lateral obstacle avoidance, the movement hazards that occur are mainly divided into the following categories: first, when the robot is changing lanes to avoid obstacles, the speed of the self-robot is too fast, or the robot in front of the current moving path is too slow due to emergency braking, resulting in the distance between the self-robot and the robot in front of the current moving path. If it is too close, it will collide with the robot in front of the current movement path when changing lanes to avoid obstacles; second, when the robot is changing lanes to avoid obstacles, the speed of the robot behind the current movement path is too fast. When changing lanes, the rear robot will directly hit the self-robot, but due to this situation, the self-robot cannot avoid obstacles through effective behavior, is an uncontrollable rear-end collision, and will not be considered in this article; third, when the robot moves to the left to avoid obstacles because the robot on the left path is generally faster, when changing lanes to avoid obstacles, the rear robot on the left path may be too fast, causing the robot to change. If the road is not timely, it causes more sports accidents; fourth, when the robot changes lanes to the right to avoid obstacles, the speed of the robot on the right is too low, and the robot in front of the right motion path may be rear-ended. There are often obstacles in the right motion path, so when changing lanes to avoid obstacles, the risk of exercise is also greatly increased.

When the robot is changing lanes and the road motion conforms to the above four conditions, lateral obstacle avoidance may cause more dangerous and uncontrollable motion accidents, which do not conform to the obstacle avoidance strategy based on motion safety criteria in this paper. Therefore, choosing vertical obstacle avoidance is a safer movement strategy at this time. Through the analysis of the safety obstacle avoidance model and obstacle avoidance strategy, it can be seen that the decision-making mechanism of the active obstacle avoidance system in this paper is shown in Figure 7.

#### 4. Motion Route Planning and Obstacle Avoidance Method of Mobile Robot Based on Deep Learning

Figure 8 shows the overall architecture of the deep learning-based route planning and obstacle avoidance system constructed in this paper.

It constructs a robot route planning and obstacle avoidance system based on deep learning, and then the motion route planning and obstacle avoidance effect of the proposed model are verified. The results shown in Tables 1 and 2 and Figures 9 and 10 are obtained.

From the above research, it can be seen that the robot based on deep learning proposed in this paper has a good motion path planning effect and obstacle avoidance effect and can effectively improve the autonomous motion effect of the robot.

#### 5. Conclusion

Path planning is the core problem of mobile robot navigation research. Its goal is to search for an optimal or suboptimal collision-free path from a specified starting point to a target point in an obstacle environment through a certain planning algorithm. At present, the research on the global path planning algorithm with known static environment information has been relatively mature. However, in actual implementation, the environmental information obtained by the robot is often incomplete, and there are dynamic changes. Therefore, how to perform path planning in a dynamic environment is still a difficult problem. This paper combines the deep learning theory to analyze the process of mobile robot motion path planning and obstacle avoidance and builds an intelligent model through simulation research. The simulation experiment study shows that the robot based on deep learning proposed in this paper has a good motion path planning effect and obstacle avoidance effect and can effectively improve the autonomous motion effect of the robot.

#### Data Availability

The labeled dataset used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This research was supported by the Henan Provincial Department of Education (Key Technology Research of Intelligent Mobile Handling Robot Based on Visual Perception, No. 21A520007).