# Trajectory Planning of Shape-Following Laser Cleaning Robot for the Aircraft Radar Radome Coating
## 2 Materials and Methods
### Slicing and Visualization of Radome Point Cloud Data  
#### 2.2.1 Radome Point Cloud Data Slicing Processing  
After repositioning the point cloud coordinate system at the origin, it was necessary to consider slicing the radar hood point cloud model. Due to the inherent geometric characteristics of the radar hood, vertical slicing was performed first based on its height symmetry, followed by horizontal slicing. Considering the complexity of horizontally slicing the radar hood point cloud model in three-dimensional space, a projection-based point cloud slicing technique was proposed. This technique enables rapid and accurate horizontal segmentation of the radar hood point cloud model.  
Slicing in the Z-Axis Direction  
The radar hood point cloud model was divided into several layers based on the z-coordinate. The division was determined by the laser cleaning range, denoted as \(h\), and took into account an angle \(\theta\). (The choice of \(\theta\) was dictated by factors such as the physical structure of the radar hood and the positioning of the cleaning equipment.) The height of each layer was calculated as \(\Delta h=h*\cos\theta\). For a radar hood with a height of \(H\), it was divided into \(G=H/\Delta h\) sections. The height at which each layer's slicing line was located was denoted as \(Z_{k}(1\leq k\leq G+1)\). The point cloud was sorted in ascending order based on the \(z\)-coordinate, and each point was assigned to the corresponding layer based on its \(z\)-coordinate value.  
Projection-Based Point Cloud Segmentation for Radar Hood Geometry  
Considering the geometric characteristics of radar domes, the annular structure formed after height segmentation requires further horizontal segmentation. The projection-based point cloud segmentation technique is a method that projects the point cloud onto a 2D space for processing, aiming to reduce the complexity of horizontal slicing of the point cloud. The algorithm flow of this technique is illustrated in Figure 6.  
The point cloud of the radar radome was projected onto the \(Z\)-direction and underwent normalization and binarization after height segmentation. By extracting the contour of the binarized image, the annular segments of the radar dome were obtained, as shown in Figure 7. Based on the horizontal scanning range of the laser, the segmentation dimensions were calculated and the radar dome was horizontally segmented into annular sections. The circumference of each radar dome ring was denoted as \(W\), the horizontal cleaning range as \(w\), the angle of the ring as \(\alpha\), and the number of segmentations within the ring as \(M\). Thus, \(M=W/(w*\cos\alpha)\). After partitioning, each segmentation line was assigned an angle \(\alpha_{g}(0\leq g\leq M)\). The regions within each ring were assigned corresponding pixel values based on the magnitude of \(\alpha_{g}\). An image with the same size as the binarized image was initialized, with all pixel values set to 0, referred to as the label image. In each segmented region of the ring, the positions of non-zero pixels within the current region were identified and the corresponding pixel values in the label image were set to the current label value. Using the label image obtained, the current original point cloud data within the segmented ring were labeled, cached, and fused, with the point cloud list being promptly updated. Upon traversing all the layers of points, the data were saved into the point cloud segmentation database, resulting in a collection of point cloud slices, denoted as \(S\)\(\{s_{1},s_{2},s_{3},\cdots,s_{j}\}\).