# Trajectory Planning of Shape-Following Laser Cleaning Robot for the Aircraft Radar Radome Coating
## 2 Materials and Methods
### Laser Cleaning Robot Trajectory Planning
#### 2.3.2 Calculation Model for Laser Cleaning Actuator Point Coordinates  
Geometric Relationship Model between Cleaning Actuator Points and Sliced Point Cloud  
The definition of the laser coating cleaning actuator point is the central point of the effective processing area of the laser spot during a single cleaning operation. In a single cleaning operation, the laser cleaning device can achieve comprehensive coverage and cleaning of the effective processing area. Therefore, all points within this area can be simplified to a single cleaning point, represented by the centroid of the point cloud slice. The calculation formula for this point is as follows:  
\[u_{s_{j}}=\frac{1}{j}{\sum_{b=1}^{j}}q_{b} \tag{13}\]  
Among them, the set of slice points is \(\{q_{1},q_{2},q_{3},\cdots,q_{j}\}\). Store the cleaning point data \(u_{s_{j}}\) in the point set \(ListU\). The Estimation of the Normal Vector for the Cleaning Points  
For a regular surface \(S\) in three-dimensional space, the normal vector \(u\) at point \(u_{s}\) can be approximated as the normal vector of the surface at point \(u_{s}\). In the tangent plane \(p\) at \(u_{s}\), vectors \(a\) and \(b\) are two non-collinear vectors, as shown in Figure 9.  
The data stored in \(ListU\) consist of a series of points, forming a sampling point set \(U\). The normal vector at each data point \(u_{s_{j}}\) in the sampling point set represents the normal vector of the local tangent plane at that point on the surface. There are two main methods for estimating the normal vectors. One method involves the scattered data's triangulated  
Figure 9: Illustration of point cloud normal vector estimation. topology, where the normal vector is obtained from the normal vectors of the relevant triangles in the point cloud data, considering the triangulated topology of the point cloud data. The other method utilizes the neighborhood information of each point and employs the least squares principle to locally fit a plane to the \(K\) neighboring points. The fitted plane can be considered as the local tangent plane at that point. The normal vector of the local tangent plane at that point is then regarded as the normal vector of the sampling point. This method provides better flexibility by adjusting the neighborhood size to balance the smoothness and details of the normal vectors. The following formula is used to calculate the plane fitting for each point's \(K\) neighborhood:  
\[p_{j}\big{(}\mathbf{u}_{j},d\big{)}=\underset{(u_{j},d)}{\text{argmin}}\sum_{l=1}^ {k}\big{(}\mathbf{u}_{l}\mathbf{p}_{l}-d\big{)}^{2} \tag{14}\]  
where \(\mathbf{u}_{j}\) represents the normal vector of the locally fitted plane \(p_{j}\), while \(\mathbf{p}_{l}(l=1,2\cdots k)\) denotes the k neighboring points of \(u_{s_{j}}\) within \(s_{j}\). The variable \(d\) represents the distance from the fitted plane \(p_{j}\) to the origin of the coordinate system. The normal vector of plane \(p_{j}\) is determined through principal component analysis (PCA), by analyzing the eigenvector corresponding to the minimum eigenvalue of the covariance matrix \(A\). This minimum eigenvector represents the normal vector of plane \(p_{j}\). The covariance matrix \(A\) is defined as follows:  
\[A=\sum_{l=0}^{k}\big{(}p_{l}-\overline{p}\big{)}^{T}\big{(}p_{j}-\overline{p} \big{)} \tag{15}\]  
where \(\overline{p}\) denotes the centroid of the k neighborhood points around point \(u_{s_{j}}\). To fit the plane \(p_{j}\), satisfying the condition of minimizing the sum of squared distances between the neighboring points and the plane, we utilized the Lagrange theorem to solve the covariance matrix \(A\) and the plane's normal vector, \(\mathbf{u}_{j}\), which satisfied the following relationship:  
\[A\mathbf{u}_{j}=\lambda\mathbf{u}_{j} \tag{16}\]  
where \(\lambda\) represents the eigenvalues of matrix \(A\).