## 2 Improved RRT Algorithm
### Random Point Expansion Optimization  
When using RRT to plan the vehicle path, considering the vehicle kinematics constraints and limiting the sampling area can better meet the driving requirements of the vehicle steering mechanism and the vehicle following control requirements. The two-degree-of-freedom vehicle motion model is established with the center of the vehicle's rear axle as the reference point. The vehicle kinematics model is shown in Figure 3, \((x,y)\) are the coordinates of the vehicle's rear axle axis, which is in the inertial coordinate system \(OXY\), and \(\mu\) is the heading angle of the vehicle. \(\delta_{f}\) is the front wheel angle; \(\beta\) is the center of mass slip angle; \(B\) is the vehicle yaw angle; \(p\) is the velocity of the vehicle center of mass; \(L_{r}\) is the distance between the center of mass and the rear axle; and \(L_{f}\) is the distance between the center of mass and the front axle.  
Figure 1: Flow chart of improved RRT algorithm.  
Figure 2: Target bias comparison diagram. (**a**) The basic RRT; (**b**) the improved RRT.  
The differential equation formulas of the vehicle model are derived:  
\[\dot{x}=v\ cos\mu\Rightarrow x_{t+dt}=x_{t}+v\ cos\mu\cdot dt \tag{1}\]  
\[\dot{y}=v\ sin\mu\Rightarrow y_{t+dt}=y_{t}+v\ sin\mu\cdot dt \tag{2}\]  
\[\dot{\mu}=\omega\Rightarrow\mu_{t+dt}=\mu_{t}+(\
u/L)\cdot tan\delta_{f}\cdot dt \tag{3}\]  
Based on the above vehicle kinematics model, the feasible path of the vehicle in path planning is shown in Figure 4. According to Figure 4, the feasible path of the vehicle restricts the selection of the random point \(X_{nand}\) within the feasible area of the vehicle. As shown in Figure 5, the random point \(X_{nand}\) is generated in the feasible area of the vehicle. The positive direction of the \(X\)-axis of the centerline of the sampling node area is equal to the direction of the vehicle. The boundaries of the feasible area are \(L_{1}\) and \(L_{2}\). The vehicle's heading angle range is set to \(-40^{\circ}\) to \(40^{\circ}\), and the distance between the random point and the tree node is greater than a search step \(d\); that is, the restricted search area is within the feasible sector in front of the vehicle and greater than the step \(d\).  
Figure 4: Schematic diagram of vehicle feasible path.  
Figure 3: Vehicle kinematics model.  
To determine whether the random point \(X_{rand}\) is valid, it can be obtained based on the slope of the line between the nearest tree node \(X_{max}\) and the parent node (here, the path starting point \(X_{int}\)) and the line between the nearest tree node \(X_{near}\) and the random point \(X_{rand}\). In Figure 5, the coordinates of the parent node of the tree are \((x_{i1},y_{i1})\), the coordinates of the nearest tree node \(X_{near}\) are \((x_{n1},y_{n1})\), and the coordinates of the random point \(X_{rand}\) are \((x_{r1},y_{r2})\). \(k_{1}\) is the slope of the line between the nearest tree node and the parent node. \(k_{2}\) is the slope of the line connecting the nearest tree node to a random point. The formulas of \(k_{1}\) and \(k_{2}\) are as follows:  
\[k_{1}=(y_{n1}-y_{i1})/(x_{n1}-x_{i1}) \tag{4}\]  
\[k_{2}=(y_{r1}-y_{n1})/(x_{r1}-x_{n1}) \tag{5}\]  
\[\mu=arctan((k_{1}-k_{2})/(1+k_{1}\cdot k_{2})) \tag{6}\]  
If the value of \(\mid\mu\mid\) is less than \(\mu_{max}\), the generated random point is valid. The extended constraint formula is as follows:  
\[\mid\mu\mid<\mu_{max}=45^{\circ} \tag{7}\]