# Fast Loop Closure Selection Method with Spatiotemporal Consistency for Multi-Robot Map Fusion
## 4 Proposed Method
### Graph Theory for Clique  
In this section, we first perform the outlier rejection for a pair of pose graphs and then conduct to merge the local robot maps into a global map. Before starting, some basic concepts of graph theory are presented for ease of description. In an undirected graph \(G=\{V,E\}\), an edge \(e(i,j)\) connects two vertices, \(i\) and \(j\), where \(e\in E\) and \(i,j\in V\). The graph may contain more than one clique \(G_{c}=\{V_{c},E_{c}\mid V_{c}\subseteq V,E_{c}\subseteq E\}\). The clique is a subset of the graph in which there is an edge between each pair of vertices, and the maximum clique is the one with the most vertices in such a subset in the graph. By leveraging the associated definitions of cliques, we discuss how the problem defined in (7) is reformulated into the maximum clique problem using a small case. Assume that there are two pose graphs containing 13 inter-robot loop closures, which constitute the entire measurement set \(\mathbf{Z}^{ab}\), as shown in Figure 2a. According to the clustering method, it can be seen that there are three overlapped segments between trajectories. Based on the previous assumption, accurate inter-robot measurements are consistent and topologically correct. The proposed clustering method based on (6) introduces the topology dimension to segment the entire measurement set that contains outliers and inliers into multiple clusters. We redefine function \(h\left(\mathbf{z}_{jl}^{ab},\mathbf{z}_{ik}^{ab}\right)\) in (7) to evaluate the topology relationship of inter-robot measurements as follows. \[h\left(\mathbf{z}_{jl}^{ab},\mathbf{z}_{ik}^{ab}\right)=\left\{ \begin{array}{ll}1,& \mathbf{z}_{jl}^{ab},\mathbf{z}_{ik}^{ab}\in\mathbf{Z}_{c}^{ab}\\ 0,&\text{others}\end{array} .\right. \tag{8}\]  
Each cluster \(\mathbf{Z}_{c}^{ab}\) corresponds to a topology matrix \(\mathbf{H}_{c}\), which is used to store the topology values in (8). The matrix \(\mathbf{H}_{c}\) is a symmetric matrix whose main diagonal elements are zero as the topology with itself is meaningless; the rest of the elements are \(h_{i,j}\), \((i\
eq j)\), as shown in Figure 2b. The proposed clustering method divides the measurement set into two clusters of different scales following the definition of topology correctness. On the one hand, inter-robot loop closures tagged 6, 7, 12, and 13 are not included in these two clusters because they do not satisfy the criterion of topology correctness. On the other hand, for those isolated inter-robot measurements, those smaller clusters consisting of only one or two measurements can generally be considered outliers based on the above analysis of the continuity of similar scenes. Therefore, the cluster consisting of inter-robot loop closure tagged 8 is likely to be outliers and can be discarded. These discarded measurements are no longer used for subsequent consistency evaluation. Our method takes each cluster as the basic unit to calculate its corresponding pairwise consistency values. Similar to matrix \(\mathbf{H}_{c}\), a new matrix is constructed to store the pairwise consistency values calculated in (4). According to the definition of an undirected graph, this matrix is also symmetric, and the elements on the main diagonal are all zeros because the consistency with itself has no practical meaning. Next, all items \(m_{i,j}\) in the matrix that are smaller than the threshold are reset to zeros, indicating that these measurements do not meet the definition of consistency with each other. The matrix is redefined as a topologically correct and consistent matrix \(\mathbf{M}_{c}\), as shown in Figure 2c. The latest matrix \(\mathbf{M}_{c}\) can be further transformed into its corresponding undirected graph in the form of an adjacency matrix, as shown in Figure 2d. It can be seen that each topologically correct and consistent set corresponds to a clique in the graph, and accordingly, the definitions of its nodes and edges have also changed.