## 6 Conclusions  
For a rotating 2D lidar, the inaccurate matching between the 2D lidar and the motor is an important cause of the shape and attitude error of the 3D point cloud. To solve this problem, existing methods need to synchronize the 2D lidar data and the motor shaft by measuring the angle position of the motor shaft. To measure the angle position of the motor shaft, either a complicated and expensive servo system with absolute positioning function is required, or the motor needs to be equipped with a precise angular displacement sensor, such as an absolute encoder. This will greatly increase the cost. Our method eliminates the shape and attitude error of the 3D point cloud caused by the inaccurate matching between the 2D lidar and the motor, without using a servo system or encoder. First, we modified the sequence between the motor and the 2D lidar to make the motor start working earlier and stop working later than the 2D lidar, so that the shape of the 3D point cloud is no longer affected by the acceleration and deceleration of the motor, a 3D point cloud with correct shape can be obtained. Next, we eliminated the uncertain error of the attitude of the 3D point cloud through a triangular plate fixed on the prototype. Finally, we calibrated the installation error of the triangular plate by using Levenberg-Marquardt method. We verified the effectiveness and accuracy of our method by experiments. The results show that the collected 3D point cloud can meet the requirements of 3D mapping of an indoor autonomous mobile robot. Through our work, while reducing the cost, the accuracy is ensured. Our work provides a new idea for the cost reduction of a rotating 2D lidar. Our method can not only calibrate the matching error between the 2D lidar and the motor, but also partially calibrate the installation error between the 2D lidar and the motor shaft. The installation error is 6-DOF, containing a 3-DOF translation and 3-DOF rotation [4]. The direction of one of the rotation errors is the same as the rotation direction of the motor shaft. It will not cause the shape error of the 3D point cloud, but it will cause the attitude error of the 3D point cloud. Due to its characteristic that it will not cause the distortion in shape of the 3D point cloud, it is difficult to calibrate it [1,5], while our method can calibrate it. As for future work, we have noticed that the real-time performance of a rotating 2D lidar is very poor, and its 3D scanning frequency is often not higher than 1 Hz. Therefore, when a rotating 2D lidar is scanning, the movement of the platform carrying the rotating 2D lidar will cause the distortion of the 3D point cloud [24,25,27]. Therefore, for a rotating 2D lidar, it is not enough to obtain an accurate 3D point cloud in static state, it is necessary to study how to eliminate the distortion of the 3D point cloud in motion state. Our follow-up plan is to combine our method with an algorithm that calibrates the distortion of the 3D point cloud in a dynamic environment. We will try to collect an accurate 3D point cloud (which is accurate both in shape and attitude) in a dynamic environment, by using a low-cost rotating 2D lidar which does not require an angular sensor to measure the angle of motor shaft. Conceptualization, C.Y. and S.B. ; methodology, C.Y. ; software, C.Y., J.C., W.W., and D.Y. ; validation, C.Y., J.C., W.W. and D.Y. ; formal analysis, C.Y. ; investigation, C.Y. ; resources, S.B. ; data curation, C.Y. ; writing--original draft preparation, C.Y. ; writing--review and editing, S.B., W.W., J.C. and D.Y. ; visualization, C.Y. ; supervision, S.B. ; project administration, C.Y. ; and funding acquisition, S.B. All authors have read and agreed to the published version of the manuscript. This research was funded by Scientific and Technological Project of Hunan Province on Strategic Emerging Industry under grant number 2016 GK4007, Beijing Natural Science Foundationunder grant number 3182019, and National Natural Science Foundation of China under grant number 91748101.