{'fraction_non_alphanumeric': 0.028433219900441543, 'fraction_numerical': 0.008324661810613945, 'mean_word_length': 4.727770618556701, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
CAE-RLSM: Consistent and Efficient Redundant Line Segment Merging for Online Feature Map Building

In order to obtain a compact line segment-based map representation for localization and planning of mobile robots, it is necessary to merge redundant line segments which physically represent the same part of the environment in different scans. In this paper, a consistent and efficient redundant line segment merging approach (CAE-RLSM) is proposed for online feature map building. The proposed CAE-RLSM is composed of two newly proposed modules: one-to-many incremental line segment merging (OTM-ILSM) and multi-processing global map adjustment (MP-GMA). Different from state-of-the-art offline merging approaches, the proposed CAE-RLSM can achieve real-time mapping performance, which not only reduces the redundancy of incremental merging with high efficiency, but also solves the problem of global map adjustment after loop closing to guarantee global consistency. Furthermore, a new correlation-based evaluation metric is proposed for the quality evaluation of line segment maps. This evaluation metric does not require manual measurement of the environmental metric information, instead it makes full use of globally consistent laser scans obtained by simultaneous localization and mapping (SLAM) systems to compare the performance of different line segment-based mapping approaches in an objective and fair manner. Comparative experimental results with respect to a mean shift-based offline redundant line segment merging approach (MS-RLSM) and an offline version of one-to-one incremental line segment merging approach (OTO-ILSM) on both public data sets and self-recorded data set are presented to show the superior performance of CAE-RLSM in terms of efficiency and map quality in different scenarios.


I. INTRODUCTION
M AP building is a key module for autonomous mobile robots since both localization and planning usually depend on the map information of the environment [1], [2], [21]. One typical map representation is the grid map [3], [16], wherein the value of each cell represents the probability of being occupied by obstacles. However, the required memory of the grid map grows rapidly with the increase of the environmental size. Therefore, the representation of the environment by features such as line segments becomes a popular alternative to the grid map [5], [9], [10], [25].
This work is supported in part by National Natural Science Foundation of China under Grants 61573195 and U1613210. 1 Jian Wen, Xuebo Zhang, Haiming Gao, Jing Yuan and Yongchun Fang are with the Institute of Robotics and Automatic Information System (IRAIS), Tianjin Key Laboratory of Intelligent Robotics (TJKLIR), Nankai University, Tianjin, P. R. China, 300350 (Email: zhangxuebo@nankai.edu.cn; wenjian@mail.nankai.edu.cn).
Compared with the grid map, the line segment map is more compact, consuming less memory and scaling better with the environmental size. Furthermore, the line segment map does not split the environment into grids and thus it does not suffer from discretization problems [26]. The simplest way to build a line segment map is to transform all original line segments into the world coordinate system and pile them up. However, because of errors in localization or perception, those line segments which physically represent the same part of the environment are not perfectly overlapped between successive laser scans in both local and global maps. This situation is called redundancy and inconsistency of map information, which makes it difficult to fulfill subsequent tasks such as localization and planning. Therefore, it is necessary to merge redundant line segments in the original line segment map to obtain a redundancy-free and globally consistent map. Existing redundant line segment approaches can be classified into two categories: offline approaches [5], [12], [13] and online approaches [9], [18]. Offline approaches collect all laser scans and register them in advance so that they are globally consistent. Then a variety of clustering algorithms are adopted to classify these line segments extracted from the registered laser scans and merge them. The redundancy of line segment maps obtained by offline approaches is usually low, but the post-processing mechanism makes them essentially impossible to apply to the real-time systems, such as a featurebased graph SLAM system. In contrast, online approaches receive laser scans in real time and correct robot poses by scan matching. Then line segments extracted from the current scan are updated to the global map by incremental merging. This incremental processing mechanism can ensure the realtime performance, but it is difficult to handle the problem of global map adjustment after loop closing [11]. In summary, the primary challenge in design of a redundant line segment merging approach is to simultaneously ensure high efficiency and global consistency.
Furthermore, how to evaluate the quality of line segment maps is a key issue. The fairest way is to compare the obtained maps with the actual environmental metric information. However, manual measurement of the environmental metric information usually requires a lot of labor and it is almost impractical in some cases. Therefore, most of past researches only judge if the obtained line segment maps are redundant or not by visual inspection [9], [10], [12], [13], [24], [25]. Some researchers suggest using the reduction rate of the number of line segments after merging to evaluate the performance of redundant line segment merging approaches [4], [5]. However, it is not that the lower the rate, the better the map. The low reduction rate may also mean the serious loss of map information, since some physically different line segments are merged together by mistake. Besides, the reduction rate can not directly reflect the redundancy of line segment maps, because even the low reduction date can not ensure that there are no redundant line segments in the map. Therefore, how to objectively and fairly evaluate the quality of line segment maps is yet to be studied further. Motivated by these challenges, a consistent and efficient redundant line segment merging approach called CAE-RLSM is newly proposed. The proposed CAE-RLSM is composed of two newly proposed modules: one-to-many incremental line segment merging (OTM-ILSM) and multi-processing global map adjustment (MP-GMA). The final line segment map is regarded as a global set and each line segment in the final map is regarded as a subset. Each subset contains all original line segments that make up the final line segment corresponding to this subset. The correspondence between the original line segments and their corresponding final line segment is recorded during incremental merging, and all original line segments are retained after merging. These original line segments are extracted from raw laser scans by a seeded region growing-based line segment extraction algorithm [17] and associated with their corresponding robot poses. After loop closing, all original line segments are updated to the world coordinate system according to the optimized poses. Finally, all original line segments in each subset are re-merged into a new line segment to update the final map. This step reuses the previous recorded correspondence between the original and final line segments instead of executing incremental merging from scratch, which significantly improves efficiency while guaranteeing global consistency. The relationship between the above components can be seen in Figure 1. It should be noted that CAE-RLSM is independent of loop closure detection and pose optimization. Therefore, it can be embedded as a standalone module in standard graph-based SLAM systems.
Furthermore, a new correlation-based evaluation metric is proposed to evaluate the quality of line segment maps. Globally consistent laser scans obtained by SLAM systems are regarded as the ground truth, which are collected and rasterized using a Gaussian kernel to construct a lookup table. Each line segment in the final map is discretized into pixels using Bresenham's line algorithm. And then these pixels are projected to match the corresponding value in the lookup table. The quality of the final map is computed by adding up the scores of all line segment pixels. To the best of our knowledge, we are the first to propose such correlation-based evaluation metric for quality evaluation of line segment maps.
The main contributions of this paper can be summarized as follows: (1) A novel redundant line segment merging approach called CAE-RLSM is proposed for online feature map building, which consists of two new modules OTM-ILSM and MP-GMA. Different from existing online and offline approaches, CAE-RLSM not only reduces the redundancy of incremental merging, but also solves the problem of global map adjustment after loop closing. In other words, CAE-RLSM ensures both high efficiency and global consistency to obtain a compact line segment-based map.
(2) A new evaluation metric based on correlation is proposed for quality evaluation of line segment maps. This evaluation metric does not require manual measurement of the environmental metric information, but makes full use of globally consistent laser scans obtained by SLAM systems to objectively and fairly compare the performance of different line segment-based mapping approaches.
We begin this paper with a brief review of related work in Section II. The proposed CAE-RLSM is detailed in Section III. Section IV describes the correlation-based evaluation metric and Section V presents the comparative experimental results and analysis. Finally, this paper is concluded in Section VI.

II. RELATED WORK
Map building has received much research attention in recent years due to its value in many applications, such as localization [6], [21] or pose estimation [7], [15]. In [16], Kim et al. propose a noble method of building continuous occupancy maps and reconstructing surfaces in a single framework for both navigation and visualization. Because of the compact representation and low memory, line segment feature has been widely used in mobile robots localization, mapping and navigation [22], [23], [24], [25], [27]. In order to obtain a compact and efficient map representation based on line segments, it is necessary to merge redundant line segments which physically represent the same part of the environment such as a long wall. In [12], Amigoni et al. propose a greedy offline approach for redundant line segment merging. In this work [12], they first consider the longest line segment in the whole map and then define a strip centered this longest line segment with width 2ε. Other line segments whose endpoints fall within the strip are merged together with this longest line segment. In [5], Sarkar et al. propose an offline redundant line segment merging approach based on mean shift clustering algorithm (MS-RLSM). In this work [5], all original line segments are first clustered into angular clusters according to their direction; then, line segments belonging to the same angular cluster are further clustered into spatial clusters based on their spatial proximity; finally, the line segments belonging to the same spatial cluster are merged together. Although above offline approaches can significantly reduce the redundancy of final maps, they have poor running time performance, which makes it difficult to apply to real-time mapping systems.
In [18], Kuo et al. propose the naive one-to-one incremental line segment merging approach (OTO-ILSM), which is applied in a Rao-Blackwellized Particle Filters (RBPF) based SLAM system. In this work [18], for each line segment extracted from the current scan, a complete search through the global map is performed. Once the closest match is found, they regard the two line segments belonging to the same part of the environment and merge them together. However, OTO-ILSM has limitations in both redundancy reduction and global consistency. Firstly, when there is more than one line segment in the global map matched with the current scan line segment, only one of them will be merged, resulting that other redundant line segments are still left in the global map. In particular, when a robot wraps around a large circle and returns to the starting position, using OTO-ILSM can not merge the line segments extracted at the beginning and ending position in a single loop together with the current scan line segment, since the current scan line segment will be only merged with one of them. Secondly, it is essentially impossible for this incremental processing mechanism to adjust global line segment map according to the optimized poses after loop closing, since robot poses are only associated with original line segments extracted from raw laser scans while line segments in the global map are not associated with robot poses. The simplest way to address this problem is to execute incremental merging from scratch after loop closing. However, this in turn reduces the efficiency of incremental merging.
In order to obtain redundancy-free and globally consistent line segment maps in real-time, in this paper a novel redundant line segment merging approach called CAE-RLSM is proposed. To reduce the redundancy of incremental merging, an one-to-many incremental line segment merging module (OTM-ILSM) is design. The correspondence between the original line segments extracted from raw laser scans and the final line segments in the global map is recorded during incremental merging, and all original line segments are retained after merging. This correspondence is reused for global map adjustment after loop closing instead of executing incremental merging from scratch, which significantly improves efficiency while guaranteeing global consistency.
Furthermore, it is necessary to evaluate the quality of line segment maps to compare the performance of different line segment-based mapping approaches. Since the ground truth is not always available, some researchers turn to define several evaluation metrics to quantitatively evaluate line segment maps [4], [5], [20]. In map or the low reduction rate may also mean the serious loss of map information, since some physically different line segments are merged together by mistake. Therefore, it is not objective and fair to evaluate the quality of line segment maps only by the number of line segments in the final map.
In this work, we borrow the idea of correlative scan matching algorithm (CSM) [19] and propose a new correlation-based evaluation metric for quality evaluation of line segment maps. Globally consistent laser scans obtained by SLAM systems are regarded as the ground truth and rasterized using a Gaussian kernel to construct a lookup table. This lookup table can be regarded as the environmental model. Each line segments in the final map is discretized into pixels using Bresenham's line algorithm. Finally, these pixels are projected and matched with the corresponding value in the lookup table to evaluate the quality of obtained maps.

III. CAE-RLSM
This section introduces the framework and detailed procedures of CAE-RLSM, as shown in Figure 2.
A line segment l is represented by its two endpoints (x i , y i ) , i = 1, 2. The heading of the line segment is defined as the direction vector of the start point to the end point and is normalized into the range of (−π, π]. l G and l L represent the line segment expressed in the global and local coordinate system, respectively. S t = {l 1 , l 2 , ..., l n } denotes the set of line segments extracted from t-th laser scan. S G t and S L t represent the set of line segments expressed in the global and local coordinate system, respectively. Global line segment maps obtained after t − 1-th and t-th merging processing are denoted by M t−1 and M t , respectively.

A. Fusion conditions and fusion algorithm
According to [11], a general framework of redundant line segment merging approaches is usually structured with fusion conditions and a fusion algorithm. Fusion conditions are used to detect several line segments which physically represent the same part of the environment, and these line segments are merged into a new line segment through the fusion algorithm. Furthermore, each line segment in the final map is usually assigned with a weight according to its length or the number of times it is updated. In this paper the latter is used.
In [5], the concept of spatial proximity based on lateral separation and longitudinal overlap is proposed. This spatial proximity is suitable for offline approaches because the weight of all original line segments extracted from raw laser scans is equal. But for online approaches, the weight of line segments from M t−1 should be larger than the weight of line segments from S t since those line segments from M t−1 have been updated many times. Therefore, it is not appropriate to treat such line segments as equal in this situation. In this paper, the following three measurements are considered to determine whether two line segments l M and l S , one from M t−1 and the other from S t , are spatially close or not: (a) Heading deviation, θ: the difference between the headings of l G S and l M .
where θ M and θ SG denote the headings of l M and l G S , respectively. and (x e 2 , y e 2 ) are the endpoints of the overlap between l M and the projection of l G S to l M , and θ max , d max and p min are three adaptive threshold parameters. Since the angles are not Euclidean, the function normAngle () is used to re-normalize them after every subtraction. The diagram of above three measurements is shown in Figure 3.
After obtaining the set of line segments l G i , i ∈ [1, N ], which physically represent the same part of the environment, the following equations are used to merge these line segments into a new line segment l * : where (x c , y c ) denotes the barycenter of l G , and the barycenter of l * is represented by (x c ,ȳ c ). w is the weight of the line segment, which corresponds to the number of times the line segment is updated. The projections of the endpoints of l G to l * are denoted by x e1 , y e1 and x e2 , y e2 , and the two farthest projections form the new endpoints of l * , which are represented by (x 1 ,ȳ 1 ) and (x 2 ,ȳ 2 ). B. Data structure CAE-RLSM is based on a tree-like data structure, as shown in Figure 1. The root node contains the final line segment map, and each of its child nodes contains a final line segment marked with a unique ID. Furthermore, the children of each child node contain the original line segments that make up the corresponding line segment in the final map after merging. These original line segments are extracted from raw laser scans and marked with the indices of corresponding robot poses. And these original line segments are also regarded as leaf nodes in the tree-like data structure. During the incremental merging, the child nodes of the root node may be pruned, but these leaf nodes will be retained to record the information of all original line segments. Based on this tree-like data structure, the correspondence between the original line segments and the corresponding line segment in the final map is recorded, and each original line segment is also associated with its corresponding robot pose, facilitating global line segment map adjustment after loop closing.
C. One-to-many incremental line segment merging Incremental line segment merging updates the global line segment map through merging S t with M t−1 . As mentioned in Section II, OTO-ILSM has limitations in both redundancy reduction and global consistency. Therefore, we propose the OTM-ILSM (Algorithm 1).
In Algorithm 1, for each current scan line segment in S t , a complete search through M t−1 is performed (Algorithm 1: lines 1 − 4). Line segments in M t−1 which satisfy the fusion conditions are regarded as the associated line segments of the current scan line segment and moved from M t−1 to a temporary set (Algorithm 1: lines 5 − 10). And then these associated line segments are merged together with the current scan line segment to generate a new line segment using the fusion algorithm (Algorithm 1: lines 12). The new line segment is inserted into M t−1 with the minimum ID of these associated line segments (Algorithm 1: lines 19). Finally, those current scan line segments in S t which are not associated with line segments in M t−1 are directly inserted into M t−1 to update M t−1 to M t (Algorithm 1: lines 23 − 24).
On the other hand, in order to record the correspondence between the original line segments and the corresponding line segment in the final map, the tree-like data structure detailed in Algorithm 1 One-to-many incremental line segment merging Input: C t−1 , M t−1 , S G t , S L t and lastIndex Output: C t and M t 1: for l j ∈ M t−1 do 5: if l G i and l j satisfy the fusion conditions then 6: add l j into A. 7: add the ID of l j into B. insert L into M t−1 with ID m. 20: erase l G i from S G t . 21: create a new subset in C t−1 with ID lastIndex. 26: add l L i into the new subset. 27: lastIndex ← lastIndex + 1. 28: end for 29: M t = M t−1 30: C t = C t−1 the previous subsection is used. The root node is represented by C and its child nodes are denoted by {c k } , k = 1, 2, ..., n. During the complete search through M t−1 , whenever a current scan line segment merged together with its associated line segments, the child nodes corresponding to these associated line segments are removed from C, and their leaf nodes are linked to the child node whose ID is the minimum ID of these associated line segments (Algorithm 1: lines 11 − 18). for l j ∈ c i do 4: update l j according to the optimized pose. 5: add l j into A. merge all line segments in A together into L. 8: replace l i with L. 9: end for line segments are retained after incremental merging, and the correspondence between the original line segments and the corresponding line segment in the final map is recorded. This correspondence is reused for global map adjustment after loop closing instead of executing incremental merging from scratch, which significantly improves efficiency.

D. Multi-processing global map adjustment
After loop closing, the line segments in the global map need to be adjusted accordingly (Algorithm 2). Since all original line segments are marked with the indices of corresponding robot poses, they can be easily re-transformed into the world coordinate system according to the optimized poses (Algorithm 2: lines 3 − 6). Furthermore, each line segment in the global map is updated by re-merging its corresponding original line segments, which reuses the previous recorded correspondence (Algorithm 2: lines 7 − 8). Since the update process for line segments in the global map is independent of each other, we use multi-threaded parallel processing mechanism to speed up map updates. Finally, the current scan line segments are merged with the adjusted global map using OTM-ILSM.

IV. METRICS
In this section, we detail the newly proposed correlationbased metric for quality evaluation of line segment maps. Furthermore, a simplified error metric based on the quality metric proposed in [4] is introduced. In summary, we will use the above two metrics to evaluate line segment maps in a comprehensive way.

1) Lookup table:
In order to quantitatively evaluate line segment maps, in this paper we borrow the idea of correlative scan matching [19] and propose a correlation-based evaluation metric. Firstly, scan matching and loop closing are used to correct robot poses. The output pose trajectory is regarded as quasi ground truth. Secondly, all laser scan points are transformed to the world coordinate system according to the corresponding robot poses and then scaled to the grid coordinate system. Finally, a probabilistic grid map named lookup table is constructed by using a Gaussian kernel with every laser scan point. The value of each cell in the lookup table represents the probability of observing obstacles at that position. The example of the lookup table can be visualized as an image, as shown in Figure 4. 2) Correlation-based metric: Since the lookup table can be considered as a discrete function, we need to discretize each line segment in the final map to pixels and then project these pixels and find the corresponding scores in the lookup table. These final line segments are first scaled to the grid coordinate system and then discretized to pixels by Bresenham's line algorithm. Furthermore, in order to consider the situation where there are redundant line segments in the final map, each line segment pixel is accompanied with direction information obtained by converting continuous version of heading of line segments into discrete. Once there are multiple pixels with the same position and direction information, which means that there are redundant line segments in the corresponding part of the final map, the proposed metric will punish the map quality accordingly. Finally, the quality metric of the final map is calculated as follow: where p denotes the discrete line segment pixel, N is the total number of line segment pixels and n is the number of redundant line segment pixels. w is the penalty factor, and function L () is the lookup table which takes a pixel and returns a probability of observing obstacles at that position. The physical meaning of the proposed correlation-based evaluation metric can be summarized as follows. Firstly, the globally consistent laser scans are regarded as ground truth to describe the environment. The matching degree between the line segments in the final map and these laser scans is regarded as the degree of conformity between the obtained map and the real environment. Secondly, in order to describe the environment more objectively and realistically, each laser scan point is smeared with a Gaussian kernel to take into account the sensor noise. The final lookup table can be regarded as the environment model, which is used as the reference model for evaluation. Thirdly, line segments in the final map are discretized to directed pixels and projected to match the reference model, which implicitly considers the situation where redundant line segments exist in the final map.
It should be emphasized that both redundant line segment merging and lookup table construction require the precise robot poses. In order to make the comparison between different redundant line segment merging approaches more fair, in this paper we use a unified 2D laser SLAM system with unified system parameters to get the precise robot poses. Therefore, the objectivity and fairness of the proposed evaluation metric are not affected by the factor of pose correction.
3) Error metric: In addition to the proposed evaluation metric, we also use a simplified error metric based on the quality metric proposed in [4]. Since each line segment in the final map has its corresponding original line segments before merging, we calculate the average distance of the barycenters of these original line segments to their corresponding final line segment to define the error metric: where

V. EXPERIMENT
In this section, the experimental setup and results of the comparative experiments with respect to MS-RLSM [5] and OTO-ILSM [18] are detailed. We first introduce the public data sets and self-recorded data set used in the experiments. And then the comparative experimental results and qualitative and quantitative analysis are presented to show the superior performance of CAE-RLSM in terms of efficiency and map quality in different scenarios.

A. Data sets
In the comparative experiments, the following three public data sets obtained from RADISH [14] and one data set recorded in our lab are considered: (c) seattle: this data set is relative to University of Washington in Seattle, Washington. The data set is collected by using a mobile robot equipped with a SICK LMS 200 laser range finder with 0.5 • angular resolution. The area of the environment is approximately 52m × 13m and the number of scans acquired by the robot is 241. (d) floor 4: this data set is collected in a long hallway with a perfect loop in our laboratory by using a mobile robot equipped with a SICK LMS 100 laser range finder. The area of the environment is approximately 75m × 55m and the number of scans acquired by the robot is 20384.
The original laser scans in dataset (c) have been already preregistered, so the tests on this data set do not require pose correction, which demonstrates that CAE-RLSM is independent of loop closure detection and pose optimization. There are many algorithms designed for extracting line segments from discrete and ordered laser scan points [8]. In this paper, we broadly follow the open-source line segment extraction algorithm 1 [17], which borrows the idea of seed region growing in the field of image processing. This algorithm has been verified by experiments to achieve better performance than Iterative End Point Fit algorithm [8] in terms of efficiency, correctness and precision. For dataset (a), (b) and (c), the minimum length of the line segment extraction algorithm is set to 600.0 millimeters. For the dataset (d), the minimum length is set to 1000.0 millimeters since the environment is a long hallway. Furthermore, we use the open-source 2D laser SLAM system Karto-SLAM 2 to complete the task of pose correction for both redundant line segment merging and lookup table construction. Whenever the robot moves more that 0.2 meters or rotates more than 10 degrees, the new incoming laser scan is processed. It should be emphasized again that using the same line segment extraction algorithm and pose correction approach makes the comparison between different redundant line segment merging approaches more objective and fair.
In TABLE I we enumerate a few quantitative statistics of the above four data sets. Column 2 indicates the numbers of scans which have been processed for line segment extraction. The average translation and rotation between two consecutive laser scans are indicated in column 3 and column 4, respectively. Column 5 indicates the number of original line segments extracted from raw laser scans, and the next three columns indicate the minimum length, maximum length and average length of these original line segments, respectively.

B. Experimental setup
Both MS-RLSM, OTO-ILSM and CAE-RLSM are programmed in C/C++ and have been run on a laptop with an Intel core i5-3230M processor and 4 GB memory. In the following comparative experiments, we do not use the default parameters of MS-RLSM in its original paper, i.e. the lateral separation is set to 400 millimeters and the longitudinal overlap is set to -100 millimeters, since the performance with these default parameters is very poor. We set the optimized parameters for MS-RLSM, OTO-ILSM and CAE-RLSM as follows through extensive experimental tests to achieve the best performance for all of them.  optimized parameters in dataset (c) are used to demonstrate the rationality of the proposed evaluation metric, as shown in Figure 5. TABLE II enumerates a few attributes of these line segment maps. In this example, if we use the number or the length of line segments in the final map to evaluate the quality of line segment maps [4], [5], we will get the conclusion that the quality of the map produced by MS-RLSM with default parameters is better than using optimized parameters. But intuitively, the map produced using optimized parameters is closer to the real environment. The reason for the wrong conclusion is that the rationality of the evaluation metrics based on the number or the length of line segments in the final map are based on the premise that the redundant line segments are correctly merged. Once physically different line segments are merged together by mistake, using these metrics will lead to wrong evaluation conclusions. On the contrary, the proposed correlation-based evaluation metric essentially evaluates the conformity of the line segment map to the real environment, as shown in Figure 5 and TABLE II. Therefore, evaluation results based on the proposed metric are consistent with the visual inspection, which demonstrates the effectiveness of the proposed metric.
2) Validation of the proposed approach: Final line segment maps produced by CAE-RLSM in four data sets are shown in Figure 6, 7 and 9. To the best of our knowledge, it is the first time to clearly provide the information of line segments and their endpoints in such an intuitive way. TABLE III enumerates a few attributes of these line segment maps. Column 7 indicates the quality of line segment maps based on the correlation-based metric, and column 8 indicates the map quality based on the error metric. It can be seen that the quality of the maps produced by CAE-RLSM is all above 94%. In particular, the quality is above 97% for dataset (d). On the other hand, the errors i.e. the average deviations of original line segments to final maps introduced by CAE-RLSM are all below 10 millimeters, which demonstrates that CAE-RLSM can achieve good performance in terms of map quality.
3) Quantitative and qualitative comparison on map quality: shown that the final map produced by CAE-RLSM is closer to the real environment.
(b) OTO-ILSM vs. CAE-RLSM: It should be noted that OTO-ILSM can be run in an online manner frame by frame. However, in this case, this approach is not able to adjust the merged line segments in the stage of loop closing, and thus the online OTO-ILSM presents poor performance, as shown in Figure 9(b), especially at the beginning and ending parts of a moving loop. Different from OTO-ILSM, the proposed CAE-RLSM records all the line segments in different frames and maintains a subset for each physically same line segment, and thus the global map adjustment can be conducted by adjusting all the elements in the same subset according to the optimized pose graph following by a re-merging process. Therefore, it is seen that the proposed CAE-RLSM presents superior performance than online OTO-ILSM.
To overcome this issue of online OTO-ILSM, we design an offline version of OTO-ILSM for global map adjustment after loop closing, called O 2 TO-ILSM. Firstly, Karto-SLAM is used to obtain the globally consistent laser scans, and the original line segments extracted from raw laser scans are orderly recorded according to the order of laser scans. These line segments are represented in the world coordinate system according to the optimized poses. Secondly, the original line segments are processed by O 2 TO-ILSM according to the order of laser scans. Based on the above scheme, O 2 TO-ILSM and CAE-RLSM can be compared fairly after loop closing.

VI. CONCLUSION
This paper has proposed a consistent and efficient redundant line segment merging approach called CAE-RLSM for online feature map building, which is composed of one-to-many incremental line segment merging (OTM-ILSM) and multiprocessing global map adjustment (MP-GMA). The proposed CAE-RLSM not only reduces the redundancy of incremental merging, but also solves the problem of global map adjustment after loop closing, simultaneously ensuring efficiency and global consistency. Furthermore, a new correlation-based evaluation metric is proposed for quality evaluation of line segment maps. Comparative experimental results demonstrate that CAE-RLSM can achieve superior performance in terms of efficiency and map quality in different scenarios.