Positioning and mapping method and system based on laser radar and inertial measurement fusion in complex scenes
Through joint calibration of lidar and cameras and multi-modal fusion technology, combined with inertial and infrared sensors, the difficulty of pose estimation and map construction with a single sensor in complex environments is solved, and high-precision and robust positioning and mapping are achieved. Adapt to complex environmental changes.
Patent Information
- Application Number
- CN202410985923.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In complex environments, a single sensor such as a camera or lidar cannot effectively perform pose estimation and map construction, especially in poor lighting, weak texture areas or structurally degraded scenes, resulting in performance degradation or failure, and artificially created maps have poor timeliness. , unable to adapt to environmental changes.
Using lidar and camera joint calibration, combined with inertial measurement and infrared sensors, through multi-modal fusion odometry and adaptive filtering technology, a local static environment map with multi-layer information fusion is constructed to achieve rapid modeling of three-dimensional scenes, and through visual and Loopback detection and correction of laser information ensures the robustness and accuracy of positioning and mapping.
It improves the accuracy and robustness of pose estimation in different environments, enhances the applicable scope and stability of unmanned systems, meets complex and diverse sensing needs, and controls the positioning error within 5% to ensure consistency between local positioning and the global map. sex.
Smart Images

Figure CN118521653B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of perception, positioning and mapping, and specifically relates to a positioning and mapping method and system for fusing laser radar and inertial measurement in complex scenes. Background Art
[0002] For scenes under complex environmental conditions, the robot's operating conditions are very complex and may face different weather and environmental conditions. Due to various factors such as tides, sunshine, and weather, the robot needs to have the ability to perceive various complex situations. In view of phenomena such as tides, the landing environment often changes, and the manually established map cannot respond to this change. It can only rely entirely on experience or other means to make judgments, which does not have much use value for the robot.
[0003] In the current inertial navigation-assisted SLAM system, IMU and other sensors that perceive the external environment are integrated to provide high-frequency and relatively accurate pose estimation. IMU can provide high-frequency measurements, and its measurements are not affected by external environments such as lighting, texture, and weather, but there are time-varying deviations in its measurements. If IMU data is used, its measurement deviation needs to be estimated and removed from the original measurement. The camera can perceive rich texture information in the environment, but the visual odometer that relies on the monocular camera cannot obtain the real scale. It needs to be combined with IMU measurement or another camera to perform real-scale positioning and mapping. However, the positioning and mapping methods that rely on images often degrade or even fail in weak texture areas (such as white walls) or when the lighting conditions are poor (such as too dark or the lighting changes rapidly) due to the inability to successfully track visual features. Although the use of IMU to assist can increase a certain degree of robustness, the failure of visual feature tracking for a long time is undoubtedly a catastrophic blow. LiDAR is good at measuring distances to capture structural information in the environment, and its measurements are almost unaffected by lighting. However, the point cloud measurement of LiDAR is not as dense as that of images and has low discrimination. The widely used mechanical rotating LiDAR will cause the movement of the sensor during the sampling process, resulting in the distortion of the laser point cloud due to the movement of the sensor. In scenes with structural degradation, such as open grasslands, narrow tunnels and corridors, effective and discriminative structural information cannot be extracted from the laser point cloud, and thus it is impossible to provide sufficient constraints for the estimated state. LiDAR-based positioning and mapping methods often suffer from performance degradation in these degraded scenes due to the inability to obtain sufficient constraints.
[0004] To sum up, considering that manually building environmental maps takes a long time, has poor accuracy and timeliness, and the use of a single sensor (such as a camera or lidar) is prone to data loss, poor accuracy, and limited applicable scenarios, it is necessary to reasonably integrate multi-sensor measurements, taking into account the advantages of different sensors in different scenarios, expanding the scope of application and stability of unmanned systems, and meeting the complex and diverse perception needs in different environments. Summary of the invention
[0005] The purpose of the present invention is to provide a positioning and mapping method and system for the fusion of lidar and inertial measurement in complex scenarios, to overcome the defects of a certain single sensor to improve the applicability in different scenarios, the accuracy of pose estimation and the robustness to various challenges, and to meet the complex and diverse perception needs in different environments.
[0006] The technical solution to achieve the purpose of the present invention is: a positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, including:
[0007] Step 1: Joint calibration of LiDAR and camera: extract and match the line features in the LiDAR point cloud and camera image to obtain the corresponding relationship, build an optimization objective function based on the feature matching algorithm that integrates the plane features, iterate and update until the external parameters converge, and jointly calibrate the LiDAR sensor and camera.
[0008] Step 2, based on joint calibration, the lidar inertial, visual inertial and infrared inertial are coupled to obtain a multimodal fusion odometer; the odometer utilizes the complementarity between multiple sensors, the absolute depth measurement of the laser sensor, the high-frequency output of the camera, the adaptability of the infrared sensor to extreme environments, the initial prediction of the IMU and the real-time accurate correction function of the GPS signal to ensure that the obtained fusion odometer can adapt to the application of unmanned intelligent robot systems in complex and changeable environments; at the same time, it can also ensure that when one odometer fails, the other odometer can continue to complete the work; the odometer can provide the robot with its own posture estimation, and the multimodal information fusion odometer estimation can improve the robot's posture estimation accuracy and robustness in different environments.
[0009] Step 3, taking a certain sensor as the core, based on the fusion data of the multimodal fusion odometer, use multi-frame optimization and adaptive filtering to build a local static environment model map with multi-layer information fusion; according to actual needs, taking a certain sensor as the core, fuse other sensor data, and use the sensor posture to overlay and generate a map; use adaptive filtering and nonlinear weighted upsampling to retain fine details and reduce post-fusion noise, so as to construct different forms and multi-level maps, which can provide terrain detection and reconstruction under cross-domain conditions. The reconstruction technology of the terrain three-dimensional model can realize the rapid modeling capability of three-dimensional scenes.
[0010] Step 4: Loop detection and correction based on vision and laser information. Based on the odometer system, further research is conducted on loop detection and correction algorithms based on images and laser information to maintain globally consistent trajectories and maps. Since images have rich texture and semantic information, and lasers have three-dimensional information of real scale, the fusion of the two can achieve better loop detection results.
[0011] Furthermore, extracting line features from the lidar point cloud and the camera image in step 1 includes extracting line features from the lidar point cloud and extracting line features from the image based on the Canny algorithm.
[0012] Furthermore, extracting line features from the lidar point cloud specifically includes:
[0013] The lidar point cloud is divided into several voxels of a given size. For each voxel, RANSAC is used to extract the planes in it, and the plane pairs that are connected to each other and whose angles are within the range [30°, 150°] are retained;
[0014] Extract multiple lines that are perpendicular or parallel to each other in the plane voxel. When a new cycle of lidar scanning arrives, perform feature extraction on the multiple lines. Extract edge and plane features by evaluating the curvature of points in the local area. Points with curvature greater than the set value are classified as edge features, otherwise they are classified as plane features. The scanned point cloud at time t and all extracted features are represented by a lidar point cloud frame.
[0015] Furthermore, step 1 uses frame-local graph matching to obtain the corresponding relationship, which specifically includes:
[0016] Keyframe selection is performed on the lidar point cloud frame. When the robot posture change exceeds the user-defined threshold compared with the previous state Xi, the lidar frame F is selected as the keyframe, and each keyframe is associated with the new robot state node in the factor graph; the lidar frames between the keyframes are discarded;
[0017] By building a voxel map of the lidar sub-keyframe, the lidar edge features and plane features are matched through a scan matching algorithm, and the pose transformation between two adjacent frames is solved by minimizing the matching distance.
[0018] Using the iterative external parameter results, the coordinates of several sampling points and line feature direction vectors in each line feature extracted from the lidar point cloud are transformed into the camera coordinate system. Based on the pinhole model assumption, the camera intrinsic parameters and distortion coefficients are combined to project each point and direction vector onto the image plane. The K neighboring points of each projection point are searched in the KD tree composed of the line feature pixels of the image, and the candidate straight lines are formed by these K points. The direction vector of the candidate straight line is tested for orthogonality with the direction vector of the line feature in the point cloud projected onto the image plane to eliminate incorrect matches and complete the final match.
[0019] Furthermore, in step 1, the feature matching algorithm based on the fusion plane features constructs the optimization objective function, which specifically includes:
[0020] Using the current iteration external parameter result, based on the feature matching algorithm of fusion plane features, through the matching relationship between the line features in the point cloud and the line features in the image, the optimization objective function is constructed as follows:
[0021]
[0022] in, is the rotation between the laser coordinate system and the camera coordinate system, is the translation from the laser coordinate system to the camera coordinate system, is the three-dimensional normal vector of the plane, is the distance from the origin of the camera coordinate system to the plane, is the plane feature fusion coefficient, and a laser point in the laser coordinate system is , N is the number of groups of collected data, Indicates that the i-th frame (i-th group of collected data) has A laser spot falls on the board.
[0023] Furthermore, the step 2 specifically includes:
[0024] Step 2.1, abstract mathematical model factor graph, abstract the measurement values of lidar sensor, camera, infrared sensor, IMU and GPS into factors, which connect the sensor posture state and the landmark state;
[0025] Step 2.2, optimize the sensor posture state according to the factor graph. In the factor graph, IMU is used as the core output posture, and the lidar sensor, camera, and infrared sensor continuously provide constraints for the IMU odometer to optimize the IMU output posture.
[0026] Furthermore, the step 3 specifically includes:
[0027] Step 3.1, using a multi-frame optimization algorithm to optimize the sliding window-based plane feature matching error function;
[0028] Step 3.2, optimize the map accuracy based on the point cloud adaptive filtering mapping method, specifically including:
[0029] Perform the first opening operation on the original data, with a structure window length of l1. Non-ground points with a size larger than l1 are retained, non-ground points with a size smaller than l1 are filtered out, and ground points with a size smaller than l1 are clipped and replaced by ground points within the l1 window.
[0030] The second opening operation is performed, and the length of the structural window is increased to l2. When the building size is smaller than the structural window l2, the building is filtered out or replaced by the lowest point in the structural window;
[0031] The above operations are performed on the radar point cloud. The window size is selected in a linearly increasing manner, with a maximum window size of 2Mb+1, where M is the maximum number of iterations and b is the initial window.
[0032] Furthermore, the step 3.1 specifically includes:
[0033] Set a sliding window to receive point clouds and corresponding pose data; extract multiple plane areas from the multi-frame point clouds in the window, set the thickness of the plane area as the residual e, and use the pose of each frame of point cloud as the optimization variable. Gaussian random variable with variance n~N(0, ), the plane feature matching error objective function based on sliding window is constructed as:
[0034]
[0035] Among them, w is the world coordinate system, b is the body coordinate system, is the i-th camera coordinate system, is a fixed transformation from body coordinate system to camera coordinate system c, is the fixed transformation from the world coordinate system w to the i-th camera coordinate system, is the homogeneous coordinate of the nth wheel in the body coordinate system, is the normalized local ground truth sequence of the jth homogeneous form.
[0036] Furthermore, the step 4 specifically includes:
[0037] Step 4.1, use ORB features and BRIEF descriptors to build a bag-of-words model and visual dictionary;
[0038] Step 4.2: Based on the bag-of-words model and visual dictionary, loop closure detection of visible light images is performed to obtain point cloud key frames; similarity is calculated through the bag-of-words vector of the image, and the point cloud key frames are screened after the similarity is normalized;
[0039] Step 4.3: Based on the loop detection results, a closed-loop correction algorithm is used to correct the global trajectory and map. During the correction, a two-step matching strategy is used for search, including:
[0040] The first step is global search. When a new point cloud keyframe arrives, an N-dimensional feature vector is extracted from it. Then, in the N-dimensional feature space composed of the N-dimensional feature vectors of all keyframes, the Kd tree is used to search for the nearest K keyframes and calculate the Hamming distance between feature images. If the Hamming distance is less than the set threshold and passes the geometric verification, the cloud keyframe is added to the factor graph as a loop factor for optimization.
[0041] The second step is local search. After successfully finding a loop and optimizing it, the next step is to search for the frame closest to the new key frame within the set range of the new key frame. If it passes the geometric verification, it is added to the factor graph as a loop factor for optimization. After no loop is found in the nearby frames, the first step is re-executed to perform a global search.
[0042] A system for realizing a positioning and mapping method of laser radar and inertial measurement fusion in the complex scene, comprising a laser radar sensor and camera joint calibration unit, a multi-modal fusion odometer construction unit, a local static environment model map construction unit and a loop detection and correction unit; wherein:
[0043] The laser radar sensor and camera joint calibration unit is used to extract line features in the laser radar point cloud and the camera image, and match them to obtain corresponding relationships, build an optimization objective function based on a feature matching algorithm that integrates plane features, and iterate until convergence;
[0044] The multimodal fusion odometer construction unit couples the laser radar sensor, the camera, the infrared sensor, the IMU and the GPS to construct a multimodal fusion odometer;
[0045] The local static environment model map construction unit takes a certain sensor as the core, and based on the fusion data of the multi-modal fusion odometer, uses multi-frame optimization and adaptive filtering to construct a local static environment model map with multi-layer information fusion;
[0046] The loop detection and correction unit performs loop detection and correction on the map constructed in step 3 based on the measurement information of the camera and the lidar sensor.
[0047] Compared with the prior art, the present invention has the following significant advantages:
[0048] 1) The positioning and mapping technology of this solution can achieve a positioning error of no more than 5% (unit: meter) when a certain sensor data is missing through technologies such as multimodal sensor spatiotemporal calibration, multimodal fusion mileage estimation, and local static environment map construction technology, so that the system meets the requirements of local positioning robustness and accuracy, local map accuracy and global map accuracy. Figure 1 It meets the requirements of consistency and accuracy, and has higher reliability and stronger robustness;
[0049] 2) The multimodal sensor perception system established by the present invention can take into account the advantages of different sensors in different scenarios, expand the scope of application and stability of unmanned systems, and meet the complex and diverse perception needs in different environments;
[0050] 3) The frame matching of the present invention innovatively adopts the frame-local map matching method. Compared with the frame-global map matching in LOAM optimization, the frame-local map matching is more conducive to loop detection, and the efficiency of map use will not decrease over time. For the frame matching method, the frame-local map matching can apply the global map to perform loop detection and correct drift, and can also solve the problem that the efficiency of voxel map use will decrease over time.
[0051] 4) For pose estimation, the optimization method adopted by the present invention is two-step LM optimization. Compared with the common LM optimization method, the two-step LM optimization consumes less computing resources and time, and can also obtain more accurate pose estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Research logic diagrams for multimodal sensor perception, localization and mapping technologies;
[0053] Figure 2 This is the architecture diagram of the multimodal sensor perception system;
[0054] Figure 3 Calibrate the flow chart for LiDAR and camera;
[0055] Figure 4 This is a schematic diagram of the pose estimation using factor graphs;
[0056] Figure 5 Constructing a local static environment map based on multi-layer information fusion;
[0057] Figure 6 Build a flow chart for point cloud maps;
[0058] Figure 7 This is the flow chart of the digital morphology filtering algorithm;
[0059] Figure 8 Schematic diagram of loop correction. DETAILED DESCRIPTION
[0060] In order to better illustrate the purpose and advantages of the present invention, the implementation method of the present invention is further described in detail below with reference to examples.
[0061] based on Figure 1 In order to meet the needs of the market, the present invention adopts spatiotemporal calibration, factor graph-based fusion process estimation and local static environment map construction technology to propose a positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, which specifically includes:
[0062] Step 1: LiDAR and camera calibration, combined Figure 3 , specifically including.
[0063] Step 1.1, extracting line features from the LiDAR point cloud, including:
[0064] First, the point cloud is divided into several voxels of a given size (outdoor: 1m, indoor: 0.5m). For each voxel, the RANSAC technique is used to extract the plane. Subsequently, the plane pairs that are connected to each other and whose angles are within the range [30°, 150°] are retained; finally, multiple lines that are perpendicular or parallel to each other in the plane pair voxels are extracted. Feature extraction can use scan matching algorithms such as ICP to find the position between two frames, or a matching method based on the feature level. This project innovatively combines the above two methods for lidar factor design. When a new week of lidar scans arrives, feature extraction is performed first. Edge and plane features can be extracted by evaluating the curvature of points on the local area, where points with larger curvature are classified as edge features and points with smaller curvature are classified as plane features. The scanned point cloud at time t and all extracted features are represented by a lidar point cloud frame.
[0065] Step 1.2, extracting line features in the image based on the Canny algorithm, including:
[0066] The Canny algorithm is used for extraction, and the extracted pixels are stored using the KD tree data structure to facilitate the search for corresponding matches between the point cloud and the image.
[0067] Step 1.3: Match the two line features based on the frame-local image to obtain the corresponding relationship, including:
[0068] Compared with the frame-global map matching in LOAM optimization, the frame matching method adopted in this system is frame-local map matching. Keyframe selection is performed on the lidar point cloud frame. The keyframe is selected in such a way that when the robot posture change exceeds the user-defined threshold compared with the previous state Xi, the lidar frame F is selected as the keyframe, and each saved keyframe is associated with the new robot state node in the factor graph. The lidar frames between the keyframes are discarded. Adding keyframes in this way can not only balance the mapping density and memory consumption, but also keep the factor graph sparse, which is suitable for real-time nonlinear optimization and mileage estimation. By establishing a voxel map of the lidar sub-keyframe, the scan matching algorithm matches the lidar edge features and plane features, and minimizes the matching distance to solve the pose transformation of two adjacent frames.
[0069] Using the iterative external parameter results, the coordinates of several sampling points and line feature direction vectors extracted from each line feature in the point cloud are transformed into the camera coordinate system, and then based on the pinhole model assumption, the camera internal parameters and distortion coefficients are combined to project each point and direction vector onto the image plane. The K neighboring points of each projection point are searched in the KD tree composed of the line feature pixels of the image, and the candidate lines are formed by these K points. The direction vector of the candidate line is checked for orthogonality with the direction vector of the line feature in the point cloud projected onto the image plane, and the wrong matches are eliminated to complete the final match, such as Figure 3 shown.
[0070] Step 1.4 Construct an optimization objective function based on the feature matching algorithm of the fused plane features, and iterate and update until the external parameters converge, including:
[0071] Using the current iteration external parameter result, based on the feature matching algorithm of fusion plane features, the optimization objective function (Formula 1) is constructed through the matching relationship between the line features in the point cloud and the line features in the image, and the plane feature fusion coefficient is introduced , correct the consistency of plane features, by collecting N sets of data, the i-th frame has N i The actual operation process takes the rigidly connected solid-state laser radar and camera equipment as an example. The equipment is used to collect data from the scene for 10 seconds. After obtaining the dense point cloud map and the corresponding image data, the external parameter calibration between the radar and the camera can be completed according to the above steps.
[0072] (1)
[0073] in, is the rotation between the laser coordinate system and the camera coordinate system, is the translation from the laser coordinate system to the camera coordinate system, is the three-dimensional normal vector of the plane, d is the distance from the origin of the camera coordinate system to the plane, is the plane feature fusion coefficient, and the coordinates of a 3D point on the plane in the camera coordinate system are , a laser point in the laser coordinate system is .
[0074] Step 2, Combine Figure 2 , couple the lidar sensor, camera, infrared sensor, IMU and GPS to build a multi-modal fusion odometry.
[0075] Step 2.1, abstract mathematical model factor graph, specifically including:
[0076] The multimodal fusion odometer is designed to be based on the inertial odometer, integrating the lidar inertial odometer, visual inertial odometer and infrared inertial odometer. In this way, the perception module can still have the ability to locate when a certain sensor fails. The multimodal fusion odometer needs to receive sensor data from lidar, vision, infrared, IMU and GPS, and fuse multi-sensor observations to estimate the state and trajectory of the unmanned system. The state estimation problem can be expressed as a maximum a posteriori problem, that is, the observations of the sensor, such as image feature points, laser point clouds, and IMU measurements, can be abstracted into factors, which can connect the sensor posture state and the landmark state to provide constraints. The process of solving the posture is to optimize the factor graph and adjust each state in the factor graph to make it better meet the factor constraints.
[0077] Step 2.2, such as Figure 4 , according to the factor graph model optimization state, specifically including:
[0078] In the factor graph, the IMU odometer is used as the core to output high-frequency poses and provide short-term, high-precision predictions for other odometers; the LiDAR inertial odometer, visual inertial odometer, and infrared inertial odometer continuously provide constraints for the IMU odometer to correct its long-term drift. The specific optimization factor graph can be optimized using Gauss-Newton iterative optimization, and the state marginalization technology can be used to ensure real-time performance, thereby obtaining real-time and optimal mileage estimation results.
[0079] Step 3, such as Figure 5, based on the construction of local static environment maps of multi-layer information fusion, with laser radar as the core, a point cloud map of the environment can be constructed. The traditional point cloud mapping method, with laser radar as the core, estimates the pose of each frame of laser point cloud based on the odometer, transforms the point cloud data into the world coordinate system, directly superimposes it, and then performs grid filtering. However, the traditional method brings two difficulties: (1) The odometer estimation error will accumulate, resulting in the thickening, distortion, and stratification of the point cloud of the constructed map. (2) The grid filtering parameters are difficult to grasp. If the grid is large, the map details are missing, and if the grid is small, the number of point clouds is too large. In order to improve the accuracy and detail quality of point cloud maps, it is proposed to study the use of a mapping method based on multi-frame optimization and adaptive filtering.
[0080] Step 3.1, use the multi-frame optimization algorithm to optimize the sliding window-based plane feature matching error function, combined with Figure 6 , including:
[0081] Set a sliding window to receive point clouds and corresponding pose data; extract multiple plane regions from the multi-frame point clouds in the window; set the thickness of the plane region as the residual e, take the pose of each frame of point clouds as the optimization variable, and construct the plane feature matching error objective function based on the sliding window. is the plane normalization of the jth LGM (Local Ground Manifold). When the pose satisfies the equation When , the plane feature matching error objective function based on sliding window is shown in Equation 2. However, considering the uncertainty of plane normal and pose, the equation may not be satisfied in real time. Therefore, a function with Gaussian random variable with variance n~N(0, ) This uncertainty is modeled, and the plane feature matching error objective function is shown in Equation 3, which ensures the optimization consistency of the key frame pose. Finally, the plane feature matching error function based on the sliding window is minimized using linearization methods such as Gauss-Newton to make the plane area composed of multi-frame point clouds thinner.
[0082] (2)
[0083] (3)
[0084] Among them, c is the camera coordinate system, w is the world coordinate system, and b is the body coordinate system. is the i-th camera coordinate system, is a fixed transformation from body coordinate system to camera coordinate system, is the fixed transformation from the world coordinate system to the i-th camera coordinate system, is the homogeneous coordinate of the nth wheel in the body coordinate system, is the normalized local ground truth sequence of the jth homogeneous form.
[0085] Step 3.2, optimize the map accuracy based on the point cloud adaptive filtering mapping method, specifically including:
[0086] Point cloud adaptive filtering is different from common image filtering algorithms. Image data is regular two-dimensional data. Image filtering is mainly used to eliminate noise mixed in the image and monitor significant edge features in the image. However, point cloud data has a three-dimensional structure. Point cloud filtering algorithms mainly distinguish between ground points and non-ground points in point cloud data. Digital morphological filtering algorithms are used to generate ground points, such as Figure 7 As shown in the figure, firstly, the original data is opened, and the length of the structural window is l1. Non-ground points with a size larger than l1, such as buildings, will be retained, and non-ground points with a size smaller than l1 will be filtered out. Ground points with a size smaller than l1 will be cut, and the size will be replaced by ground points within the l1 window. Next, the second opening operation is performed. The length of the structural window is increased to l2. When the building size is smaller than the structural window l2, the building will be filtered out or replaced by the lowest point in the structural window. The above operation is performed directly on the radar point cloud. Even on flat ground, the filtered surface is still lower than the original measurement value. And most of the measurement points are filtered out, and only the filtered surface is available, so the elevation difference threshold is used to solve this problem. Buildings have a certain size and height. The height of the building is abrupt while the terrain height changes gradually. The difference between the changes of buildings and terrain can be used to help the filter distinguish between the two. The size of the structural window when setting the filter parameters has a great influence on the filtering effect. The window size selection generally adopts a linear increase scheme. The maximum window size is 2Mb+1. The structural window setting ensures the symmetry of the structural window, which can simplify programming. The linear increase of the window ensures that the terrain features can be well preserved.
[0087] Step 4: Loop detection and correction based on vision and laser information.
[0088] Step 4.1: Build a bag-of-words model and a visual dictionary, including:
[0089] This solution uses ORB features and BRIEF descriptors to build a bag-of-words model and a visual dictionary. The visual dictionary contains many visual words. Unlike a single feature point, a visual word represents a combination of features of a certain type. Therefore, the process of building a dictionary can be approximated as a clustering problem. To build a visual dictionary, the images in the keyframe management library are first extracted and described, and then a dictionary tree is generated using the k-means clustering method. Based on the large number of extracted descriptors, k-means clustering is performed, and the feature points are divided into k categories, and then the k-means clustering operation is continued in each category until the algorithm converges or reaches a given iteration threshold. After the algorithm converges, each class is a visual word, representing the result of clustering a group of feature points. After multiple clustering operations, a complete dictionary tree can be generated, whose leaf nodes are different visual words.
[0090] The processed keyframe image can be converted into a set of several words using the dictionary tree. First, extract the ORB feature and generate the BRIEF descriptor on the current processed keyframe image, and query the position of each feature point in the dictionary tree. After the query is completed, each feature point can be described by a word in the dictionary tree. The histogram statistics of the words corresponding to all feature points in the frame are performed, and the statistical result is a vector describing the situation of the keyframe infrared image containing words. The word vector is the established bag of words model. The above query and indexing method is "equal" for all words, and there is no significant difference in indexing between words. However, different visual words have different distinguishability. For example, the visual word located on the white wall will appear in multiple frames of images, while visual words such as mugs and computer cases provide more information and play a greater role in discriminating images. This section uses the term frequency-inverse document frequency (TF-IDF) method to calculate the weight of each word to represent the distinguishability. The term frequency (TF) part indicates the frequency of a word in an image. The inverse document frequency (IDF) part indicates the frequency of a word in the dictionary, that is, the ratio of the number of features in a word to the number of all features. The lower the frequency of a word in the dictionary, the higher its inverse document frequency and the higher the discrimination of the word. According to the weight of the word, the reverse index can be effectively performed to improve the accuracy of loop detection.
[0091] Step 4.2, visible light image loop closure detection, specifically includes:
[0092] Based on the visual dictionary and bag-of-words model, the positioning algorithm can describe and store different locations, so as to detect whether the system passes through the same location during operation. The image key frames obtained at the same location have a high similarity, and the image similarity can be calculated by the bag-of-words vector of the image. Given the bag-of-words vector of image key frame A and the bag-of-words vector of image key frame B, calculate the similarity s between the two frames. The larger the similarity score, the more similar the two images are. Extract feature points and descriptors from the key frame image collected at the current moment to obtain the bag-of-words vector of the frame. Using the weights of different words in the dictionary tree, a series of candidate key frames with the same words as the current key frame are found in the key frame management library using the reverse index method. Then, the similarity between different candidate frames and the current key frame can be calculated. However, the calculated similarity score depends on the current image, and it is difficult to use a unified threshold for the absolute similarity score to filter the optimal loop candidate frame. This problem needs to be solved by normalization, that is, the similarity score is normalized before comparison. The normalized similarity score can effectively filter the loop candidate frame. There may be multiple loop candidate frames in the current image frame. In order to prevent key frames with similar time from being selected as candidate frames, a time check is required to eliminate candidate frames with similar timing to the current frame.
[0093] Step 4.3, correct the global trajectory and map based on the closed-loop correction algorithm, specifically including:
[0094] This system uses factor graph optimization to build a global consistency map. At this time, the state quantity x to be optimized only considers the position and posture of the mobile robot's key frame. The lidar odometer factor is obtained by matching all the feature point clouds of the key frame with the local map, and the loop factor is obtained using the visual word bag model and point cloud loop detection method introduced earlier. After the loop is detected, loop constraints need to be constructed to correct the global trajectory and map.
[0095] For loop detection of laser point clouds, this scheme adopts a two-step matching strategy to reduce the search space. The first step is global search, using the N-dimensional vector of the global descriptor of the laser radar, so that each key frame not only corresponds to the feature image of the laser radar, but also includes an N-dimensional feature vector. When a new point cloud key frame arrives, its N-dimensional feature vector is extracted, and then the Kd tree is used to search for the nearest K key frames in the N-dimensional feature space composed of the N-dimensional feature vectors of all key frames. The Hamming distance between their feature images is calculated. If it is less than a certain threshold and passes the subsequent geometric verification, it is considered that a true positive loop has been found and added to the factor graph as a loop factor for optimization, such as Figure 8The second step is local search. After successfully finding a loop and optimizing it, we only need to search for the nearest frame within a certain range near the new key frame. The loop that passes geometric verification is a true positive and is added to the factor graph as a loop factor for optimization. When no loop can be found in the nearby frames, we re-execute the first step to perform global search.
[0096] The present invention uses a multimodal sensor perception system to utilize the advantages of different sensors and overcome the defects of a single sensor to improve the applicability of positioning and mapping methods in different scenarios, the accuracy of pose estimation, and the robustness in dealing with various challenges. It is necessary and advantageous in situations where the external environment is complex and changeable, such as lighting, texture, and weather.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not intended to limit the present invention. A person skilled in the art should understand that the specific implementation of the present invention can be modified or replaced by equivalents, but these modifications or changes are within the scope of protection of the claims of the application.
Claims
1. A positioning and mapping method based on the fusion of LiDAR and inertial measurement in complex scenes. It is characterized in that Includes steps: Step 1: Joint calibration of the LiDAR sensor and camera: extract line features from the LiDAR point cloud and camera image, match them to obtain the corresponding relationship, build an optimization objective function based on the feature matching algorithm that integrates the plane features, and iterate until convergence; Step 2: Based on joint calibration, the lidar sensor, camera, infrared sensor, IMU and GPS are coupled to build a multi-modal fusion odometer; Step 3: Taking a certain sensor as the core, based on the fusion data of the multi-modal fusion odometer, multi-frame optimization and adaptive filtering are used to construct a local static environment model map with multi-layer information fusion; Step 4: Perform loop detection and correction on the map constructed in step 3 based on the measurement information of the camera and lidar sensor; Step 1 uses frame-local graph matching to obtain the corresponding relationship, which specifically includes: Keyframe selection is performed on the lidar point cloud frame. When the robot posture change exceeds the set threshold compared with the previous state Xi, the lidar point cloud frame F is selected as the keyframe, and each keyframe is associated with the new robot state node in the factor graph; the lidar point cloud frames between the keyframes are discarded; By building a voxel map of the lidar sub-keyframe, the lidar edge features and plane features are matched through a scan matching algorithm, and the pose transformation between two adjacent frames is solved by minimizing the matching distance. Using the iterative external parameter results, the coordinates of several sampling points and line feature direction vectors in each line feature extracted from the lidar point cloud are transformed into the camera coordinate system. Based on the pinhole model assumption, the camera intrinsic parameters and distortion coefficients are combined to project each point and direction vector onto the image plane. The KD tree composed of the line feature pixels of the image is searched for K neighboring points of each projection point, and these K points form a candidate line. The direction vector of the candidate line is tested for orthogonality with the direction vector of the line feature in the point cloud projected onto the image plane, and false matches are eliminated to complete the final match. In step 1, the optimization objective function is constructed based on the feature matching algorithm of the fused plane features, specifically including: Using the current iteration external parameter result, based on the feature matching algorithm of fusion plane features, through the matching relationship between the line features in the point cloud and the line features in the image, the optimization objective function is constructed as follows: ; in, is the rotation between the laser coordinate system and the camera coordinate system, is the translation from the laser coordinate system to the camera coordinate system, is the three-dimensional normal vector of the plane, is the distance from the origin of the camera coordinate system to the plane, is the plane feature fusion coefficient, is the laser point in the laser coordinate system, N is the number of groups of collected data, Indicates that the i-th group of collected data has A laser spot falls on the board; The step 3 specifically includes: Step 3.1, using a multi-frame optimization algorithm to optimize the sliding window-based plane feature matching error function; Step 3.2, optimize the map accuracy based on the point cloud adaptive filtering mapping method, specifically including: Perform the first opening operation on the original data, with a structure window length of l1. Non-ground points with a size larger than l1 are retained, non-ground points with a size smaller than l1 are filtered out, and ground points with a size smaller than l1 are clipped and replaced by ground points within the l1 window. The second opening operation is performed, and the length of the structural window is increased to l2. When the building size is smaller than the structural window l2, the building is filtered out or replaced by the lowest point in the structural window; The above operations are performed on the radar point cloud. The window size is selected in a linearly increasing manner, with a maximum window size of 2Mb+1, where M is the maximum number of iterations and b is the initial window. The step 3.1 specifically includes: Set a sliding window to receive point clouds and corresponding pose data; extract multiple plane areas from the multi-frame point clouds in the window, set the thickness of the plane area as the residual e, and use the pose of each frame of point cloud as the optimization variable. Gaussian random variable with variance n~N(0, ), the plane feature matching error objective function based on sliding window is constructed as: ; in, w is the world coordinate system, b is the body coordinate system, is the i-th camera coordinate system, is a fixed transformation from body coordinate system to camera coordinate system c, is the fixed transformation from the world coordinate system w to the i-th camera coordinate system, is the homogeneous coordinate of the nth wheel in the body coordinate system, is the normalized local ground truth sequence of the jth homogeneous form.
2. According to claim 1, a positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, It is characterized in that Extracting line features from the lidar point cloud and the camera image in step 1 includes extracting line features from the lidar point cloud and extracting line features from the image based on the Canny algorithm.
3. According to claim 2, a positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, It is characterized in that Extracting line features from LiDAR point clouds specifically includes: The lidar point cloud is divided into several voxels of a given size. For each voxel, RANSAC is used to extract the planes in it, and the plane pairs that are connected to each other and whose angles are within the range [30°, 150°] are retained; Extract multiple lines that are perpendicular or parallel to each other in the plane voxel. When a new cycle of lidar scanning arrives, perform feature extraction on the multiple lines. Extract edge and plane features by evaluating the curvature of points in the local area. Points with curvature greater than the set value are classified as edge features, otherwise they are classified as plane features. The scanned point cloud at time t and all extracted features are represented by a lidar point cloud frame.
4. According to claim 1, a positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, It is characterized in that The step 2 specifically includes: Step 2.1, abstract mathematical model factor graph, abstract the measurement values of lidar sensor, camera, infrared sensor, IMU and GPS into factors, which connect the sensor posture state and the landmark state; Step 2.2, optimize the sensor posture state according to the factor graph. In the factor graph, IMU is used as the core output posture, and the lidar sensor, camera, and infrared sensor continuously provide constraints for the IMU odometer to optimize the IMU output posture.
5. According to claim 1, the positioning and mapping method for laser radar and inertial measurement fusion in complex scenes, It is characterized in that The step 4 specifically includes: Step 4.1, use ORB features and BRIEF descriptors to build a bag-of-words model and visual dictionary; Step 4.2: Based on the bag-of-words model and visual dictionary, loop closure detection of visible light images is performed to obtain point cloud key frames; similarity is calculated through the bag-of-words vector of the image, and the point cloud key frames are screened after the similarity is normalized; Step 4.3: Based on the loop detection results, a closed-loop correction algorithm is used to correct the global trajectory and map. During the correction, a two-step matching strategy is used for search, including: The first step is global search. When a new point cloud keyframe arrives, an N-dimensional feature vector is extracted from it. Then, in the N-dimensional feature space composed of the N-dimensional feature vectors of all keyframes, the Kd tree is used to search for the nearest K keyframes and calculate the Hamming distance between feature images. If the Hamming distance is less than the set threshold and passes the geometric verification, the cloud keyframe is added to the factor graph as a loop factor for optimization. The second step is local search. After successfully finding a loop and optimizing it, the next step is to search for the frame closest to the new key frame within the set range of the new key frame. If it passes the geometric verification, it is added to the factor graph as a loop factor for optimization. After no loop is found in the nearby frames, the first step is re-executed to perform a global search.
6. A system for implementing the positioning and mapping method of laser radar and inertial measurement fusion in complex scenes as described in any one of claims 1 to 5, It is characterized in that It includes a laser radar sensor and camera joint calibration unit, a multi-modal fusion odometer construction unit, a local static environment model map construction unit, and a loop detection and correction unit; among which: The laser radar sensor and camera joint calibration unit is used to extract line features in the laser radar point cloud and the camera image, and match them to obtain corresponding relationships, build an optimization objective function based on a feature matching algorithm that integrates plane features, and iterate until convergence; The multimodal fusion odometer construction unit couples the laser radar sensor, the camera, the infrared sensor, the IMU and the GPS to construct a multimodal fusion odometer; The local static environment model map construction unit takes a certain sensor as the core, and based on the fusion data of the multi-modal fusion odometer, uses multi-frame optimization and adaptive filtering to construct a local static environment model map with multi-layer information fusion; The loop detection and correction unit performs loop detection and correction on the map constructed in step 3 based on the measurement information of the camera and the lidar sensor.
Citation Information
Patent Citations
Positioning and mapping method and system based on multi-sensor fusion
CN114608561A
Slam-based mobile robot mine scene reconstruction method and system
WO2022257801A1
