Multi-sensor fusion robot synchronous positioning method and system
Through multi-sensor fusion technology and the combination of cameras and lidar, the problems of point cloud distortion and motion distortion in the 3D laser SLAM system are solved, and the accuracy and speed of positioning and map construction are improved.
Patent Information
- Application Number
- CN202410677669.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-05-29
AI Technical Summary
The existing 3D laser SLAM system is prone to point cloud distortion and motion distortion during lidar movement, which affects the accuracy of positioning and map construction.
Using a multi-sensor fusion method, the camera and lidar are combined to obtain lidar point cloud data and visual images, extract feature points and match feature points between frames, estimate the camera pose and correct the motion distortion of the lidar point cloud data, and combine The bag of visual words performs loop detection and optimizes the global map.
It improves the accuracy of lidar point cloud data and the speed of loop detection during the mapping process, and enhances the reliability of robot synchronization positioning and map construction.
Smart Images

Figure CN118258379B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and in particular to a multi-sensor fusion robot synchronous positioning method and system. Background Art
[0002] Simultaneous Localization and Mapping (SLAM) refers to the technology of self-localization and building environmental maps while a robot explores an unknown environment. The SLAM system with multi-line laser radar as the main sensor is called 3D laser SLAM. Multi-line laser radar can work normally without relying on external lighting and other conditions. It can measure farther and provide richer information. The sensor continuously scans the external environment by emitting high-frequency laser beams while rotating multiple laser emitting components rapidly. It returns the three-dimensional coordinate information of the measurement point relative to the laser radar coordinate system, allowing the machine to see the surrounding environment information, providing strong information guarantee for positioning, navigation, and obstacle avoidance. It is an external sensor that is particularly suitable for simultaneous positioning and mapping in outdoor scenes.
[0003] However, the current 3D laser SLAM has the following defects: as the laser radar continues to move, the point cloud may experience point cloud distortion and motion distortion. Summary of the invention
[0004] Purpose of the invention: The present invention aims to address the defects of current 3D laser SLAM and propose a multi-sensor fusion robot synchronous positioning method and system.
[0005] Invention content: To achieve the above objectives, the present invention proposes the following technical solutions:
[0006] In a first aspect, a multi-sensor fusion robot synchronous positioning method is provided, wherein the sensor includes a camera and a laser radar, and the method includes the steps of:
[0007] Obtain the laser radar point cloud data and visual images collected by the robot during movement;
[0008] Extracting feature points from the visual image and matching feature points between frames to estimate the motion of the camera and obtain the position information of the camera;
[0009] Correcting the motion distortion of the laser radar point cloud data by using the camera's position information;
[0010] Associating and registering the image feature points with the corrected laser radar point cloud data, so that the corrected laser radar point cloud data carries the view information;
[0011] Estimating the robot's posture based on the laser radar point cloud data carrying the view information to obtain the robot's posture information;
[0012] A global map is constructed according to the posture information of the robot and the lidar point cloud data carrying the view information. In the process of constructing the global map, a loop detection method based on BOW visual word bag is used to detect loop paths to achieve global map optimization.
[0013] As an optional implementation manner of the method of the first aspect, the method further includes:
[0014] After acquiring the laser radar point cloud data and the visual image, preprocessing the laser radar point cloud data and the visual image respectively;
[0015] The preprocessing of the laser radar point cloud data specifically includes:
[0016] Jointly calibrating the camera and the laser radar to obtain a transformation matrix between the camera coordinate system and the laser radar coordinate system;
[0017] According to the transformation matrix, transform the laser radar point cloud data into the camera coordinate system;
[0018] In the camera coordinate system, the point cloud data located on the back of the camera is removed from the laser radar point cloud data;
[0019] Convert the remaining LiDAR point cloud data from 3D data to 2D data.
[0020] Furthermore, feature point extraction and inter-frame feature point matching are performed on the visual image to estimate the motion of the camera and obtain the position information of the camera, which specifically includes:
[0021] Performing a dedistortion operation on the visual image;
[0022] Extracting image feature points from the dedistorted visual image and determining descriptors of the image feature points;
[0023] Compute and store the bag of visual words for each frame of visual image;
[0024] For each frame of visual image, feature point matching is performed with the previous frame of visual image through the descriptor to obtain a set of matching feature points;
[0025] Traversing the set of matching feature points, restoring the 3D coordinates of each image feature point; the depth value of the 3D coordinate of the image feature point is determined by searching the laser radar point cloud data around the image feature point and performing linear interpolation;
[0026] Based on the 3D coordinates of each image feature point in the matching feature point set, the camera motion is estimated to obtain the position and posture information of the camera.
[0027] Furthermore, the motion distortion of the laser radar point cloud data is corrected by using the position information of the camera, specifically including:
[0028] Determining attitude angle change information of the camera according to the position and posture information of the camera;
[0029] Mapping the attitude angle change information of the camera to the coordinate system of the laser radar;
[0030] In the coordinate system of the laser radar, the posture information of the laser radar is transformed by spherical linear interpolation according to the posture angle change information of the camera.
[0031] As an optional implementation of the method of the first aspect, estimating the robot posture according to the laser radar point cloud data carrying the view information to obtain the posture information of the robot specifically includes:
[0032] Determining ground feature constraints, point cloud feature constraints, and visual feature constraints based on the laser radar point cloud data carrying view information;
[0033] Combining the ground feature constraint, the point cloud feature constraint and the visual feature constraint to construct an inter-frame pose transformation error equation;
[0034] Solving the inter-frame posture transformation error equation to obtain the posture information of the robot;
[0035] Among them, the expression of the inter-frame posture transformation error equation is:
[0036]
[0037] In the formula, represents the variable to be estimated, The rotation matrix representing the inter-frame pose transformation of the modified LiDAR point cloud data, represents the inter-frame translation vector of the corrected laser radar point cloud data, Expressed as the Huber robust kernel function, represents the ground feature constraint loss, represents the corner point constraint loss in the point cloud feature constraint, represents the plane point constraint loss in the point cloud feature constraint, represents the visual feature constraint loss.
[0038] Furthermore, constructing the global map specifically includes:
[0039] According to the current posture information of the robot, the laser radar point cloud data of the current frame is transformed into the coordinate system of the current key frame, and ICP point cloud fusion is performed to obtain a local map;
[0040] Constructing the global map according to the local map;
[0041] The key frame selection method is:
[0042] The moment when the robot synchronous positioning system is successfully initialized is taken as the first key frame. Then, for the next candidate frame of the first key frame, if the candidate frame meets any of the following conditions, the candidate frame is taken as the key frame:
[0043] Condition 1: The point cloud data inserted into the current keyframe reaches the set threshold;
[0044] Condition 2: The current key frame has a maximum time;
[0045] Condition 3: The robot moves the maximum distance in the current frame reference system.
[0046] As an optional implementation of the method of the first aspect, a loop detection method based on a BOW visual word bag is used to detect the loop path, specifically including:
[0047] Generating a descriptor for the visual features in the corrected laser radar point cloud data;
[0048] Clustering the descriptors, taking each type of descriptor as a visual word, to construct a dictionary;
[0049] Based on the dictionary, visual word matching is performed on the laser radar point cloud data of the current frame and the laser radar point cloud data of the historical frame, and based on the visual word matching result, it is determined whether the loop path exists.
[0050] Furthermore, the method further includes: constructing the dictionary through a K-ary tree structure.
[0051] In the second aspect, a multi-sensor fusion robot synchronous positioning system is provided, comprising:
[0052] LiDAR, used to obtain LiDAR point cloud data of the robot’s environment during movement;
[0053] A camera for acquiring visual images of the environment in which the robot is located during movement;
[0054] A visual odometer is used to extract feature points from the visual image and match feature points between frames to estimate the motion of the camera and obtain the pose information of the camera; correct the motion distortion of the laser radar point cloud data by the pose information of the camera; associate and register the image feature points with the corrected laser radar point cloud data so that the corrected laser radar point cloud data carries the view information; estimate the robot pose based on the laser radar point cloud data carrying the view information to obtain the robot pose information;
[0055] The radar odometry is used to construct a global map based on the robot's posture information and the lidar point cloud data carrying the view information. In the process of constructing the global map, a loop detection method based on the BOW visual word bag is used to detect the loop path to achieve global map optimization.
[0056] In a third aspect, a robot is provided, which realizes synchronous positioning through the above-mentioned multi-sensor fusion robot synchronous positioning method.
[0057] Beneficial effects: The present invention proposes a multi-sensor fusion robot synchronous positioning method, which estimates the camera's pose by matching feature points between frames of visual images, and corrects the motion distortion of the laser radar point cloud data by the camera pose to improve the accuracy of subsequent mapping. In the mapping process, the loop detection is accelerated by the visual word bag, which greatly improves the speed of loop detection.
[0058] The multi-sensor fusion robot synchronous positioning system and robot proposed in the present invention also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 The present invention is a flowchart of a multi-sensor fusion robot synchronization method involved in an embodiment.
[0061] Figure 2 The present invention is a schematic structural diagram of a multi-sensor fusion robot synchronous positioning system involved in an embodiment.
[0062] Figure 3 Schematic diagram of visual radar joint calibration principle involved in the embodiment, Figure 3 (a) shows the camera and laser radar
[0063] The coordinate system conversion stage is achieved. Figure 3 (b) is a schematic diagram of calibration error.
[0064] Figure 4 is a schematic diagram of a point cloud feature constraint model involved in an embodiment, Figure 4 (a) is the point-line distance model, Figure 4 (b) is the point-to-surface distance model.
[0065] Figure 5 This is a flow chart of the K-Means algorithm involved in the embodiment.
[0066] Figure 6 Schematic diagram of the visual dictionary structure and retrieval form involved in the embodiment.
[0067] Figure 7 The figure is a schematic diagram of the loop detection process involved in the embodiment.
[0068] Figure 8 The figure is a schematic diagram of the workflow of a robot involved in the embodiment. DETAILED DESCRIPTION
[0069] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0070] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0071] Those skilled in the art will appreciate that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0072] In some embodiments, a multi-sensor fusion robot synchronous positioning method (hereinafter referred to as the method) is proposed, such as Figure 1As shown, the multi-sensor in the method includes a camera and a laser radar, and the method includes the following steps:
[0073] S100: Obtain laser radar point cloud data and visual images collected by the robot during movement.
[0074] S102: extract feature points from the visual image and match feature points between frames to estimate the camera motion and obtain the camera's position information.
[0075] S104, correcting the motion distortion of the laser radar point cloud data using the camera's position information.
[0076] S106: Associating and registering the image feature points with the corrected LiDAR point cloud data, so that the corrected LiDAR point cloud data carries the view information.
[0077] S108: Estimating the robot's posture based on the laser radar point cloud data carrying the view information to obtain the robot's posture information.
[0078] S110, constructing a global map based on the robot's posture information and the laser radar point cloud data carrying the view information, and in the process of constructing the global map, using a loop detection method based on the BOW visual word bag to detect the loop path, so as to achieve global map optimization.
[0079] The above multi-sensor fusion robot synchronous positioning method estimates the camera's pose by matching feature points between frames of visual images, and corrects the motion distortion of the lidar point cloud data by the camera pose to improve the accuracy of subsequent mapping. During the mapping process, the visual word bag is used to accelerate loop detection, which greatly improves the speed of loop detection.
[0080] Accordingly, this embodiment also proposes a multi-sensor fusion robot synchronous positioning system (hereinafter referred to as the system), which is mainly composed of two parts: a visual odometer and a radar odometer. The visual odometer mainly estimates the inter-frame motion of the sensor through visual images and laser radar data, which is used to assist the subsequent radar odometer module in positioning and mapping. The visual odometer extracts and tracks feature points based on the input visual image, and then associates and registers the feature points with the laser radar point cloud data. The associated laser radar point cloud data carrying image information is used to estimate the inter-frame motion. At the same time, due to the point cloud distortion and motion distortion of the laser radar during movement, the radar information is counter-compensated by high-frequency image feature point tracking to obtain the dedistorted radar information and perform radar feature extraction. Therefore, the input of the visual odometer is the laser radar point cloud data and the visual image, and the output is the radar feature point cloud carrying image information after motion correction. The laser radar point cloud output by the visual odometer is transmitted to the radar odometer, and the radar odometer is used for positioning and mapping. In local mapping, we first need to extract radar features to obtain feature point clouds, build local maps and estimate poses, and then build a global map based on the local maps. During this process, we detect whether a loop condition occurs. If a loop occurs, the global map needs to be optimized.
[0081] Please refer to Figure 2 , Figure 2 This is a multi-sensor fusion robot synchronous positioning system schematically proposed in this embodiment. Figure 2 As shown, the system includes
[0082] LiDAR is used to obtain LiDAR point cloud data of the robot's environment during movement.
[0083] Camera, used to obtain visual images of the robot's environment while it moves.
[0084] The visual odometry is used to extract feature points from visual images and match feature points between frames to estimate the camera motion and obtain the camera's pose information; the motion distortion of the lidar point cloud data is corrected through the camera's pose information; the image feature points are associated and registered with the corrected lidar point cloud data; the robot pose is estimated based on the corrected lidar point cloud data to obtain the robot's pose information.
[0085] The radar odometry is used to build a global map based on the robot's posture information and the corrected lidar point cloud data. In the process of building the global map, a loop detection method based on the BOW visual word bag is used to detect the loop path to achieve global map optimization.
[0086] The following is only Figure 2The system shown in the figure is taken as an example to illustrate the robot synchronous positioning method of multi-sensor fusion proposed in this embodiment.
[0087] Since this method uses two sensors, camera and multi-line laser radar, the coordinate systems of these two sensors are not unified. Therefore, before performing robot synchronous positioning, visual radar joint calibration should be performed first to unify the coordinate systems of camera and laser radar.
[0088] In some specific implementations, a checkerboard-based calibration method can be used to implement joint calibration of the camera and the lidar. Figure 3 , Figure 3 The principle of joint calibration of camera and lidar based on chessboard calibration is shown. Figure 3 (a) shows the first step of the calibration process, which is to first calculate the pose transformation relationship between sensors.
[0089] In this embodiment, a calibration method based on feature points (generally the corner points of a chessboard) is used. This method is essentially a PNP problem, that is, solving the problem of 3D-2D point pair motion. In order to reduce external interference and ensure accuracy, a large number of feature points are collected to construct a nonlinear least squares problem. Suppose the feature point set in the laser radar space is , coordinates represent , the pixel coordinates of the corresponding image projection are , coordinates represent , the camera internal parameters are , the camera pose is .in, R LC is the rotation matrix of the camera in the radar coordinate system, t LC is the translation vector of the camera in the radar coordinate system. The relationship between the pixel coordinates and the spatial point coordinates is shown in formula (1.1), and the matrix form is shown in formula (1.2):
[0090]
[0091]
[0092] Figure 3 (b) shows the second step of the calibration process. Due to the unknown camera estimation and the influence of noise on the observation points, there is an error in this equation. The errors are summed and the least squares method is constructed, as shown in formula (1.3), to find the optimal pose. T LC .
[0093]
[0094] After completing the camera and lidar calibration, the camera and lidar are used to collect visual images and lidar point cloud data of the robot's environment during movement.
[0095] The visual image and lidar point cloud data are first sent to the visual odometry for processing. The visual odometry extracts and tracks feature points based on the incoming visual image, then associates and registers the feature points with the lidar point cloud data, and uses the associated lidar point cloud data carrying image information to estimate inter-frame motion. At the same time, since the lidar has point cloud distortion and motion distortion when in motion, the radar information is counter-compensated through high-frequency image feature point tracking to obtain de-distorted radar information and perform radar feature extraction. Therefore, the input of the visual odometry is the lidar point cloud data and visual image, and the output is the radar feature point cloud carrying image information after motion correction. The specific working process of the visual odometry is introduced below.
[0096] First, the visual odometry needs to preprocess the visual image and lidar point cloud data.
[0097] The specific steps of preprocessing lidar point cloud data are:
[0098] The transformation matrix between the LiDAR coordinate system and the camera coordinate system is obtained through the above joint calibration, and the LiDAR point cloud information is transformed to the camera coordinate system through the above transformation matrix. In the camera coordinate system, the LiDAR point cloud data behind the camera is eliminated. The remaining 3D coordinates of the LiDAR point cloud data are expressed as 2D coordinates, that is, [X / Z, Y / Z], where X, Y, and Z are the spatial coordinates of the LiDAR point cloud data in the camera coordinate system.
[0099] The specific steps of visual image preprocessing are:
[0100] Dedistort the visual image transmitted by the camera. Extract ORB feature points from the dedistorted visual image and calculate the BRIEF descriptor. Calculate the visual bag of words BoW for each frame of the visual image and save it to facilitate subsequent loop detection. Match the feature points with the previous frame of the visual image through the BRIEF descriptor, and the set of successful matches is Match. Traverse all Matches and restore the 3D coordinates of each visual feature point, where the depth value of the visual feature point is determined by searching the lidar point cloud data near the visual feature point and then determining it through linear interpolation.
[0101] After preprocessing the visual image and lidar point cloud data, the visual odometer uses the motion estimation value of the visual range to register and maintain the depth map. When the visual odometer receives the visual image, it first extracts feature points from the visual image. Let the coordinates of the feature points of the current frame image be is the normalized coordinate, and the coordinates of the feature points in the previous frame image are , R FF is the rotation matrix between the two frames, t FF is the translation vector, then the corresponding feature points of the two frames satisfy formula (1.4):
[0102]
[0103] Case 1: is unknown, since the motion between frames k-1 and k is not calculated at this stage, so the distance cannot be obtained from the depth map or triangulation. , use formula (1.5) and formula (1.6) to estimate the depth information of the visual image feature points :
[0104]
[0105]
[0106] in R FFi , t FFi , (i∈{1,2,3}) is R FF , t FF The i-th row of .
[0107] Case 2: and If both are unknown, then calculate using formula 1.7 R FF 、t FF 。
[0108]
[0109] According to the above steps, the features with known distance can obtain two equations, namely (1.5)-(1.6), while the features with unknown distance can obtain one equation, namely (1-7). When solving the motion, all equations are stacked up and the motion estimation problem is expressed as six unknowns representing 6-DOF motion. The problem is solved using the LM method. Motion estimation is applied to a robust fitting framework to handle feature tracking errors. Weights are assigned to each feature based on the residuals in (1.5)-(1.6) or (1-7). Features with larger residuals are assigned smaller weights, while features with residuals greater than a threshold are considered outliers with zero weights. The optimization ends if convergence is found or the maximum number of iterations is reached.
[0110] When maintaining the depth map of the LiDAR point cloud, first correct the motion distortion of the LiDAR point cloud according to the camera motion calculated above, as shown below:
[0111]
[0112] in, is the lidar rotation transformation from T0 to T1, is the radar to camera rotation matrix, It is the camera rotation transformation from time T0 to time T1, where T0 represents the timestamp of the previous frame and T1 represents the timestamp of the next frame.
[0113] Then, the image feature points are associated and registered with the lidar point cloud data, and the radar point cloud is given image information. In order to reduce the resource consumption of radar mapping, it is necessary to extract features from the calibrated radar point cloud.
[0114] Since the laser radar point cloud is unevenly distributed, the resolution of the point in a scan data is 0.25 degrees, and these points are distributed on a scan plane. However, the rotation speed of the axis of the fixed laser radar is 180 degrees per second. The frequency of the laser is 40Hz, so the resolution of the point on this axis is 4.5 degrees. The feature points can be selected from edge points and plane points. i The set S of several consecutive points around is used to find the curvature. Let radar point , the curvature is calculated by formula (1.8):
[0115]
[0116] in, They are respectively k Point cloud of scans P k Middle i Point and j points.
[0117] according to c value to sort the points in the scan and then select c The feature point with the largest value (i.e., edge point) and c The feature point with the smallest value (i.e., plane point). In order to evenly distribute the feature points in the environment, a scan is divided into four identical sub-areas. Each sub-area can extract up to 2 edge points and 4 plane points. i of c The point can be selected as an edge point or plane point only when the value is greater than or less than the threshold and the number of selected points does not exceed the maximum value.
[0118] Specifically, the radar point cloud registration process can be done by following the steps below:
[0119] Record the start index scanStartlnd(N_SCANS,0) and end index scanEndlnd(N_SCANS,0) of each scan point with curvature. Convert the point cloud in ROS format to laserCloudIn in PCL format, and remove the points that are too far and too close. Calculate the horizontal angles startOri and endOri of the start and end points, and calculate which line each point belongs to, that is, assign each point a scanID and calculate the horizontal angle ori. Through the above process, it is possible to record which line each point belongs to and how much time it takes to scan. These data are recorded in laserCloudScans[scanID].push_back(point), and are saved by line classification, with an array for each line. Save all lines in a data set laserCloud, and feed back the positions of the fifth and fifth to last points of each line in laserCloud to scanStartInd and scanEndInd. For example, scanEndInd[5] represents the end point of the fifth scan line at the scanEndInd[5]th position in laserCloud. Calculate the curvature according to the above calculation process. Divide the curvature points of each scan line into 6 equal parts to ensure that all points around are selected as feature points. Sort each 6 equal parts according to the curvature size, mark the 5 consecutive points before and after the point with larger curvature and no longer select them as feature points, put the two largest points into cornerPointsSharp, and put the first 20 points into cornerPointsLessSharp according to the curvature size. Select the points with very small curvature in each segment, put the 4 smallest points into surfPointsFlat, and put all the remaining points less than the threshold of 0.1 (including the points that were excluded before) into the surfPointsLessFlatScan category of plane points. Since there are the most less flat points, voxel filtering is performed on the points of each segment surfPointsLessFlatScan.
[0120] After the LiDAR feature points are extracted, they are associated with the visual image information so that the LiDAR feature points carry RGB information.
[0121] In the radar odometry, the point cloud features, ground features, and visual features obtained in the above process are used to construct the inter-frame pose transformation and construct the minimum error equation to calculate the optimal motion estimation.
[0122] First, determine the ground feature constraints. This embodiment uses a multi-line radar, and some ground points can be collected in each frame of the point cloud. Therefore, it is a continuous and stable feature. The ground feature basically has no large slope and can be approximately considered as a plane. The distance between the ground data point extracted from the point cloud of this frame and the ground model extracted from the point cloud of the previous frame is used as a constraint to construct the inter-frame pose transformation error equation. R and t They represent the rotation matrix and translation vector of the inter-frame pose transformation, P k Represents the ground points extracted from the point cloud of this frame, P k-1 Represents the ground plane model extracted from the previous frame, as shown in formula (1.9):
[0123]
[0124] In the point cloud feature extraction stage, corner feature points are extracted based on curvature. P corner and plane feature points P surf , and the data points are divided into corner points according to the curvature sorting P less_corner and plane points P less_surf 。 First, use the initial value of the pose transformation to transform the feature points of this frame P corner and P surf Transform to the previous frame coordinate system to get P’ corner and P’ surf As shown in formula (1.10) and formula (1.11):
[0125]
[0126]
[0127] When performing corner feature matching, the corner points of the previous frame point cloud are P less_corner Search distance P’ corner The two nearest points P less_corner1 and P less_corner2 The two corner points can be approximately fitted P corner The corresponding corner lines, corner feature points and corner lines constitute a set of matching features, and the distance from the point to the straight line is used as the error term of the inter-frame pose transformation equation to obtain formula (1.12). The point-line space model corresponding to this formula is as follows Figure 4 As shown in (a), the numerator of formula (1.12) corresponds to twice the area of the triangle in the figure, and the denominator is the base P less_corner1 P less_corner2 Length, get the distance from the point to the straight line d。
[0128]
[0129] When performing plane feature matching, the plane points of the previous frame point cloud are used P less_surf search P’ surf The three nearest points P less_surf1 , P less_surf2 and P less_surf3 The three plane points can be approximately fitted P less_surf The corresponding plane, plane feature points and plane constitute a set of matching features, and the distance from point to line is used as the error term of the inter-frame pose transformation equation to obtain formula (1.13). The point-plane space model corresponding to this formula is as follows Figure 4 As shown in (b), the fraction on the right side of the equation is equivalent to the normal vector of the plane. Projecting the edge normal vector gives the distance from the point to the plane: d .
[0130]
[0131] Visual features obtained R FF and t FF Calculated in the visual odometry loss camera The formula is as follows:
[0132]
[0133] Combining the above three feature constraints, the inter-frame pose transformation error equation is constructed, where the variable to be estimated is [ R | t ], as shown in formula (1.13):
[0134]
[0135] In the formula, represents the variable to be estimated, The rotation matrix representing the inter-frame pose transformation of the modified LiDAR point cloud data, represents the inter-frame translation vector of the corrected laser radar point cloud data, Expressed as the Huber robust kernel function, represents the ground feature constraint loss, represents the corner point constraint loss in the point cloud feature constraint, represents the plane point constraint loss in the point cloud feature constraint, represents the visual feature constraint loss.
[0136] After completing the construction of the error equation, the Gauss-Newton method is used to perform multiple rounds of iterative solutions to obtain the optimal motion matrix, that is, the robot's posture.
[0137] After obtaining the robot's position and posture, map construction and BOW relocation are performed. The moment when the system is successfully initialized is taken as the first key frame. If any of the following conditions is met, the next frame will be taken as the key frame:
[0138] (1) The point cloud data inserted into the current key frame reaches the set threshold;
[0139] (2) The maximum time that the current key frame exists;
[0140] (3) The maximum distance the robot moves in the current frame reference system.
[0141] When performing local mapping, according to the above optimal inter-frame transformation [ R | t ], transform the radar point cloud into the key frame coordinate system. Then perform ICP point cloud fusion and build a local map. When the local map is completed, it will be passed to the global map construction, and loops will be detected and the global map will be optimized.
[0142] During loop detection, sensor data is used to build the connection between the current frame and the historical frame, and the global posture is optimized to eliminate the accumulated error, so as to ensure the long-term stable operation of the SLAM system. Pure laser radar mapping uses ICP matching when detecting loops. This method consumes a lot of calculations when large maps are used. This embodiment adopts the visual word bag model commonly used in visual SLAM systems. The main idea of the visual word bag model is to generate corresponding descriptors based on the visual features in the image, cluster the descriptors, and treat a class of descriptors as a visual word. When the model performs loop detection, the pixel coordinates and matching relationship of the feature points in the image are not considered, but only the presence or absence of a certain visual word in the image is considered. The description vector of the image is constructed based on the presence or absence and the number of visual words. If the approximation degree of the description vectors corresponding to the two pictures exceeds a certain threshold, it can be considered that a loop is detected. This embodiment uses FAST corner points and describes the feature points using the BRIEF algorithm.
[0143] Before using the visual word bag model for loop detection, it is necessary to generate a dictionary first. Dictionary generation is an offline process and belongs to the clustering problem in the category of unsupervised learning. It can be implemented using the classic K-means clustering algorithm. The process is as follows: Figure 5 shown.
[0144] After using K-means to complete the descriptor clustering, if the number of categories (number of words) is small, it will lead to unclear distinction between different images, reducing the accuracy of loop detection. When performing loop detection, it is necessary to determine the corresponding word of the current visual feature descriptor, and it is necessary to compare the descriptor with each clustering result and classify it into the category with the smallest difference from the center point, so the retrieval operation complexity is O(n). Therefore, if the number of categories is large, the retrieval operation will take a long time. In order to speed up the retrieval process, a K-tree can be used to store data words and complete the construction of a visual dictionary. The K-tree dictionary tree makes the retrieval complexity of visual words when judging loops become O(logk n), and the efficiency is significantly improved.
[0145] When performing loop detection, the features and descriptors of the new input image are calculated, and the visual dictionary is used to search for the visual words to which the descriptor belongs. At the same time, two retrieval methods, sequential index and reverse index, are maintained in the database. The sequential index contains all the visual features in each frame of the image, and also contains the nodes to which the features belong in a specified layer of the K-ary tree. When matching two frames of visual words, the nodes to which they belong can be used to quickly filter out incorrect matches and speed up the matching process. The reverse index contains the image index where a word appears and the proportion of the word in the image. The reverse index can be used to quickly obtain image frames containing the same visual word, and then vote to select candidate images. The similarity score is then obtained by comparing the weight vectors to determine the candidate loop frames. Figure 6 Take the K-ary tree structure shown in the figure as an example. The left rear layer of the K-ary tree is the leaf node layer, and each leaf node represents a certain visual word. The sequential index is for each frame of the image. Each frame of the image has a sequential index table that records the node set hit in the K-ary tree and the feature points contained in the node. Figure 6 As shown on the right, the sequential index table 1 contains feature points with ids 1, 10, and 8, which are respectively divided into K-tree nodes 3 and 4. The sequential index is mainly used to speed up the feature point matching process between two frames of images. Obviously, the matching feature points corresponding to the two frames of images will fall into the same K-tree nodes. In this case, only the feature points in the same nodes of the two frames of images need to be matched. The reverse index records which images each split word appears in and how much it weighs. Figure 6 As shown on the right, the image IDs where word 1 appears are 1 and 2, and the proportions are V1=0.79 and V2=0.68 respectively.
[0146] In some embodiments, the following may be used: Figure 7 The following process is used to perform loop detection:
[0147] The candidate loop keyframes with the same words as the current frame are searched through the BoW inverted index, and the poor results are eliminated by the common word score (the candidate loop keyframe needs to have a high similarity score with the three consecutive keyframes);
[0148] Traverse each candidate key frame and calculate the Sim3 transformation;
[0149] If the calculation is successful, the current frame is transformed into the candidate key frame and the map points of the two frames are merged; if it fails, the program is exited.
[0150] Corresponding to the above method and system, this embodiment also provides a robot, which realizes synchronous positioning through the above multi-sensor fusion robot synchronous positioning method. The specific working process is as follows: Figure 8 As shown:
[0151] Step 1: Receive data sent by multi-line radar, IMU and camera;
[0152] Step 2: Initialize the system and load parameters, including external parameters of radar, IMU and camera, and internal parameters of camera;
[0153] Step 3 After receiving the radar point cloud, project it into the camera coordinate system and convert it into 2D coordinates;
[0154] Step 4: After receiving the image information sent by the camera, dedistort it, calculate the visual word bag and extract feature points to facilitate subsequent camera motion estimation and loop detection;
[0155] Step 5: Construct Ceres by matching visual feature points to solve camera motion and dedistort the radar point cloud;
[0156] Step 6: Radar point cloud registration, responsible for processing the lidar point cloud data, including data preprocessing, radar data modeling and radar feature removal.
[0157] Step 7: Construct the minimum residual and solve the robot's motion posture;
[0158] Step8 Convert the feature points from the lidar coordinate system to the world coordinate system and build a map;
[0159] Step9: Perform loop detection.
[0160] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A multi-sensor fusion robot synchronous positioning method, characterized in that: The sensor includes a camera and a laser radar, and the method includes the steps of: Obtain the laser radar point cloud data and visual images collected by the robot during movement; Extracting feature points from the visual image and matching feature points between frames to estimate the motion of the camera and obtain the position information of the camera; Correcting the motion distortion of the laser radar point cloud data by using the camera's posture information: determining the camera's attitude angle change information according to the camera's posture information; mapping the camera's attitude angle change information to the laser radar's coordinate system; and performing spherical linear interpolation transformation on the laser radar's attitude information in the laser radar's coordinate system according to the camera's attitude angle change information; The extracted image feature points are associated and registered with the corrected LiDAR point cloud data, so that the corrected LiDAR point cloud data carries the view information; Estimating the robot's posture based on the laser radar point cloud data carrying the view information to obtain the robot's posture information; A global map is constructed according to the posture information of the robot and the lidar point cloud data carrying the view information. In the process of constructing the global map, a loop detection method based on BOW visual word bag is used to detect loop paths to achieve global map optimization.
2. The method according to claim 1, characterized in that The method further comprises: After acquiring the laser radar point cloud data and the visual image, preprocessing the laser radar point cloud data and the visual image respectively; The preprocessing of the laser radar point cloud data specifically includes: Jointly calibrating the camera and the laser radar to obtain a transformation matrix between the camera coordinate system and the laser radar coordinate system; According to the transformation matrix, transform the laser radar point cloud data into the camera coordinate system; In the camera coordinate system, the point cloud data located on the back of the camera is removed from the laser radar point cloud data; Convert the remaining LiDAR point cloud data from 3D data to 2D data.
3. The method according to claim 2, characterized in that Extracting feature points from the visual image and matching feature points between frames to estimate the motion of the camera and obtain the position information of the camera specifically includes: Performing a dedistortion operation on the visual image; Extracting image feature points from the dedistorted visual image and determining descriptors of the image feature points; Compute and store the bag of visual words for each frame of visual image; For each frame of visual image, feature point matching is performed with the previous frame of visual image through the descriptor to obtain a set of matching feature points; Traversing the set of matching feature points, restoring the 3D coordinates of each image feature point; the depth value of the 3D coordinate of the image feature point is determined by searching the laser radar point cloud data around the image feature point and performing linear interpolation; Based on the 3D coordinates of each image feature point in the matching feature point set, the camera motion is estimated to obtain the position and posture information of the camera.
4. The method according to claim 1, characterized in that Estimating the robot's posture based on the laser radar point cloud data carrying the view information to obtain the robot's posture information specifically includes: Determining ground feature constraints, point cloud feature constraints, and visual feature constraints based on the laser radar point cloud data carrying view information; Combining the ground feature constraint, the point cloud feature constraint and the visual feature constraint to construct an inter-frame pose transformation error equation; Solving the inter-frame posture transformation error equation to obtain the posture information of the robot; Among them, the expression of the inter-frame posture transformation error equation is: Where [R|t] represents the variable to be estimated, R represents the rotation matrix of the inter-frame pose transformation of the modified LiDAR point cloud data, t represents the inter-frame translation vector of the modified LiDAR point cloud data, ρ represents the Huber robust kernel function, and loss ground Represents the ground feature constraint loss, loss corner Represents the corner point constraint loss in the point cloud feature constraint, loss surf Represents the plane point constraint loss in the point cloud feature constraint, loss camera represents the visual feature constraint loss.
5. The method according to claim 4, characterized in that Constructing the global map specifically includes: According to the current posture information of the robot, the laser radar point cloud data of the current frame is transformed into the coordinate system of the current key frame, and ICP point cloud fusion is performed to obtain a local map; Constructing the global map according to the local map; The key frame selection method is: The moment when the robot synchronous positioning system is successfully initialized is taken as the first key frame. Then, for the next candidate frame of the first key frame, if the candidate frame meets any of the following conditions, the candidate frame is taken as the key frame: Condition 1: The point cloud data inserted into the current keyframe reaches the set threshold; Condition 2: The current key frame has a maximum time; Condition 3: The robot moves the maximum distance in the current frame reference system.
6. The method according to claim 1, characterized in that The loop detection method based on BOW visual word bag is used to detect the loop path, which includes: Generating a descriptor for the visual features in the corrected laser radar point cloud data; Clustering the descriptors, taking each type of descriptor as a visual word, to construct a dictionary; Based on the dictionary, visual word matching is performed on the laser radar point cloud data of the current frame and the laser radar point cloud data of the historical frame, and based on the visual word matching result, it is determined whether the loop path exists.
7. The method according to claim 6, characterized in that Also includes: The dictionary is constructed by a K-ary tree structure.
8. A multi-sensor fusion robot synchronous positioning system, characterized in that: include: LiDAR, used to obtain LiDAR point cloud data of the robot’s environment during movement; A camera for acquiring visual images of the environment in which the robot is located during movement; A visual odometer is used to extract feature points from the visual image and match feature points between frames to estimate the motion of the camera and obtain the pose information of the camera; correct the motion distortion of the laser radar point cloud data by using the pose information of the camera; associate and register the extracted image feature points with the corrected laser radar point cloud data so that the corrected laser radar point cloud data carries the view information; estimate the robot pose based on the laser radar point cloud data carrying the view information to obtain the robot pose information; Correcting the motion distortion of the laser radar point cloud data by using the camera's posture information specifically includes: determining the camera's attitude angle change information according to the camera's posture information; mapping the camera's attitude angle change information to the laser radar's coordinate system; and performing spherical linear interpolation transformation on the laser radar's attitude information according to the camera's attitude angle change information in the laser radar's coordinate system; The radar odometry is used to construct a global map based on the robot's posture information and the lidar point cloud data carrying the view information. In the process of constructing the global map, a loop detection method based on the BOW visual word bag is used to detect the loop path to achieve global map optimization.
9. A robot, characterized in that the robot achieves synchronous positioning through the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Laser and vision fused inspection robot substation map construction method
CN111045017A
Traction substation inspection robot infrared laser fusion positioning method
CN115830070A
