A laser radar odometer method based on point cloud of overlapping regions between frames
By using the point cloud overlapping area prediction model of the inter-frame overlapping area in the lidar odometry to process the features and transformation positions of the point clouds in two consecutive frames, the matching accuracy and robustness problems caused by the invalid search range are solved, and a better solution is achieved. Efficient odometer calculation.
Patent Information
- Application Number
- CN202311701003.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-12-12
AI Technical Summary
In existing LiDAR odometry methods, the invalid search range between two consecutive frame point clouds leads to problems with matching accuracy and system robustness, affecting the accuracy and speed of odometry.
The point cloud overlapping area prediction model based on the inter-frame overlapping area is used to predict the point cloud transformation position through Transformer cross-coding processing and MLP network, optimize the matching process, reduce the number of false matches, and improve matching accuracy and robustness.
It improves the accuracy and speed of the odometer, reduces the amount of calculation, avoids the emergence of local optimal solutions, and improves the robustness of the system.
Smart Images

Figure CN117824699B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of odometers, and in particular relates to a laser radar odometer method based on point clouds in overlapping regions between frames. Background Art
[0002] Odometry is one of the key technologies in the field of robotics, and is mainly used to solve problems such as robot positioning and 3D reconstruction. In the task of lidar odometry, the rigid transformation is usually estimated based on the matching relationship between two consecutive point clouds, and then the translation change and rotation change are integrated to obtain the odometry. A common point cloud matching method is iterated closest points (ICP).
[0003] In the prior art, in the laser radar odometry task, the translation change and rotation change between two consecutive point clouds are usually obtained based on the matching relationship between the points of the two consecutive point clouds, that is, the rigid transformation between the two consecutive point clouds, and then the translation change and rotation change are integrated to obtain the odometry. However, in this method, the two consecutive point clouds each have environmental data that is not collected by the other frame, which will affect the matching accuracy of the two consecutive point clouds and further affect the accuracy of the odometry; thus, the ICP method has an invalid search range when solving the rigid transformation, which will lead to the following problems: on the one hand, there is an invalid search range, and there may be invalid matches, which will affect the matching accuracy and further affect the accuracy of the odometry; on the other hand, invalid searches will affect the solution speed and the robustness of the system. Summary of the invention
[0004] Purpose of the invention: In order to overcome the shortcomings of the prior art, the present invention provides a laser radar odometer method based on point clouds in overlapping areas between frames, which performs prediction calculations on the overlapping areas of two consecutive frames of point clouds, obtains the optimized value of the prediction model and updates it, and can fully consider the environmental data collected by the two consecutive frames of point clouds respectively, to avoid the situation where two consecutive frames of point clouds have environmental data that is not collected by the other frame, affecting the matching accuracy of the two consecutive frames of point clouds. The laser radar odometer method based on point clouds in overlapping areas between frames is used to improve the accuracy of the odometer.
[0005] Technical solution: In the first aspect, the present invention provides a laser radar odometer method based on point cloud of overlapping regions between frames, comprising:
[0006] Get two consecutive frames of point cloud;
[0007] Import two consecutive frame point clouds into the odometry frame overlap region prediction model respectively to obtain the two consecutive frame key point clouds and the features associated with the two frame key point clouds;
[0008] Perform Transformer cross-coding processing on the key point clouds of two consecutive frames and the features associated with the key point clouds of the two frames to obtain the conditional features of the key point clouds of two consecutive frames;
[0009] Decode the conditional features of two consecutive frames of key point clouds to obtain the coordinates of two consecutive frames of key point clouds;
[0010] The coordinates of two consecutive frames of key point clouds are used with the MLP network to predict the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud;
[0011] According to the corresponding transformation positions of the key point clouds of two consecutive frames and the point cloud of another frame, the corresponding relationship between the key point clouds of two consecutive frames and the point cloud of another frame and the score of the overlapping area are obtained;
[0012] According to the correspondence, overlap area score and features of two consecutive key point clouds, the total correspondence loss, total overlap loss and total feature loss are calculated respectively;
[0013] The total correspondence loss, total overlap loss, and total feature loss are added together to obtain the total loss, and the total loss is back-propagated to update the parameters of the odometer inter-frame overlap region prediction model;
[0014] Based on the odometry inter-frame overlap area prediction model, the real-time point cloud data of the lidar is input, and the odometry result after the inter-frame overlap area is optimized is output.
[0015] In a further embodiment, the method of importing two consecutive frames of point clouds into the odometer inter-frame overlapping area prediction model to obtain two consecutive frames of key point clouds and features associated with the two frames of key point clouds includes:
[0016] The downsampling part of the kernel point convolutional neural network backbone is used to downsample two consecutive frames of point clouds to determine the key point clouds of two consecutive frames;
[0017] Feature extraction is performed based on the determined two consecutive frames of key point clouds to obtain features associated with the two frames of key point clouds.
[0018] In a further embodiment, a method of performing Transformer cross-coding processing on two consecutive frames of key point clouds and features associated with the two frames of key point clouds to obtain conditional features of two consecutive frames of key point clouds includes:
[0019] Linearly project the features associated with two consecutive frames of key point clouds to a lower dimension to obtain the features of the two consecutive frames of key point clouds of the low-dimensional projection;
[0020] The key point cloud features of two consecutive frames of low-dimensional projection are processed in sequence by the multi-head self-attention layer, multi-head cross-attention layer, and position-aware feedforward network layer of the Transformer cross encoder to obtain the conditional features of the key point cloud of two consecutive frames.
[0021] In a further embodiment, the key point cloud features of two consecutive frames of low-dimensional projection are processed sequentially through the multi-head self-attention layer, the multi-head cross-attention layer, and the position-aware feedforward network layer of the Transformer cross encoder to obtain the conditional features of the key point cloud of two consecutive frames, including:
[0022] The key point cloud features of two consecutive frames of low-dimensional projection are used to predict the transformed positions of the key point clouds through a multi-head self-attention layer to introduce rigid constraints on the remaining points; the points of the two frames of different key point clouds are compared through a multi-head cross-attention layer; each key point cloud interacts with the points in the point cloud of another frame;
[0023] The key point cloud features are activated through the position-aware feedforward network layer, and the position is encoded according to the information interaction between each key point cloud and the points in another frame of point cloud to obtain the conditional features of two consecutive frames of key point clouds.
[0024] In a further embodiment, the Transformer cross encoder is provided with three sub-layers, each sub-layer performs a multi-head attention operation; each attention head in the multi-head attention applies residual links and layer normalization to each sub-layer using a single-head dot product attention;
[0025] Among them, the calculation expression of the multi-head attention operation is:
[0026]
[0027]
[0028] Where Q, K, and V represent the matrices corresponding to query, key, and value, respectively; represents the concatenation operation in the channel dimension; They represent the matrix elements learned; H represents the number of heads, d head represents the dimension of the head, and d head =d / N head ;
[0029] The expression for each attention head using single-head dot product attention is:
[0030]
[0031] In the formula, K T is the transposed matrix of matrix K.
[0032] In a further embodiment, the method for each key point cloud to interact with points in another frame of point cloud includes:
[0033] The query, key, and value are set to the same point cloud in the self-attention layer to obtain the corresponding point cloud of the current frame Corresponding to the previous frame point cloud This allows points to focus on other points in the same frame point cloud; in the cross attention layer, the key and value are set to the features from another frame point cloud, that is, the current frame point cloud corresponds to Point cloud corresponding to the previous frame This allows each point to interact with the points in another frame of the point cloud.
[0034] In a further embodiment, the coordinates of two consecutive frames of key point clouds are predicted using an MLP network to obtain corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, including:
[0035] The coordinates of two consecutive frames of key point clouds are regressed using the MLP network, and the corresponding transformation positions of the two consecutive frames of key point clouds and another frame of point cloud are predicted respectively; wherein the coordinates of the two consecutive frames of key point clouds are obtained by decoding the conditional features of the two consecutive frames of key point clouds after position encoding;
[0036] Among them, the expression for predicting the corresponding transformation position of the key point cloud of the previous frame and the point cloud of the current frame is:
[0037]
[0038] Among them, W 1 ,W 2 and b 1 ,b 2 They are respectively the learnable weights and biases, and the hat symbol Used to represent the predicted amount; similarly, predict the key points of the current frame point cloud The corresponding position in the point cloud of the previous frame
[0039] In a further embodiment, according to the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, a method for obtaining the corresponding relationship between two consecutive frames of key point clouds and another frame of point cloud and the score of the overlapping area includes:
[0040] According to the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, the corresponding relationship between each key point cloud and the points in the other frame of point cloud is obtained, and according to the corresponding relationship between each key point cloud and the points in the other frame of point cloud, the estimated value of the rigid transformation is obtained;
[0041] and the corresponding transformed positions of two consecutive frames of key point clouds and another frame of point cloud, calculating the probability that each key point cloud is located in the overlapping area, and obtaining the score of the overlapping area of the key point cloud;
[0042] The expression for obtaining the correspondence between each key point cloud and the points in another frame point cloud is:
[0043]
[0044] In the formula, The corresponding relationship between the key point cloud of two consecutive frames and the points in the point cloud of another frame is taken as the value. Indicates the probability value of each key point cloud being located in the overlapping area; and They respectively represent the fractions of the corresponding relationship between two consecutive key point clouds and another frame point cloud in the overlapping area;
[0045] According to the correspondence between each key point cloud and the points in another frame point cloud, the expression of the estimated value of the rigid transformation is:
[0046]
[0047] In the formula, express The vector of the i-th row is then solved in closed form using a weighted variant of the Kabsch-Umeyama algorithm to solve Equation (6), is an estimate of the rigid transformation.
[0048] In a further embodiment, the method of calculating the total correspondence loss, the total overlap loss, and the total feature loss respectively according to the correspondence, the score of the overlapping area, and the features of two consecutive frames of key point clouds includes:
[0049] The scores of the overlapping areas of two consecutive key point clouds are supervised by binary cross entropy loss to obtain the overlapping loss of two consecutive key point clouds; the overlapping losses of two consecutive key point clouds are added together to obtain the total overlapping loss;
[0050] According to the score of the overlapping area of the key point cloud, the key point cloud of the corresponding relationship in the overlapping area is determined, and the corresponding relationship loss values of the key point clouds of two consecutive frames are calculated based on the key point cloud of the corresponding relationship in the overlapping area and its continuous key point cloud, and the corresponding relationship loss values of the key point clouds of two consecutive frames are added to obtain the total corresponding relationship loss of the key point clouds of two consecutive frames;
[0051] By calculating the feature loss of the features of two consecutive frames of key point clouds respectively, the feature loss corresponding to each frame of key point cloud is obtained; and the feature losses of two consecutive frames of key point clouds are added together to obtain the total feature loss.
[0052] In a further embodiment, the scores of the overlapping areas of two consecutive key point clouds are supervised using binary cross entropy loss to obtain the overlapping loss of two consecutive key point clouds; the overlapping loss of two consecutive key point clouds is added together to obtain the total overlapping loss, which includes:
[0053] The network is supervised and trained using the real pose, so that the network can predict the overlapping area between two consecutive point clouds. The key points are downsampled by average pooling, and then the same pooling index as KPConv downsampling is used to obtain the overlapping true value.
[0054] The binary cross entropy loss calculation expression of the overlap loss of the previous key point cloud in two consecutive key point clouds is:
[0055]
[0056] In the formula, is the true value of overlap, The previous frame point cloud P k-1 loss; and define the point The corresponding expression for the true value of overlap is:
[0057]
[0058] in, Express Make it real * ,t *} corresponding to the rigid transformation, NN(·) represents the nearest neighbor in space, r o is the preset overlap threshold; the present invention downsamples the key points by average pooling, and then uses the same pooling index as the KPConv downsampling to obtain the true overlap value, that is, the label
[0059] The overlapping loss of key point clouds of two consecutive frames is calculated by adding them together, and the expression of the total overlapping loss is obtained as follows:
[0060] In a further embodiment, the corresponding relationship loss values of two consecutive frames of key point clouds are calculated based on the key point cloud in the overlapping area and its continuous key point cloud, and then added to obtain the total corresponding relationship loss of two consecutive frames of key point clouds, including:
[0061] Apply l to the key point cloud and its continuous key point cloud in the overlapping area of the predicted correspondence. 1 Function loss calculation, the previous frame point cloud P in the continuous frame point cloud k-1 The corresponding relationship loss calculation expression is:
[0062]
[0063] The acquisition process of is the same as formula (10), and the calculation expression of the total correspondence loss is:
[0064] In a further embodiment, the feature loss corresponding to each frame of the key point cloud is obtained by respectively calculating the feature loss of the features of two consecutive frames of key point clouds; and the feature loss of the two consecutive frames of key point clouds is added to obtain the total feature loss, including:
[0065] According to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud of the previous frame to obtain the feature loss corresponding to the key point cloud of the previous frame; then, according to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud at the current moment to obtain the feature loss corresponding to the key point cloud at the current moment;
[0066] The feature loss corresponding to the key point cloud of the previous frame is added to the feature loss corresponding to the key point cloud of the current moment to obtain the total feature loss;
[0067] Among them, the calculation expression for obtaining the feature loss corresponding to the key point cloud of the previous frame is:
[0068]
[0069] Where f(·,·) is a logarithmic bilinear model. The expression for calculating the loss of a set of features of the key point cloud of the previous frame using the logarithmic bilinear model is:
[0070]
[0071] In the formula, Represents point p k-1 Conditional characteristics; and Respectively expressed in Matching and non-matching p k-1 The key point is to use positive and negative margins (r p ,r n ) is determined by (m, 2m), where m is the voxel distance used by the last downsampling layer in the KPConv backbone, and all negative points that fall outside the negative margin belong to W f represents the learnable linear transformation parameters, U f represents an upper triangular matrix, Upper triangular matrix U f The transpose of
[0072] The feature loss corresponding to the key point cloud at the current moment is obtained in the same way as formula (11), and the expression for the total feature loss is:
[0073] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0074] (1) Faster solution speed. Only the overlapping area of two consecutive point clouds is used to estimate the rigid transformation, which reduces the amount of data involved in the calculation, thereby reducing the amount of calculation and improving the solution speed;
[0075] (2) Higher solution accuracy. Only the overlapping area of two consecutive point clouds is used to reduce the number of false matches and improve matching accuracy.
[0076] (3) Higher robustness: The present invention reduces the number of false matches, thereby avoiding the emergence of some local optimal solutions and improving the robustness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a structural block diagram of the laser radar odometer model based on the point cloud of the overlapping area between frames of the present invention.
[0078] Figure 2 It is a flow chart of the laser radar odometer method based on the point cloud of the overlapping area between frames of the present invention. DETAILED DESCRIPTION
[0079] In order to more fully understand the technical content of the present invention, the technical solution of the present invention is further introduced and illustrated in conjunction with specific embodiments below, but is not limited thereto.
[0080] Combination Figure 1 and Figure 2 Further explaining the laser radar odometer method of the present invention, in the laser radar odometer task, usually based on two frames of continuous point cloud and The matching relationship between the points is used to obtain the translation change t between the two frames of continuous point clouds. k-1→k and the rotation change q k-1→k , that is, rigid transformation, and then integrate the translation change and rotation change to obtain the odometer. Among them, k is the time index of the current frame point cloud, and M is the number of points in the point cloud. The present invention takes into account that two consecutive frames of point clouds each have environmental data that is not collected by the other frame, which will affect the matching accuracy of the two consecutive frames of point clouds, and thus affect the accuracy of the odometer. Therefore, the present invention proposes a laser radar odometer method based on point clouds in overlapping areas between frames to improve the accuracy of the odometer; the steps of the laser radar odometer method based on point clouds in overlapping areas between frames are:
[0081] Get two consecutive frames of point cloud;
[0082] Import two consecutive frame point clouds into the odometry inter-frame overlapping region prediction model respectively to obtain the key point clouds of two consecutive frames and the features associated with the key point clouds of the two frames;
[0083] Perform Transformer cross-coding processing on the key point clouds of two consecutive frames and the features associated with the key point clouds of the two frames to obtain the conditional features of the key point clouds of two consecutive frames;
[0084] Decode the conditional features of two consecutive frames of key point clouds to obtain the coordinates of two consecutive frames of key point clouds;
[0085] The coordinates of two consecutive frames of key point clouds are used with the MLP network to predict the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud;
[0086] According to the corresponding transformation positions of the key point clouds of two consecutive frames and the point cloud of another frame, the corresponding relationship between the key point clouds of two consecutive frames and the point cloud of another frame and the score of the overlapping area are obtained;
[0087] According to the correspondence, overlap area score and features of two consecutive key point clouds, the total correspondence loss, total overlap loss and total feature loss are calculated respectively;
[0088] The total correspondence loss, total overlap loss, and total feature loss are added together to obtain the total loss, and the total loss is back-propagated to update the parameters of the odometer inter-frame overlap region prediction model;
[0089] Based on the odometry inter-frame overlap area prediction model, the real-time point cloud data of the LiDAR is input, and the odometry result after the inter-frame overlap area is optimized is output;
[0090] In this embodiment, two consecutive frames of key point clouds are and The features associated with two consecutive frames of key point clouds are and Where D is the dimension of the features associated with each key point. Then, the invention passes these key points and features to several Transformer cross encoder layers. Then, the corresponding transformed position of the key point in another point cloud is output and Finally, from and Obtain the corresponding relationship and At the same time, the output is used to represent the probability that each key point in the two frame point clouds is located in the overlapping area, that is, the overlap score and The rigid transformation can be estimated directly from the corresponding relationship in the overlapping area, and the preferred manner of the specific steps is further introduced in conjunction with the embodiments.
[0091] Preferably, the method of importing two consecutive frames of point clouds into the odometer inter-frame overlapping area prediction model to obtain two consecutive frames of key point clouds and features associated with the two frames of key point clouds includes:
[0092] The downsampling part of the kernel point convolutional neural network backbone is used to downsample two consecutive frames of point clouds to determine the key point clouds of two consecutive frames;
[0093] Feature extraction is performed based on the determined two consecutive frames of key point clouds to obtain features associated with the two frames of key point clouds;
[0094] In this embodiment, the downsampling part of the kernel point convolution (KPConv) backbone is used to extract two frames of point cloud P k and P k-1 The purpose of this step is: (1) to downsample the original point cloud to reduce the amount of computation required for downstream processing and to convert the resulting point set into and as key points; (2) the features associated with each key point are and KPConv is used because it can operate directly on the point cloud without any intermediate steps such as converting the point cloud to a front view or a bird's eye view.
[0095] Preferably, a method of performing Transformer cross-coding processing on two consecutive frames of key point clouds and features associated with the two frames of key point clouds to obtain conditional features of two consecutive frames of key point clouds includes:
[0096] Linearly project the features associated with two consecutive frames of key point clouds to a lower dimension to obtain the features of the two consecutive frames of key point clouds of the low-dimensional projection;
[0097] The key point cloud features of two consecutive frames of low-dimensional projection are processed in turn by the multi-head self-attention layer, multi-head cross-attention layer, and position-aware feedforward network layer of the Transformer cross encoder to obtain the conditional features of the key point cloud of two consecutive frames;
[0098] In this embodiment, the feature and Linearly project to a lower dimension d = 256, and then input these projected features into the first layer of N = 6 Transformer cross encoders;
[0099] Furthermore, the key point cloud features of two consecutive frames of low-dimensional projection are processed in sequence by the multi-head self-attention layer, the multi-head cross-attention layer, and the position-aware feedforward network layer of the Transformer cross encoder to obtain the conditional features of the key point cloud of two consecutive frames, including:
[0100] The key point cloud features of two consecutive frames of low-dimensional projection are used to predict the transformed positions of the key point clouds through a multi-head self-attention layer to introduce rigid constraints on the remaining points; the points of the two frames of different key point clouds are compared through a multi-head cross-attention layer; each key point cloud interacts with the points in the point cloud of another frame;
[0101] The key point cloud features are activated through the position-aware feedforward network layer, and the position is encoded according to the information interaction between each key point cloud and the points in another frame of point cloud to obtain the conditional features of two consecutive frames of key point clouds.
[0102] Furthermore, the Transformer cross encoder is set with three sub-layers, each of which performs multi-head attention operation; each attention head in the multi-head attention uses single-head dot product attention to apply residual connection and layer normalization to each sub-layer;
[0103] Among them, the calculation expression of the multi-head attention operation is:
[0104]
[0105]
[0106] Where Q, K, and V represent the matrices corresponding to query, key, and value, respectively; represents the concatenation operation in the channel dimension; They represent the matrix elements learned; H represents the number of heads, d head represents the dimension of the head, and d head =d / N head ;
[0107] The expression for each attention head using single-head dot product attention is:
[0108]
[0109] In the formula, K T is the transposed matrix of matrix K.
[0110] Furthermore, the method for each key point cloud to interact with points in another frame of point cloud includes:
[0111] The query, key, and value are set to the same point cloud in the self-attention layer to obtain the corresponding point cloud of the current frame Corresponding to the previous frame point cloud This allows points to focus on other points in the same frame point cloud; in the cross attention layer, the key and value are set to the features from another frame point cloud, that is, the current frame point cloud corresponds to Point cloud corresponding to the previous frame This allows each point to interact with the points in another frame of the point cloud;
[0112] In this embodiment, each Transformer cross encoder and cross attention enable the network to compare points from two different point clouds of two frames; self-attention allows points to interact with other points in the same point cloud when predicting their own transformed positions, that is, rigid constraints can be introduced on the remaining points. In addition, the network weights are shared between the two point clouds, but not between the layers; for the position-aware feedforward network, the present invention uses a two-layer feedforward network, uses the ReLU activation function after the first layer, and operates on the features of each key point separately. It should be noted that residual connections and layer normalization are also used here. Among them, the present invention introduces position information, i.e., position encoding, by adding sinusoidal position encoding to the input of each Transformer layer.
[0113] The output of the Transformer cross encoder layer is the feature These features are conditional features on other frames.
[0114] Preferably, the coordinates of two consecutive frames of key point clouds are predicted using an MLP network, and the method for predicting the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud includes:
[0115] The coordinates of two consecutive frames of key point clouds are regressed using the MLP network, and the corresponding transformation positions of the two consecutive frames of key point clouds and another frame of point cloud are predicted respectively; wherein the coordinates of the two consecutive frames of key point clouds are obtained by decoding the conditional features of the two consecutive frames of key point clouds after position encoding;
[0116] Among them, the expression for predicting the corresponding transformation position of the key point cloud of the previous frame and the point cloud of the current frame is:
[0117]
[0118] Among them, W 1 ,W 2 and b 1 ,b 2 They are respectively the learnable weights and biases, and the hat symbol Used to represent the predicted amount; similarly, predict the key points of the current frame point cloud The corresponding position in the point cloud of the previous frame
[0119] In this embodiment, in order to use conditional features To predict the coordinates of the transformation key points, the present invention uses a two-layer MLP (Multilayer Perceptron, MLP) to regress the required coordinates. In addition, the present invention predicts the overlap confidence separately and To this end, a fully connected layer with a sigmoid activation function is used to shield the influence of unstable factors, such as inaccurate predictions and correspondences outside the overlapping area.
[0120] Preferably, the method for obtaining the correspondence between two consecutive frames of key point clouds and another frame of point cloud and the score of the overlapping area according to the corresponding transformed positions of two consecutive frames of key point clouds and another frame of point cloud comprises:
[0121] According to the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, the corresponding relationship between each key point cloud and the points in the other frame of point cloud is obtained, and according to the corresponding relationship between each key point cloud and the points in the other frame of point cloud, the estimated value of the rigid transformation is obtained;
[0122] and the corresponding transformed positions of two consecutive frames of key point clouds and another frame of point cloud, calculating the probability that each key point cloud is located in the overlapping area, and obtaining the score of the overlapping area of the key point cloud;
[0123] The expression for obtaining the correspondence between each key point cloud and the points in another frame point cloud is:
[0124]
[0125] In the formula, The corresponding relationship between the key point cloud of two consecutive frames and the points in the point cloud of another frame is taken as the value. Indicates the probability value of each key point cloud being located in the overlapping area; and They represent the fractions of the corresponding relationships between two consecutive key point clouds and another frame point cloud in the overlapping area; further, in formula (5) It is the 3D information (coordinate x, y, z values) of the overlapping area of two consecutive key point clouds in the key point cloud of the current frame (k). It is the 3D information (coordinate x, y, z values) of the overlapping area of two consecutive key point clouds in the previous frame (k-1) key point cloud; It is the 3D information (coordinate x, y, z values) of the key point cloud of the current frame (k) in the non-overlapping area of the key point cloud of two consecutive frames. It is the 3D information (coordinate x, y, z values) unique to the key point cloud of the previous frame (k-1) in the non-overlapping area of the key point clouds of two consecutive frames.
[0126] According to the correspondence between each key point cloud and the points in another frame point cloud, the expression of the estimated value of the rigid transformation is:
[0127]
[0128] In the formula, express The vector of the i-th row is then solved in closed form using a weighted variant of the Kabsch-Umeyama algorithm to solve Equation (6), is an estimate of the rigid transformation.
[0129] Preferably, the method of calculating the total correspondence loss, the total overlap loss, and the total feature loss respectively according to the correspondence, the score of the overlapping area, and the features of two consecutive frames of key point clouds includes:
[0130] The scores of the overlapping areas of two consecutive key point clouds are supervised by binary cross entropy loss to obtain the overlapping loss of two consecutive key point clouds; the overlapping losses of two consecutive key point clouds are added together to obtain the total overlapping loss;
[0131] According to the score of the overlapping area of the key point cloud, the key point cloud of the corresponding relationship in the overlapping area is determined, and the corresponding relationship loss values of the key point clouds of two consecutive frames are calculated based on the key point cloud of the corresponding relationship in the overlapping area and its continuous key point cloud, and the corresponding relationship loss values of the key point clouds of two consecutive frames are added to obtain the total corresponding relationship loss of the key point clouds of two consecutive frames;
[0132] By calculating the feature loss of the features of two consecutive frames of key point clouds respectively, the feature loss corresponding to each frame of key point cloud is obtained; and the feature losses of two consecutive frames of key point clouds are added together to obtain the total feature loss.
[0133] Preferably, the scores of the overlapping areas of the key point clouds of two consecutive frames are supervised by using binary cross entropy loss to obtain the overlapping loss of the key point clouds of two consecutive frames; the overlapping loss of the key point clouds of two consecutive frames is added together to obtain the total overlapping loss, which includes:
[0134] The network is supervised and trained using the real pose, so that the network can predict the overlapping area between two consecutive point clouds. The key points are downsampled by average pooling, and then the same pooling index as KPConv downsampling is used to obtain the overlapping true value.
[0135] The binary cross entropy loss calculation expression of the overlap loss of the previous key point cloud in two consecutive key point clouds is:
[0136]
[0137] In the formula, is the overlapping true value, The previous point cloud P k-1 loss; and define the point The corresponding expression for the true value of overlap is:
[0138]
[0139] in, Express Make it real * ,t *} corresponding to the rigid transformation, NN(·) represents the nearest neighbor in space, r o is the preset overlap threshold; the present invention downsamples the key points by average pooling, and then uses the same pooling index as the KPConv downsampling to obtain the true overlap value, that is, the label
[0140] The overlapping loss of key point clouds of two consecutive frames is calculated by adding them together, and the expression of the total overlapping loss is obtained as follows:
[0141] Preferably, based on the key point cloud in the overlapping area and its continuous key point cloud, the corresponding relationship loss values of two consecutive frames of key point clouds are calculated and added to obtain the total corresponding relationship loss of two consecutive frames of key point clouds, including:
[0142] The l^1 loss function is applied to the key point cloud and its continuous key point cloud in the overlapping area of the predicted correspondence, and the previous frame point cloud P in the continuous frame point cloud is k-1 The corresponding relationship loss calculation expression is:
[0143]
[0144] The acquisition process of is the same as formula (10), and the calculation expression of the total correspondence loss is: The l^1 loss in this embodiment, also known as Mean Absolute Error (MAE), is a loss function used in regression problems to measure the absolute difference between the inference result and the target value / true value / label value. The mathematical definition of l^1 loss is: l^1 loss = |inference value-target value|
[0145] Preferably, the feature loss corresponding to each frame of the key point cloud is obtained by respectively calculating the feature loss of the features of two consecutive frames of key point clouds; and the feature loss of the two consecutive frames of key point clouds is added to obtain the total feature loss, including:
[0146] According to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud of the previous frame to obtain the feature loss corresponding to the key point cloud of the previous frame; then, according to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud at the current moment to obtain the feature loss corresponding to the key point cloud at the current moment;
[0147] The feature loss corresponding to the key point cloud of the previous frame is added to the feature loss corresponding to the key point cloud of the current moment to obtain the total feature loss;
[0148] Among them, the calculation expression for obtaining the feature loss corresponding to the key point cloud of the previous frame is:
[0149]
[0150] Where f(·,·) is a logarithmic bilinear model. The expression for calculating the loss of a set of features of the key point cloud of the previous frame using the logarithmic bilinear model is:
[0151]
[0152] In the formula, Represents point p k-1 Conditional characteristics; and Respectively expressed in Matching and non-matching p k-1 The key point is to use positive and negative margins (r p ,r n ) is determined by (m, 2m), where m is the voxel distance used by the last downsampling layer in the KPConv backbone, and all negative points that fall outside the negative margin belong to W f represents the learnable linear transformation parameters, U f represents an upper triangular matrix, Represents the upper triangular matrix U f Because the two point clouds contain the same type of features, the present invention transforms the learnable linear transformation W f Parameterized as an upper triangular matrix U f and its transpose, that is Force W f is a symmetric matrix. Formula (11) maximizes the mutual information between the features of the matching points. The current frame point cloud P k The feature loss calculation method is similar to formula (11). So far, the total feature loss is obtained, that is,
[0153] In summary, the present invention reduces the amount of data involved in the calculation by estimating the rigid transformation using only the overlapping area of two frames of continuous point clouds, thereby reducing the amount of calculation, improving the solution speed, and has the advantage of fast solution speed; secondly, the present invention only uses the overlapping area of two frames of continuous point clouds to reduce the number of false matches, improve matching accuracy, and obtain higher calculation accuracy; in addition, the present invention reduces the number of false matches, thereby avoiding the emergence of some local optimal solutions and improving the robustness of the system.
[0154] The embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0155] The embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] The above is only a preferred embodiment of the present invention. Without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A laser radar odometer method based on point cloud of overlapping regions between frames, characterized in that: include: Get two consecutive frames of point cloud; Import two consecutive frame point clouds into the odometry frame overlap region prediction model respectively to obtain the two consecutive frame key point clouds and the features associated with the two frame key point clouds; Perform Transformer cross-coding processing on the key point clouds of two consecutive frames and the features associated with the key point clouds of the two frames to obtain the conditional features of the key point clouds of two consecutive frames; Decode the conditional features of two consecutive frames of key point clouds to obtain the coordinates of two consecutive frames of key point clouds; The coordinates of two consecutive frames of key point clouds are used with the MLP network to predict the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud; According to the corresponding transformation positions of the key point clouds of two consecutive frames and the point cloud of another frame, the corresponding relationship between the key point clouds of two consecutive frames and the point cloud of another frame and the score of the overlapping area are obtained; According to the correspondence, overlap area score and features of two consecutive key point clouds, the total correspondence loss, total overlap loss and total feature loss are calculated respectively; The total correspondence loss, total overlap loss, and total feature loss are added together to obtain the total loss, and the total loss is back-propagated to update the parameters of the odometer inter-frame overlap region prediction model; Based on the odometry inter-frame overlap area prediction model, the real-time point cloud data of the LiDAR is input, and the odometry result after the inter-frame overlap area is optimized is output; The method of importing two consecutive frame point clouds into the odometer inter-frame overlapping area prediction model to obtain two consecutive frame key point clouds and features associated with the two frame key point clouds includes: The downsampling part of the kernel point convolutional neural network backbone is used to downsample two consecutive frames of point clouds to determine the key point clouds of two consecutive frames; Feature extraction is performed based on the determined two consecutive frames of key point clouds to obtain features associated with the two frames of key point clouds; The method of performing Transformer cross encoding processing on two consecutive frames of key point clouds and features associated with the two frames of key point clouds to obtain conditional features of two consecutive frames of key point clouds includes: Linearly project the features associated with two consecutive frames of key point clouds to a lower dimension to obtain the features of the two consecutive frames of key point clouds of the low-dimensional projection; The key point cloud features of two consecutive frames of low-dimensional projection are processed in turn by the multi-head self-attention layer, multi-head cross-attention layer, and position-aware feedforward network layer of the Transformer cross encoder to obtain the conditional features of the key point cloud of two consecutive frames; The key point cloud features of two consecutive frames of low-dimensional projection are processed in sequence by the multi-head self-attention layer, the multi-head cross-attention layer, and the position-aware feedforward network layer of the Transformer cross encoder. The method for obtaining the conditional features of the key point cloud of two consecutive frames includes: The key point cloud features of two consecutive frames of low-dimensional projection are used to predict the transformed positions of the key point clouds through a multi-head self-attention layer to introduce rigid constraints on the remaining points; the points of the two frames of different key point clouds are compared through a multi-head cross-attention layer; each key point cloud interacts with the points in the point cloud of another frame; The key point cloud features are activated through the position-aware feedforward network layer, and the position is encoded according to the information interaction between each key point cloud and the points in another frame of point cloud, so as to obtain the conditional features of two consecutive frames of key point clouds; The Transformer cross encoder is configured with three sub-layers, each of which performs a multi-head attention operation; each attention head in the multi-head attention uses a single-head dot product attention to apply residual links and layer normalization to each sub-layer; Among them, the calculation expression of the multi-head attention operation is: Where Q, K, and V represent the matrices corresponding to query, key, and value, respectively; represents the concatenation operation in the channel dimension; They represent the matrix elements learned; H represents the number of heads, d head represents the dimension of the head, and d head =d / N head ; The expression for each attention head using single-head dot product attention is: In the formula, K T is the transposed matrix of matrix K; The method for each key point cloud to interact with the points in another frame point cloud includes: The query, key, and value are set to the same point cloud in the self-attention layer to obtain the corresponding point cloud of the current frame Corresponding to the previous frame point cloud This allows points to focus on other points in the same frame point cloud; in the cross attention layer, the key and value are set to the features from another frame point cloud, that is, the current frame point cloud corresponds to Point cloud corresponding to the previous frame This allows each point to interact with the points in another frame of the point cloud; The coordinates of two consecutive frames of key point clouds are predicted using an MLP network. Methods for predicting the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud include: The coordinates of two consecutive frames of key point clouds are regressed using the MLP network, and the corresponding transformation positions of the two consecutive frames of key point clouds and another frame of point cloud are predicted respectively; wherein the coordinates of the two consecutive frames of key point clouds are obtained by decoding the conditional features of the two consecutive frames of key point clouds after position encoding; Among them, the expression for predicting the corresponding transformation position of the key point cloud of the previous frame and the point cloud of the current frame is: Among them, W1, W2 and b1, b2 are learnable weights and biases respectively, and the hat symbol Used to represent the predicted amount; similarly, predict the key points of the current frame point cloud The corresponding position in the point cloud of the previous frame According to the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, the method of obtaining the corresponding relationship between two consecutive frames of key point clouds and another frame of point cloud and the score of the overlapping area includes: According to the corresponding transformation positions of two consecutive frames of key point clouds and another frame of point cloud, the corresponding relationship between each key point cloud and the points in the other frame of point cloud is obtained, and according to the corresponding relationship between each key point cloud and the points in the other frame of point cloud, the estimated value of the rigid transformation is obtained; and the corresponding transformed positions of two consecutive frames of key point clouds and another frame of point cloud, calculating the probability that each key point cloud is located in the overlapping area, and obtaining the score of the overlapping area of the key point cloud; The expression for obtaining the correspondence between each key point cloud and the points in another frame point cloud is: In the formula, The corresponding relationship between two consecutive frames of key point clouds and points in another frame of point cloud is taken as the value. Indicates the probability value of each key point cloud being located in the overlapping area; and They respectively represent the fractions of the corresponding relationship between two consecutive key point clouds and another frame point cloud in the overlapping area; According to the correspondence between each key point cloud and the points in another frame point cloud, the expression of the estimated value of the rigid transformation is: In the formula, express The vector of the i-th row is then solved in closed form using a weighted variant of the Kabsch-Umeyama algorithm to solve Equation (6), is the estimate of the rigid transformation; Methods for calculating the total correspondence loss, the total overlap loss, and the total feature loss according to the correspondence, the score of the overlapping area, and the features of two consecutive frames of key point clouds include: The scores of the overlapping areas of two consecutive key point clouds are supervised by binary cross entropy loss to obtain the overlapping loss of two consecutive key point clouds; the overlapping losses of two consecutive key point clouds are added together to obtain the total overlapping loss; According to the score of the overlapping area of the key point cloud, the key point cloud of the corresponding relationship in the overlapping area is determined, and the corresponding relationship loss values of the key point clouds of two consecutive frames are calculated based on the key point cloud of the corresponding relationship in the overlapping area and its continuous key point cloud, and the corresponding relationship loss values of the key point clouds of two consecutive frames are added to obtain the total corresponding relationship loss of the key point clouds of two consecutive frames; By calculating the feature loss of the features of two consecutive frames of key point clouds respectively, the feature loss corresponding to each frame of key point cloud is obtained; and the feature loss of two consecutive frames of key point clouds is added to obtain the total feature loss; The scores of the overlapping areas of two consecutive key point clouds are supervised by binary cross entropy loss, and the overlapping loss of two consecutive key point clouds is obtained; the overlapping loss of two consecutive key point clouds is added together to obtain the total overlapping loss, which includes: The network is supervised and trained using the real pose, so that the network can predict the overlapping area between two consecutive point clouds. The key points are downsampled by average pooling, and then the same pooling index as KPConv downsampling is used to obtain the overlapping true value. The binary cross entropy loss calculation expression of the overlap loss of the previous key point cloud in two consecutive key point clouds is: In the formula, is the overlapping true value, The previous point cloud P k-1 loss; and define the point The corresponding expression for the true value of overlap is: in, Express Make it real * ,t * } corresponding to the rigid transformation, NN(·) represents the nearest neighbor in space, r o is the preset overlap threshold; the present invention downsamples the key points by average pooling, and then uses the same pooling index as the KPConv downsampling to obtain the true overlap value, that is, the label The overlapping loss of key point clouds of two consecutive frames is calculated by adding them together, and the expression of the total overlapping loss is obtained as follows: Based on the key point cloud in the overlapping area and its continuous key point cloud, the corresponding loss values of the key point clouds of two consecutive frames are calculated and added to obtain the total corresponding loss of the key point clouds of two consecutive frames, including: Apply l to the key point cloud and its continuous key point cloud in the overlapping area of the predicted correspondence. 1 Function loss calculation, the previous frame point cloud P in the continuous frame point cloud k-1 The corresponding relationship loss calculation expression is: The acquisition process of is the same as formula (10), and the calculation expression of the total correspondence loss is: By calculating the feature loss of the features of two consecutive frames of key point clouds respectively, the feature loss corresponding to each frame of key point cloud is obtained; and the feature loss of two consecutive frames of key point clouds is added to obtain the total feature loss, including: According to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud of the previous frame to obtain the feature loss corresponding to the key point cloud of the previous frame; then, according to the geometric attributes, a logarithmic bilinear model is used to calculate the loss of a set of features of the key point cloud at the current moment to obtain the feature loss corresponding to the key point cloud at the current moment; The feature loss corresponding to the key point cloud of the previous frame is added to the feature loss corresponding to the key point cloud of the current moment to obtain the total feature loss; Among them, the calculation expression for obtaining the feature loss corresponding to the key point cloud of the previous frame is: Where f(·,·) is a logarithmic bilinear model. The expression for calculating the loss of a set of features of the key point cloud of the previous frame using the logarithmic bilinear model is: In the formula, Represents point p k-1 Conditional characteristics; and Respectively expressed in Matching and non-matching p k-1 The key point is to use positive and negative margins (r p ,r n ) is determined by (m, 2m), where m is the voxel distance used by the last downsampling layer in the KPConv backbone, and all negative points that fall outside the negative margin belong to W f represents the learnable linear transformation parameters, U f represents an upper triangular matrix, Upper triangular matrix U f The transpose of The feature loss corresponding to the key point cloud at the current moment is obtained in the same way as formula (11), and the expression for the total feature loss is:
Citation Information
Cited By
Robot repositioning method and device based on laser radar
CN119388422A
