# A Survey of Low-Cost 3D Laser Scanning Technology
## 2 Overview of Principles  
We begin the discussion of a moving 2D LiDAR by analyzing its principles. Here, the widely used TOF (Time of Flight) LiDAR is taken as an example. When a TOF LiDAR is working, the emitter in it emits laser beams. The laser beams are reflected after encountering objects and are received by the receiver of the LiDAR. The TOF LiDAR calculates the distance of an observed object by the time difference between the point in time when a laser beam is emitted, and the point in time when a laser beam returns after reflection. In Figure 2, a TOF 2D LiDAR collects two sets of data at positions 1 and 2 in a room, respectively. At each position, in the fan-shaped scanning area of the 2D LiDAR, its emitter emits a certain number of laser beams, some of which shoot out of the door or window of the room, and do not reflect back. The remaining light beams encounter the objects or walls in the room, and reflect back. Those laser beams are received by the receiver of the 2D LiDAR, from which sampling points can be calculated. The principle of a moving 2D LiDAR can be briefly summarized in one sentence, which is, 2D LiDAR collects sampling points at different positions, and these sampling points are converted to a global world coordinate frame. This process involves the conversion of the 3D coordinates of the sampling point between different coordinate frames. Here, we define three coordinate frames, namely, the coordinate frame of the 2D LiDAR (at position 1), which is denoted as \(L\)-\(X_{L}Y_{L}Z_{L}\); the coordinate frame of the 2D LiDAR at another position (position 2), which is denoted as \(L^{\prime}\)-\(X_{L^{\prime}}Y_{L^{\prime}}Z_{L^{\prime}}\); the world coordinate frame \(W\)-\(X_{W}Y_{W}Z_{W}\), as shown in Figure 2.  
The definition of the 2D LiDAR coordinate frame \(L\)-\(X_{L}Y_{L}Z_{L}\) is as follows: the original point \(L\) of this coordinate frame is the center of the 2D LiDAR scanning sector. The plane \(Y_{L}LZ_{L}\) is a coplanar with the scanning sector. The axis \(Z_{L}\) is the middle line of the scanning sector, and the axis \(X_{L}\) is perpendicular to the scanning sector. The position of coordinate frame \(L\) relative to the 2D LiDAR is fixed, but its position relative to the room is not fixed, because the 2D LiDAR is moving in the room. Figure 2: The principle of a moving 2D LiDAR. The definition of the coordinate frame \(L^{\prime}\)-\(X_{L^{\prime}}Y_{L^{\prime}}Z_{L^{\prime}}\) is similar to the definition of coordinate frame \(L\)-\(X_{L}Y_{L}Z_{L}\). The only difference is that the position of the coordinate frame \(L^{\prime}\)-\(X_{L^{\prime}}Y_{L^{\prime}}Z_{L^{\prime}}\) relative to the coordinate frame \(L\)-\(X_{L}Y_{L}Z_{L}\) has been changed, for the position of the 2D LiDAR has been changed. The coordinate frame \(W\)-\(X_{W}Y_{W}Z_{W}\) is the global world coordinate frame. Compared with the coordinate frame \(L\)-\(X_{L}Y_{L}Z_{L}\) and the coordinate frame \(L^{\prime}\)-\(X_{L^{\prime}}Y_{L^{\prime}}Z_{L^{\prime}}\) whose positions are not fixed, the coordinate frame \(W\)-\(X_{W}Y_{W}Z_{W}\) is fixed relative to the room. The 3D coordinates of the sampling points collected by the 2D LiDAR at different positions are converted to the coordinate frame \(W\)-\(X_{W}Y_{W}Z_{W}\). In this way, a 3D point cloud that shows the outline of the room can be built. The raw data collected by a 2D LiDAR contain ranging data and azimuth angles. The ranging data and azimuth angle of point \(p\) in Figure 2 are denoted as \(r\) and \(\theta\), respectively. The coordinate of point \(p\) relative to coordinate frame \(L\) is denoted as \(p_{L}\), it can be calculated as follows:  
\[\mathbf{p}_{L}=r\big{[} \begin{array}{cc}0&-c(\theta)&-s(\theta)\end{array} \big{]} ^{T} \tag{1}\]  
where \(c(\cdot)\) and \(s(\cdot)\) are \(\cos\) and \(\sin\), respectively.