## 2 Problems  
According to the previous description, our goal is to use only a stepper motor to rotate a 2D lidar without using encoder or servo motor to reduce the cost under the premise of ensuring the accuracy of the 3D point cloud. For this purpose, a method is proposed in [2], an open-loop controlled stepper motor is used to rotate the 2D lidar, the motor stops rotating when its shaft turns to a certain position, and then the 2D lidar begin its scan. After the 2D lidar finishes scanning, the motor shaft rotates to the next position, and the 2D lidar scans again. This cycle continues until the 3D point cloud collection is completed. There is a certain angle between every two adjacent positions of the motor shaft, which determines the density of the 3D point cloud. This method attempts to align the data from the 2D lidar and the angle of the motor shaft at the cost of low efficiency, but it has obvious disadvantages. The frequent stop and start of the motor may cause mechanical failure. The acceleration and deceleration of the motor can decrease the accuracy of the rotation positioning. Due to the need of stopping the rotation of the motor shaft for multiple times, the time used for finishing a 3D scan will be prolonged. In view of the above disadvantages, it is necessary to develop a method to calibrate the matching error between 2D lidar and motor while the motor rotates continuously. In our work, during the 3D scan process of a rotating 2D lidar, the 2D lidar scans continuously, and the shaft of the stepper motor rotates at a constant angular velocity. The matching between the two can no longer be done with the help of time stamps, because the stepper motor is open-loop, and there is no sensor to measure the rotation angle of the motor shaft, so the data of motor angle with time stamps cannot be obtained. In this case, we initially tried to match the 2D lidar and the motor in the following way. After the angular resolution \(\gamma\) in the direction of motor shaft rotation was configured, the number of scanning cycles \(n\) of the 2D lidar in one 3D scan could be calculated as:  
\[n=\frac{180^{\circ}}{\gamma} \tag{1}\]  
The scanning frequency \(f\) of the 2D lidar could be found in its product manual, so the time \(T\) used for finishing a 3D scan of a rotating 2D lidar could be calculated as:  
\[T=\frac{n}{f} \tag{2}\]  
For a rotating 2D lidar, a 3D scan requires the motor shaft to rotate 180 degrees [2], so the angular velocity \(\omega\) of the motor shaft could be calculated as:  
\[\omega=\frac{180^{\circ}}{T} \tag{3}\]  
Until now, the control parameters of the 2D lidar and the stepper motor have been calculated, the working time of the 2D lidar in continuous scanning mode is \(T\), the shaft of the stepper motor rotates at angular velocity \(\omega\), and its working time is \(T\). We made them start working at the same time, so that ideally they could be matched. However, we found that there are obvious errors in the 3D point cloud, both in the shape and attitude. Additionally, for each 3D scan, the error is not constant. Our experiment is shown in Figure 1, Figure 1a is a photo of the environment for collecting 3D point cloud. The errors we observed are shown in Figure 1b,c. The environment is a conference room. The position of the rotating 2D lidar is aligned with the gap between the tiles on the ground to ensure that it is not skewed relative to the conference room. In this way, the top view of the 3D point cloud should be correct in shape and attitude, and coincide with the blue wireframe. This is not actually the case. The shape is distorted and the attitude is skewed. In addition, for each 3D scan, the error of the 3D point cloud is uncertain, and the 3D point cloud may appear as in Figure 1b,c. There are several reasons for the error. 1. As mentioned in [1; 4; 5; 6; 7; 8; 9; 10], the mechanical error between the 2D lidar and rotating unit can cause distortion of the 3D point cloud. Based on the idea of control variables, in order to focus on other reasons, we need to exclude this item first.