# Navigation Map Construction Based on Semantic Segmentation and Multi-Submap Integration
## 4 Methods
### Multi-Submap Fusion Mapping Method for Outdoor Environment
#### 4.2.1 Map Update Strategy for a Single Submap  
We set the area covered by each submap to 10 m \(\times\) 10 m, with each submap associated with a reference keyframe. When generating a new submap centered at a given location, the keyframe nearest to this center is selected as the reference using the pose matrix. In ORB-SLAM3, the system adopts the camera coordinate system of the first keyframe generated after initialization as the world coordinate system. Let the pose of the reference keyframe be denoted as \(\mathbf{T}_{wc}\); the ground plane fitted from the ground map points has a plane equation in the camera coordinate system of this reference keyframe as follows:  
\[n_{c}^{\mathrm{T}}\mathbf{p}-d_{c}=0 \tag{11}\]  
where \(\mathbf{n}_{c}\) represents the unit normal vector of the fitted ground plane in the camera coordinate system of the current reference keyframe and \(d_{c}\) denotes the distance from the origin of this camera coordinate system to the fitted ground plane. Both parameters can be obtained through the incremental ground plane fitting algorithm mentioned earlier. Since the pose of the reference keyframe is \(\mathbf{T}_{wc}\), the normal vector \(\mathbf{n}_{w}\) of the fitted ground plane in the world coordinate system can be calculated using the following Equation (12) in the camera coordinate system of the reference keyframe:  
\[ \begin{pmatrix}\mathbf{n}_{w}\\ 0\end{pmatrix} =\mathbf{T}_{wc} \begin{pmatrix}\mathbf{n}_{c}\\ 0\end{pmatrix}  \tag{12}\]  
Let \(P_{prj}\) denote the projection of the origin of the camera coordinate system of the reference keyframe onto the fitted ground plane, with coordinates \(\mathbf{p}_{prjc}\). The corresponding coordinates \(\mathbf{p}_{prjw}\) in the world coordinate system can be determined using the following Equation (13):  
\[ \begin{pmatrix}\mathbf{p}_{prjw}\\ 0\end{pmatrix} =\mathbf{T}_{wc} \begin{pmatrix}\mathbf{p}_{prjc}\\ 0\end{pmatrix}  \tag{13}\]  
From Equation (14), the distance \(d_{w}\) from the fitted ground plane to the origin of the world coordinate system, as expressed in the camera coordinate system of the reference keyframe, can be written as follows:  
\[d_{w}=\mathbf{n}_{w}^{\mathrm{T}}\mathbf{p}_{prjw} \tag{14}\]  
If \(d_{w}\) is negative, both the normal vector \(\mathbf{n}_{w}\) and the distance \(d_{w}\) should be inverted. If \(d_{w}\) is positive, no inversion is required. Consequently, the plane equation of the ground surface in the world coordinate system for the submap can be written as follows:  
\[\mathbf{n}_{w}^{\mathrm{T}}\mathbf{p}-d_{w}=0 \tag{15}\]  
After determining the parameters of the fitted ground plane, a reference coordinate system for the occupancy grid map must be established. To facilitate subsequent mapping, a three-dimensional coordinate system is chosen as the reference. This system is defined such that the fitted ground plane corresponds to the xOy-plane, with the Z-axis oriented upwards from the plane. This coordinate system will henceforth be referred to as the submap coordinate system. Since the relative position between the submap and the world coordinate systems is fixed, the transformation between them can be easily derived. The transformation from the submap coordinate system to the world coordinate system is denoted as \(\mathbf{T}_{ws}\). The center of the submap is defined as the origin of the submap coordinate system. Since each submap has the same scale and resolution, the distance between the centersof two adjacent submaps is fixed. Therefore, the projected position of each submap's center on the xOz-plane of the world coordinate system can be determined, with the projection coordinates denoted as \(\left(X_{SubMap},Z_{SubMap}\right)^{\text{T}}\). To determine the coordinates \(\left(X_{SubMap},Y_{SubMap},Z_{SubMap}\right)^{\text{T}}\) of the center of the submap in the world coordinate system, it is sufficient to compute its component along the Y-axis, denoted as \(Y_{SubMap}\).