## 3 Methodology
### Lidar Point Cloud Mapping
#### 3.2.1 Polarized Lidar Odometry Factor  
Since the coordinate system of the first fan-shaped sector serves as the reference body system in posture compensation, the resultant posture calculated by the posture transformation matrix for the panoramic laser frame represents the initial posture value of the current frame, denoted as \(\hat{x}_{n}\). The polarized odometry calculation for the current frame involves polarized feature extraction and nearest node matching. As shown in Figure 7, initially, the point cloud polar coordinates are computed and mapped into a two-dimensional polarized matrix. At the same time, the keyframes are extracted. Subsequently, the polarized edge features and polarized planar features are derived from this matrix. By matching the point cloud polarized features of the current frame with the local map, in conjunction with the initial posture value, the posture of the current Lidar frame is determined. 1. Polar Lidar Matrix Construction  
The number of point clouds in one frame is extensive, necessitating the construction of a point cloud polarized matrix based on Lidar operating parameters to polarize the Lidar frame in two dimensions. The corresponding relationship between the polarized matrix and a point \(p_{k}\) in the Lidar frame is as follows:  
\[\left\{ \begin{aligned} row&=f\left(\theta_{k}^{ \text{T}}\right)\\ col&=\frac{\theta_{k}^{\text{D}}}{\pi e_{\text{ls}}} \end{aligned} \right., \tag{11}\]  
Figure 6: Schematic diagram of polarized Lidar odometry and loop closure. \[\theta_{k}^{\rm v}=atan2\left(\frac{z_{k}}{\sqrt{x_{k}^{2}+y_{k}^{2}}} \right)\times\frac{180}{\pi}, \tag{12}\] \[\theta_{k}^{\rm h}= \begin{cases}atan2\left(\frac{y_{k}}{x_{k}} \right)\times\frac{180}{\pi}&y_{k}\geq 0\\ \left(atan2\left(\frac{y_{k}}{x_{k}}\right)+2\pi\right)\times\frac{180}{\pi} &y_{k}<0\end{cases} ,\] (13) \[I(row,col)=\sqrt{x_{k}^{2}+y_{k}^{2}+z_{k}^{2}}. \tag{14}\]  
where \(f(\cdot)\) denotes the mapping between the vertical angle of the point cloud and the row index, determined by the vertical angle distribution specific to different Lidar models. For instance, in the case of a 16-line Lidar with a horizontal angular resolution of 0.2\({}^{\circ}\), there are 16 scanning lines and 1800 columns in the matrix. The row index in the two-dimensional matrix is calculated based on the laser line ID to which the point cloud belongs, while the column index is determined by the horizontal azimuth angle \(\theta\) of the point cloud using the formula \(col=\theta/0.2^{\circ}\). The depth value in the matrix represents the Euclidean distance from the point cloud to the Lidar coordinate system. This construction method results in a two-dimensional matrix known as the polarized matrix of point cloud. It should be noted that when the polarized matrix is expanded into a three-dimensional tensor, each element \(I(row,col)\) can store multiple channel values, such as point depth and intensity. 2. Keyframe Detection  
Feature extraction and matching across all frame nodes are time-consuming and resource-intensive, necessitating keyframe extraction. The method involves calculating the pose transformation between the current laser frame and the previous laser historical keyframe to determine if the current frame qualifies as a keyframe. This calculation includes determining the roll angle transformation \(\Delta roll\), pitch angle transformation \(\Delta pitch\), yaw angle transformation \(\Delta yaw\), and translation transformation \(\Delta trans\) between the current laser frame and the previous historical keyframe \(\mathbb{F}_{n-1}\). When any of these transformations exceed their respective thresholds, the current laser frame \(\mathbb{F}_{n}\) is designated as a keyframe. The newly identified keyframe \(\mathbb{F}_{n}\) is linked to the new vehicle state node \(x_{n}\) in the factor graph, and all Lidar frames between the two keyframes are discarded.