## 4 Method
### Calibration of Uncertain Attitude Error of 3D Point Cloud
A point cloud relative to the coordinate frame \(O\) can be obtained, this point cloud is called \(C_{O}\). It is accurate both in shape and attitude. A summary of the above process is as follows. Because of the uncertainty of the attitude error of the 3D point cloud, we cannot find a constant estimated value for it according to the conventional calibration methods. When using a conventional method  
Figure 6: In order to extract the point cloud \(C_{\text{tri}}\) from the point cloud \(C_{O^{\prime}}\), we define a special area, which is shown in blue. to calibrate the error, a constant estimated value of the error will be found out, and it is used to correct the adverse effects of the error. However, when the value of the error is not constant, the conventional method will fail. To calibrate this uncertain attitude error, we use a triangular plate. It is fixedly installed on the prototype, so it is fixed relative to the coordinate frame \(O\)-\(XYZ\). We can know its attitude relative to the coordinate frame \(O\)-\(XYZ\) according to the installation position of the triangular plate on the prototype. In addition, we can extract the point cloud \(\mathbf{C}_{\text{tri}}\) corresponding to the triangular plate from the point cloud \(\mathbf{C}_{O^{\prime}}\) and calculate its attitude relative to the point cloud \(\mathbf{C}_{O^{\prime}}\). Since the attitude of the triangular plate relative to the point cloud \(\mathbf{C}_{O^{\prime}}\) is known, and the attitude of the triangular plate relative to the coordinate frame \(O\)-\(XYZ\) is also known, therefore, the attitude of the point cloud \(\mathbf{C}_{O^{\prime}}\) relative to the coordinate frame \(O\)-\(XYZ\) can be calculated, that is, the attitude error of point cloud \(\mathbf{C}_{O^{\prime}}\) can be calculated. Here, the triangular plate plays a key role. For each 3D scan of our prototype, we perform the above process to obtain the attitude error of the point cloud \(\mathbf{C}_{O^{\prime}}\) corresponding to this scan. Although the attitude error of the point cloud \(\mathbf{C}_{O^{\prime}}\) is not constant for each 3D scan, we can calculate it in each 3D scan. In this way, we can calibrate it. The following items should be paid attention to when calculating the angle \(\varphi_{\text{offset}}\) with the above method. 1. In our method, we define the middle line of the triangular plate according to the center point \(\mathbf{c}\). We have also tried to define the middle line by finding the point in point cloud \(\mathbf{C}_{\text{tri}}\) which is farthest from the rotation axis of the motor shaft (that is, the right-angled vertex of the triangular plate), it turns out that it is less accurate. The reason is obvious, the center point \(\mathbf{c}\) is calculated based on all the points in point cloud \(\mathbf{C}_{\text{tri}}\), while the farthest point is just one point selected from point cloud \(\mathbf{C}_{\text{tri}}\). Therefore, the former is more accurate. Moreover, the accuracy of the 2D lidar Hokuyo UST-10 LX we use in our prototype is \(\pm 40\)mm. At this level of accuracy, it is necessary to use the average of multiple points instead of a single point to define the middle line of the triangular plate. 2. The larger the triangular plate is, the more points are contained in the point cloud \(\mathbf{C}_{\text{tri}}\), and the calculation of the center point \(\mathbf{c}\) is less affected by the accidental error. However, if the size of the triangular plate is too large, it will be inconvenient. The triangular plate installed on our prototype is an isosceles right triangle. The lengths of its three edges are 79.2 mm, 79.2 mm and 112 mm respectively. 3. The distance between the triangular plate and the motor shaft should be moderate. If the distance is too close, a part of the triangular plate will be in the blind area of the scanning field and cannot be scanned.