## 2 Local Path Generation Based on Spatial Perception
### Dynamic Control Point Determination
#### 2.1.2 Determination of Control Points for Local Obstacle Avoidance Path
The curve's commencement in terms of position and direction is shaped by the initial three control points, whereas its termination is determined by the concluding three. To refine the curve's contour, additional control points can be interspersed between these primary control points. To facilitate a more fluid lane-changing maneuver for the intelligent driving sight-seeing vehicle, the avoidance path is defined using a quasi-uniform cubic B-spline curve, delineated by six control points: \(A_{0},\ A_{1},\ A_{2},\ A_{3},\ A_{4},\) and \(A_{5}\). Point \(A_{0}\) corresponds to the center of the vehicle's front end, marking the inception of the avoidance path. The real-time coordinates of \(A_{0}\), designated as \(\left[x_{0},y_{0}\right]^{T}\), are procured through the onboard GNSS/GPS module. Conversely, point \(A_{5}\) signifies the conclusion of the avoidance path, indicating that the vehicle has wholly circumvented the obstacle. The coordinates of \(A_{5}\), represented as \(\left[x_{5},y_{5}\right]^{T}\), are ascertained based on the obstacle's real-time spatial location. Assuming the distance between \(A_{0}\) and \(A_{1}\) mirrors that between \(A_{4}\) and \(A_{5}\), the positions of control points \(A_{1}\) and \(A_{4}\) can be determined via the control segment \(d_{2}\). To ensure compliance with both avoidance safety and curvature continuity constraints, \(d_{2}\) must adhere to the ensuing relationship:  
\[d_{2}\geqslant\max\ (d_{0},d_{1}) \tag{3}\]  
For determining the positions of control points \(A_{1}\) and \(A_{4}\), the following methodology is adopted:  
\[\left\{ \begin{aligned} A_{1}=\begin{bmatrix}x_{1}\\ y_{1}\end{bmatrix}=\begin{bmatrix}x_{0}+d_{2}cos\ (\beta_{0})\\ y_{0}+d_{2}sin\ (\beta_{0})\end{bmatrix}\\ A_{4}=\begin{bmatrix}x_{4}\\ y_{4}\end{bmatrix}=\begin{bmatrix}x_{45}-d_{2}cos\ (\beta_{0})\\ y_{45}-d_{2}sin\ (\beta_{0})\end{bmatrix}\end{aligned} \right. \tag{4}\]  
The positions of control points \(A_{1}\) and \(A_{4}\) are influenced by \(\beta_{0}\), the map's heading angle, ascertainable in real-time via the GNSS/GPS module. Upon establishing the positions of control points \(A_{1}\) and \(A_{4}\), the foundational shape of the B-spline curve emerges. For a refined, smoother, and local curve, additional control points, \(A_{2}\) and \(A_{3}\), are interpolated between \(A_{1}\) and \(A_{4}\). To preserve curvature continuity, an initial strategy positions \(A_{2}\) and \(A_{3}\) at the trisection points of the segment connecting \(A_{1}\) to \(A_{4}\). Control points \(A_{2}\) and \(A_{3}\) can be calculated using Equation (5). \[\left\{ \begin{aligned} A_{2}=\begin{bmatrix}x_{2}\\ y_{2}\end{bmatrix}=\begin{bmatrix}\frac{\left(2x_{1}+x_{3}\right)}{3}\\ \frac{\left(2y_{1}+y_{4}\right)}{3}\end{bmatrix}\\ A_{3}=\begin{bmatrix}x_{3}\\ y_{3}\end{bmatrix}=\begin{bmatrix}\frac{\left(x_{1}+2x_{3}\right)}{3}\\ \frac{\left(y_{1}+2y_{4}\right)}{3}\end{bmatrix}\end{aligned} \right. \tag{5}\]  
Figure 2: Control line segment model. The preliminary control points, as derived for the quasi-uniform cubic B-spline curve, are depicted in Figure 3.