## 2 Methods
### Initial Path Planning of Parallel Parking
#### 2.4.3 Determination of the Starting and Ending Points of Parking  
According to the requirements of collision constraints, the vehicle is most likely to collide with the parking space vertex \(a\) in the parking process, so the right contour of the vehicle body should be at the upper left of point \(a\) when the vehicle is in \(G_{2}G_{3}\) segment. The vehicle should keep a safe lateral distance \(H\) from the vehicle ahead at \(G_{5}\) the starting point of parking. The limit situation of vehicle collision free is analyzed in Figure 11. When the vehicle enters the straight line section, the distance between point \(a\) and the straight section is greater than half of the width of the body \(W\), and the circle centered on point \(O_{2}\) and the circle centered on point \(a\) are tangent to \(G_{7}\). \(\theta_{\rm a}\), \(\theta_{\rm b}\), and \(\theta_{\rm 3 min}\), the minimum center angle of arc \(G_{2}G_{1}\), are obtained from the coordinates of point \(G_{1}\) (\(x_{1}\), \(y_{1}\)), coordinates of point \(a\) (\(L_{1}\), \(L_{2}\)). In Figure 11, a vertical line is made of line segment \(O_{1}G_{1}\) through point \(a\) and intersect line segment \(O_{1}G_{1}\) at point \(e\). In the right triangle \(O_{1}ea\),  
\[{\rm sin}\,\theta_{a}=\frac{ea}{O_{1}a}=\frac{L_{1}-x_{1}}{\sqrt{\left(L_{1}- x_{1}\right)^{2}+\left(y_{1}+R_{m}-L_{2}\right)^{2}}}.\]  
Equation (11) can be derived as  
\[\theta_{a}=\arcsin\frac{L_{1}-x_{1}}{\sqrt{\left(L_{1}-x_{1}\right)^{2}+\left( y_{1}+R_{m}-L_{2}\right)^{2}}} \tag{11}\]  
Similarly, in the right triangle \(O_{1}fa\), Formula (12) can be derived according to  
\[{\rm cos}\,\theta_{b}=\frac{O_{1}f}{O_{1}a}=\frac{R_{m}+W/2}{\sqrt{\left(L_{ 1}-x_{1}\right)^{2}+\left(y_{1}+R_{m}-L_{2}\right)^{2}}}\]  
Figure 11: Extreme position of parallel parking with \(\theta_{\rm 3 min}\). \[\theta_{b}=\arccos\frac{R_{m}+W/2}{\sqrt{\left(L_{1}-x_{1}\right)^{2}+\left(y_{1}+R_ {m}-L_{2}\right)^{2}}} \tag{12}\]  
\[\theta_{\rm 3 min}=\theta_{\rm a}-\theta_{\rm b} \tag{13}\]  
From the above angle values, the coordinates of point \(G_{2}\) (Equation (14)), point \(G_{6}\) (Equation (15)), and point \(G_{7}\) (Equation (16)) can be obtained:  
\[[x_{2},y_{2}]=[x_{1}+R_{\rm m}{\rm sin}\theta_{\rm 3 min},y_{1}+R_{\rm m}(1- \cos\theta_{\rm 3 min})] \tag{14}\]  
\[[x_{6},y_{6}]=[x_{2}+R_{\rm m}{\rm tan}\theta_{\rm b}{\rm cos}\theta_{\rm 3 min},y_{2}+R_{\rm m}{\rm tan}\theta_{\rm b}{\rm sin}\theta_{\rm 3 min}] \tag{15}\]  
\[[x_{7},y_{7}]=[x_{2}+(R_{\rm m}+W/2){\rm tan}\theta_{\rm b}{\rm cos}\theta_{ \rm 3 min},y_{2}+(R_{\rm m}+W/2){\rm tan}\theta_{\rm b}{\rm sin}\theta_{\rm 3 min}] \tag{16}\]  
The coordinates of parking starting point \(G_{5}\) are  
\[{\rm sin}\,\theta_{a}=\frac{ea}{O_{1}a}=\frac{L_{1}-x_{1}}{\sqrt{\left(L_{1}- x_{1}\right)^{2}+\left(y_{1}+R_{m}-L_{2}\right)^{2}}}.\]0  
The minimum lateral safe distance at the starting point of parking is  
\[{\rm sin}\,\theta_{a}=\frac{ea}{O_{1}a}=\frac{L_{1}-x_{1}}{\sqrt{\left(L_{1}- x_{1}\right)^{2}+\left(y_{1}+R_{m}-L_{2}\right)^{2}}}.\]1  
By substituting the vehicle structure parameters into the calculation formula of the minimum parking space size, the minimum parking space length \(L_{1}\) = 5.89 m and the minimum parking space width \(L_{2}\) = 1.74 m are obtained. Considering the safety distance of anti-collision, the minimum parking space size is adjusted to \(L_{1}\) = 6.5 m, \(L_{2}\) = 2 m. The rear overhang of the vehicle is 0.905 m. Considering the collision avoidance requirements and parking standardization, the coordinates of \(G_{1}\) the parking end point is set as (1 m, 1 m). According to Equation (18), \(H_{\rm min}\) = 0.24 m, which is adjusted to 0.3 m to ensure the safety of parking path. According to the parking experience, when the rear of the ego vehicle is flush with the rear of the side vehicle, it starts to steer, and finally the coordinates of \(G_{5}\) the parking starting point are determined as (7.5 m, 3.1 m).