Engineering machinery mapping method and device, and readable storage medium
Through the laser point cloud distortion correction, feature extraction and factor graph optimization of the vehicle-mounted multi-sensor fusion platform and IMU data, the problem of slow vehicle positioning speed and low robustness of unmanned engineering machinery is solved, and rapid positioning in complex environments is achieved. High-precision mapping and positioning.
Patent Information
- Application Number
- PCT/CN2023/085476
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-24
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-03
AI Technical Summary
Existing vehicle positioning technology for unmanned construction machinery has problems such as slow mapping speed, easy mapping degradation, and low positioning robustness. It is difficult to meet the high-precision positioning requirements of construction machinery in complex working conditions and harsh environments.
A vehicle-mounted multi-sensor fusion platform is used to obtain environmental information, IMU data and IMU odometer are used to correct laser point cloud motion distortion, point line and point surface features are extracted to match the local map, and global optimization is performed through factor graph optimization and normal distribution transformation algorithms. Pose optimization solves the IMU offset correction and loop closure detection of key frames.
It achieves rapid mapping and high-precision positioning of construction machinery in complex environments, improves mapping speed and robustness, and solves mapping problems in degraded scenarios.
Smart Images

Figure CN2023085476_03102024_PF_FP_ABST
Abstract
Description
A construction method, device, and readable storage medium for engineering machinery Technical Field
[0001] The present invention relates to the field of motion mapping, and in particular to a mapping method, device, and readable storage medium for engineering machinery. Background Art
[0002] Construction machinery is widely used in the engineering and construction sector. With the continuous advancement of global technology, intelligent construction machinery has become a future trend. This intelligentization encompasses product and construction intelligence, manufacturing intelligence, service intelligence, and management intelligence. Unmanned construction machinery falls under this category, meaning that construction machinery can autonomously complete its travel and operating tasks without human intervention.
[0003] It is generally believed that unmanned construction machinery comprises five major modules: environmental perception, vehicle positioning, decision-making and planning, motion control, and autonomous operation. Vehicle positioning is the foundation for these three functions. Unlike ordinary passenger vehicles, construction machinery operates in complex conditions and harsh environments. A single sensor cannot meet the high-precision and robust positioning requirements for construction machinery.
[0004] Currently, autonomous vehicle technology is primarily used in the automotive sector, with relatively little research on related technologies in the construction machinery sector. Existing autonomous construction machinery positioning technologies primarily rely on single-sensor positioning, which suffers from slow mapping speeds, prone to degradation, and low positioning robustness.
[0005] In view of this, this application is filed.
[0006] Summary of the Invention
[0007] The present invention discloses a mapping method, device, and readable storage medium for engineering machinery, aiming to solve the problems of slow mapping speed, easy degradation of mapping, and low positioning robustness of engineering machinery.
[0008] A first embodiment of the present invention provides a method for mapping construction machinery, comprising:
[0009] Obtain environmental information collected by the vehicle-mounted multi-sensor fusion platform, and use IMU data and IMU odometry to perform motion distortion correction on the current frame laser point cloud of the environmental information;
[0010] Extracting point-line features and point-surface features based on the corrected curvature of each point in the laser point cloud of the current frame, and matching the point-line features and the point-surface features with the local map;
[0011] Determine whether the current frame laser point cloud is a key frame;
[0012] If not, calibrate the IMU zero bias and reset the IMU pre-integrator;
[0013] If so, factor graph optimization is performed on the laser point cloud of the current frame, and the normal distribution transformation algorithm is used to align the laser point cloud of the current frame with the local map composed of historical frames to optimize and correct the global pose.
[0014] Preferably, the environmental information collected by the vehicle-mounted multi-sensor fusion platform is acquired, and motion distortion correction is performed on the current frame laser point cloud of the environmental information using IMU data and IMU odometer, specifically:
[0015] Pre-integrate the IMU data to obtain the coordinate transformation matrix of the laser radar from the end scanning time to the start scanning time of the laser point cloud of the current frame;
[0016] The coordinate transformation matrix is used to perform motion distortion correction on the laser point cloud of the current frame; wherein the coordinate transformation matrix is:
[0017] in, is the coordinate transformation matrix of each point in the laser point cloud of the current frame relative to the starting scanning time, is the coordinate transformation matrix of the laser radar from the end time of scanning to the start time of scanning, t i is the measurement time of each point in the laser point cloud of the current frame within the scanning cycle, t k is the scanning start time, t k+1 is the scanning end time, is the coordinate of each point in the laser point cloud of the current frame in the laser radar coordinate system at the start of scanning, P i The coordinates of each point in the laser point cloud of the current frame in the laser radar coordinate system at the current moment.
[0018] Preferably, the point-line feature and point-surface feature extraction are performed based on the corrected curvature of each point of the laser point cloud of the current frame, and the point-line feature and the point-surface feature are matched with the local map, specifically:
[0019] The curvature calculation model is called to generate the curvature of each point in the laser point cloud of the current frame. The curvature calculation model is as follows:
[0020] Among them, K is the curvature of the i-th point of the laser point cloud, d i is the distance between the i-th point and the origin of the laser radar coordinate system, di+j (j = -5, -4, ..., 5) is the distance between the five laser points before and after the i-th point and the origin of the laser radar coordinate system;
[0021] Performing feature extraction and segmentation on the laser point cloud of the current frame according to a preset curvature threshold, wherein points of the laser point cloud of the current frame whose curvature is greater than the curvature threshold are determined as corner points, and vice versa, are determined as surface points;
[0022] Performing voxel filtering on the corner points and surface points to generate a feature point cloud of the current frame;
[0023] The kd-tree is used to find the points in the local map that are closest to the corner point features in the feature point cloud of the current frame and connect them into a line, and the distance from the corner point in the feature point cloud of the current frame to the line is generated. The calculation model is as follows:
[0024] in, is the coordinate point of the i-th corner point in the feature point cloud of the current frame at time k+1 in the world coordinate system, and are the coordinate points of the i-th corner point on the edge feature corresponding to the local map in two world coordinate systems;
[0025] For the surface feature in the feature point cloud of the current frame, the kd tree is used to find the five closest points in the local map and construct the following plane equation:
[0026] Ax+By+Cz+D=0;
[0027] Wherein, A, B, C, and D are the coefficients of the plane equation, and x, y, and z are the coordinates of the five points in the local map that are closest to the surface features of the feature point cloud of the current frame;
[0028] Substitute the coordinates of the five points in the local map corresponding to the surface features of the feature point cloud of the current frame into the plane equation to obtain the coefficients of the plane equation, and solve the distance from the surface points of the feature point cloud of the current frame to the feature plane of the local map based on the plane equation coefficients. The calculation model is as follows:
[0029] Where x=[x p ,y p ,z p ] T The coordinates of the surface points in the feature point cloud of the current frame in the world coordinate system;
[0030] The following residual equation is constructed based on the distance between the corner point of the laser point cloud of the current frame and the edge feature corresponding to the local map and the distance between the surface point of the laser point cloud of the current frame and the plane feature corresponding to the local map:
[0031] in, is the coordinate of the i-th point in the feature point cloud of the current frame in the world coordinate system, is the coordinate of the i-th point in the feature point cloud of the current frame in the laser radar coordinate system, is the coordinate transformation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system, m is the local map in the world coordinate system, R and t are the rotation matrix and translation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system respectively;
[0032] The residual equation is combined with the Levenberg algorithm to construct the following iterative equation: (J T J+μI)·VT=-J T f
[0033] Where J is the Jacobian matrix of the residual equation relative to the iteration variable, μ is the diagonal update operator, I is the identity matrix, ΔT is the increment of the single iteration variable, f is the residual equation, is the coordinate of the i-th point in the feature point cloud of the current frame in the laser radar coordinate system, is the coordinate transformation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system, and m is the local map in the world coordinate system;
[0034] Calculate the residual sum of feature matching, the calculation model is as follows:
[0035] Among them, d εi is the residual value between the i-th corner point of the feature point cloud of the current frame and the corresponding edge feature of the local map, d Hj is the residual value between the jth surface point in the feature point cloud of the current frame and the corresponding plane feature in the local map, m and n are the number of corner points and surface points in the feature point cloud of the current frame respectively;
[0036] The diagonal update operator is updated according to the residual sum of feature matching. When the residual sum is too large, the diagonal operator is increased, otherwise the diagonal operator is decreased.
[0037] Preferably, the IMU zero bias is corrected and the IMU pre-integrator is reset, specifically:
[0038] A pre-integrator for optimizing the IMU zero bias and a pre-integrator for calculating the IMU odometer are defined respectively;
[0039] Obtain the laser odometry and update the factor graph, and determine whether the factor tree in the updated factor graph exceeds the preset value. If so, rebuild the factor graph;
[0040] Add the IMU raw data pre-integration factor, zero bias factor, and current frame laser odometry factor between the current frame laser point cloud and the previous frame laser point cloud to the updated factor graph;
[0041] The pose and velocity estimated by the pre-integrator used to optimize the IMU zero bias are used as the estimated values of the pose factor and velocity factor of the current frame, and the zero bias optimized in the previous frame is used as the estimated value of the zero bias factor of the current frame. Factor graph optimization is performed to generate the optimized and updated velocity and zero bias.
[0042] Reset the pre-integrator used to optimize the IMU zero bias using the optimized updated zero bias;
[0043] Testing the updated speed and zero bias after optimization, and reconstructing the factor graph for optimization if they do not meet the test requirements;
[0044] Resetting the pre-integrator for calculating the IMU odometer using the optimized and updated zero bias, and pre-integrating the IMU raw data after the current frame laser point cloud moment to obtain a pre-integration result;
[0045] The state of the laser point cloud at the current frame obtained by factor graph optimization and the IMU zero bias are used in combination with the pre-integration result to estimate the state after the laser point cloud at the current frame and output it as a high-frequency odometer.
[0046] Preferably, the factor graph optimization is performed on the laser point cloud of the current frame, and the normal distribution transformation algorithm is used to align the laser point cloud of the current frame with the local map composed of the historical frames to optimize and correct the global pose, specifically as follows:
[0047] When the current frame laser point cloud is determined to be a key frame, the loop detection thread is called based on the laser odometry;
[0048] Determine, according to the loop detection thread, whether there is a historical key frame in the historical key frame set that is close to the current key frame;
[0049] If yes, then determine whether the timestamp interval between the close historical key frame and the current key frame is greater than the threshold. If it is greater than the threshold, use the normal distribution transformation algorithm to match the current key frame with the close historical key frame to generate a relative coordinate transformation matrix.
[0050] The global pose is optimized and corrected using the relative coordinate transformation matrix.
[0051] Preferably, the normal distribution transformation algorithm is used to match the current key frame with the adjacent historical key frames to generate a relative coordinate transformation matrix, specifically:
[0052] The similar historical key frames are used as target point clouds for rasterization. Under the condition that each grid conforms to the normal distribution, the probability density function of the laser point cloud distribution of each grid is calculated. The calculation model is as follows:
[0053] Where D is the vector dimension, is the mean vector, Σ is the covariance matrix of the random vector;
[0054] The target point cloud is placed in each grid, and the mean of the laser point cloud data in each grid is calculated. The calculation model is as follows:
[0055] in, is the coordinates of all points in the point cloud within a single grid;
[0056] The covariance calculation formula is used to calculate the covariance of the point cloud data in each grid. The calculation model is as follows:
[0057] The current key frame is placed in each grid as the source point cloud for point cloud registration using the normal distribution transformation algorithm. The probability of each point in the source point cloud being in each grid is calculated. The calculation model is as follows:
[0058] The maximum likelihood function is obtained by multiplying the probability of each point in the source point cloud in each grid. When the maximum likelihood function reaches its maximum value, the relative coordinate transformation matrix at this time is the optimal solution. Its calculation model is as follows:
[0059] Among them, R 3×3 is the rotation matrix of the source point cloud relative to the target point cloud, t 3×1 is the translation matrix of the source point cloud relative to the target point cloud, T is the coordinate transformation matrix of the source point cloud relative to the target point cloud, is the coordinate of each point in the source point cloud in the target point cloud coordinate system, is the coordinate of each point in the source point cloud in its own coordinate system;
[0060] Taking the logarithm of both ends of the maximum likelihood function, the calculation model is as follows:
[0061] The Newton iteration method is used to solve the maximum value of the maximum likelihood function. The coordinate transformation matrix of the source point cloud relative to the target point cloud is used as the iteration variable. The coordinate transformation matrix corresponding to the maximum value of the maximum likelihood function is solved by continuously updating the iteration variable in the direction of gradient descent. The calculation model is as follows: T=T+ΔT
[0062] Where H is the Hessian matrix of the maximum likelihood function, is the gradient vector of the maximum likelihood function, and T is the coordinate transformation matrix of the source point cloud relative to the target point cloud.
[0063] A second embodiment of the present invention provides a mapping device for construction machinery, comprising:
[0064] A distortion correction unit is used to obtain environmental information collected by the vehicle-mounted multi-sensor fusion platform and perform motion distortion correction on the current frame laser point cloud of the environmental information using IMU data and IMU odometry;
[0065] a map matching unit, configured to extract point-line features and point-surface features based on the corrected curvature of each point in the laser point cloud of the current frame, and match the point-line features and the point-surface features with a local map;
[0066] A judging unit, configured to judge whether the laser point cloud of the current frame is a key frame;
[0067] IMU calibration unit, used to calibrate the IMU zero bias and reset the IMU pre-integrator;
[0068] The global optimization unit is used to perform factor graph optimization on the laser point cloud of the current frame, and to register the laser point cloud of the current frame with the local map composed of historical frames using a normal distribution transformation algorithm, so as to optimize and correct the global posture.
[0069] A third embodiment of the present invention provides a mapping device for engineering machinery, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a mapping method for engineering machinery as described in any one of the above.
[0070] A fourth embodiment of the present invention provides a computer-readable storage medium, characterized in that it stores a computer program, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement a construction machinery mapping method as described in any one of the above.
[0071] Based on the embodiment of the present invention, a mapping method, device, and readable storage medium for engineering machinery are provided. The key points of its technical solution are to use IMU data and IMU odometry to correct motion distortion of the current frame laser point cloud, extract point-line and point-surface features based on the curvature of each point in the current frame laser point cloud, match the local map with the current frame laser point cloud, and perform factor graph optimization on the key frame. The IMU zero bias is corrected based on the output laser odometry, the IMU pre-integrator is reset, and the IMU odometry is output. When the current frame laser point cloud meets the loop detection conditions, the normal distribution transformation algorithm is used to perform loop detection on the current frame laser point cloud, and the global pose is updated, which solves the mapping problem in degraded scenes of engineering machinery and realizes rapid mapping and positioning in large scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] FIG1 is a schematic flow chart of a method for mapping construction machinery according to a first embodiment of the present invention;
[0073] FIG2 is a schematic diagram of modules of a mapping device for engineering machinery provided by a second embodiment of the present invention. DETAILED DESCRIPTION
[0074] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0075] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0076] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0077] 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 "a", "an", "the" 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 otherwise.
[0078] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0079] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0080] The "first" and "second" mentioned in the embodiments are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the specific order or precedence of "first" and "second" can be interchanged where appropriate. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0081] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0082] The present invention discloses a mapping method, device, and readable storage medium for engineering machinery, aiming to solve the problems of slow mapping speed, easy degradation of mapping, and low positioning robustness of engineering machinery.
[0083] Referring to FIG. 1 , a first embodiment of the present invention provides a mapping method for construction machinery. The method may be executed by a mapping device of the construction machinery, and more particularly, by one or more processors within the mapping device, to implement at least the following steps:
[0084] S101, obtaining environmental information collected by the vehicle-mounted multi-sensor fusion platform, and performing motion distortion correction on the current frame laser point cloud of the environmental information using IMU data and IMU odometry;
[0085] In this embodiment, the mapping device can be a terminal with data processing and analysis capabilities, such as a desktop computer, a laptop computer, a server, or a workstation. The mapping device can be installed with a corresponding operating system and application software, and the functions required by this embodiment can be achieved through the combination of the operating system and application software. The multi-sensor fusion platform can include sensing devices such as IMU sensors, lidars, and laser odometers.
[0086] It should be noted that a frame of LiDAR point cloud data is obtained by scanning a full circle (360°). However, during this scanning cycle, the vehicle is also moving at high speed. This results in inaccurate point cloud coordinates obtained at different scanning angles in the scan starting coordinate system.
[0087] Specifically, in this embodiment, the IMU data can be pre-integrated first to obtain the coordinate transformation matrix of the laser radar from the end scanning moment to the start scanning moment of the current frame laser point cloud, wherein the transformation matrix is equivalent to the rotation and translation of the entire vehicle at each scanning moment relative to the start scanning moment, and then the rotation and translation are converted into a 4*4 homogeneous coordinate transformation matrix.
[0088] The coordinate transformation matrix is used to perform motion distortion correction on the laser point cloud of the current frame; wherein the coordinate transformation matrix is:
[0089] in, is the coordinate transformation matrix of each point in the laser point cloud of the current frame relative to the starting scanning time, is the coordinate transformation matrix of the laser radar from the end time of scanning to the start time of scanning, t i is the measurement time of each point in the laser point cloud of the current frame within the scanning cycle, t k is the scanning start time, t k+1 is the scanning end time, is the coordinate of each point in the laser point cloud of the current frame in the laser radar coordinate system at the start of scanning, P i The coordinates of each point in the laser point cloud of the current frame in the laser radar coordinate system at the current moment.
[0090] S102, extracting point-line features and point-surface features based on the corrected curvature of each point in the laser point cloud of the current frame, and matching the point-line features and the point-surface features with a local map;
[0091] It should be noted that the map itself is composed of features extracted from each frame. The purpose of matching is to obtain the coordinate transformation matrix of the current frame relative to the map. This coordinate transformation matrix can be used to accurately splice the current frame onto the global map.
[0092] Specifically, in this embodiment,
[0093] The curvature calculation model is called to generate the curvature of each point in the laser point cloud of the current frame. The curvature calculation model is as follows:
[0094] Among them, K is the curvature of the i-th point of the laser point cloud, d i is the distance between the i-th point and the origin of the laser radar coordinate system, di+j (j = -5, -4, ..., 5) is the distance between the five laser points before and after the i-th point and the origin of the laser radar coordinate system;
[0095] Performing feature extraction and segmentation on the laser point cloud of the current frame according to a preset curvature threshold, wherein points of the laser point cloud of the current frame whose curvature is greater than the curvature threshold are determined as corner points, and vice versa, are determined as surface points;
[0096] Performing voxel filtering on the corner points and surface points to generate a feature point cloud of the current frame;
[0097] The kd-tree is used to find the points in the local map that are closest to the corner point features in the feature point cloud of the current frame and connect them into a line, and the distance from the corner point in the feature point cloud of the current frame to the line is generated. The calculation model is as follows:
[0098] in, is the coordinate point of the i-th corner point in the feature point cloud of the current frame at time k+1 in the world coordinate system, and are the coordinate points of the i-th corner point on the edge feature corresponding to the local map in two world coordinate systems;
[0099] For the surface point features in the feature point cloud of the current frame, the five closest points are found in the local map using the kd tree, and the following plane equation is constructed: Ax+By+Cz+D=0;
[0100] Wherein, A, B, C, and D are the coefficients of the plane equation, and x, y, and z are the coordinates of the five points in the local map that are closest to the surface features of the feature point cloud of the current frame;
[0101] Substitute the coordinates of the five points in the local map corresponding to the surface features of the feature point cloud of the current frame into the plane equation to obtain the coefficients of the plane equation, and solve the distance from the surface points of the feature point cloud of the current frame to the feature plane of the local map based on the plane equation coefficients. The calculation model is as follows:
[0102] Where x=[x p ,y p ,z p ] T The coordinates of the surface points in the feature point cloud of the current frame in the world coordinate system;
[0103] The following residual equation is constructed based on the distance between the corner point of the laser point cloud of the current frame and the edge feature corresponding to the local map and the distance between the surface point of the laser point cloud of the current frame and the plane feature corresponding to the local map:
[0104] in, is the coordinate of the i-th point in the feature point cloud of the current frame in the world coordinate system, is the coordinate of the i-th point in the feature point cloud of the current frame in the laser radar coordinate system, is the coordinate transformation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system, m is the local map in the world coordinate system, R and t are the rotation matrix and translation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system respectively;
[0105] The residual equation is combined with the Levenberg algorithm to construct the following iterative equation: (J T J+μI)·VT=-J T f
[0106] Where J is the Jacobian matrix of the residual equation relative to the iteration variable, μ is the diagonal update operator, I is the identity matrix, ΔT is the increment of the single iteration variable, f is the residual equation, is the coordinate of the i-th point in the feature point cloud of the current frame in the laser radar coordinate system, is the coordinate transformation matrix of the i-th point of the feature point cloud of the current frame from the lidar coordinate system to the world coordinate system, and m is the local map in the world coordinate system;
[0107] Calculate the residual sum of feature matching, the calculation model is as follows:
[0108] Among them, d εi is the residual value between the i-th corner point of the feature point cloud of the current frame and the corresponding edge feature of the local map, d Hj is the residual value between the jth surface point in the feature point cloud of the current frame and the corresponding plane feature in the local map, m and n are the number of corner points and surface points in the feature point cloud of the current frame respectively;
[0109] The diagonal update operator is updated according to the residual sum of feature matching. When the residual sum is too large, the diagonal operator is increased, otherwise the diagonal operator is decreased.
[0110] S103, determining whether the current frame laser point cloud is a key frame;
[0111] It should be noted that the key frame is determined based on distance. For example, if the distance between the current frame and the previous key frame exceeds d, the current frame is determined to be a key frame. In this embodiment, the data collected by the laser odometer can be used for determination. Of course, in other embodiments, other methods can also be used for determination. No specific limitations are made here, but these solutions are all within the scope of protection of the present invention.
[0112] S104, when it is determined that the current frame laser point cloud is a non-key frame, correct the IMU zero bias and reset the IMU pre-integrator;
[0113] A pre-integrator for optimizing the IMU zero bias and a pre-integrator for calculating the IMU odometer are defined respectively;
[0114] Obtain the laser odometry and update the factor graph, and determine whether the factor tree in the updated factor graph exceeds a preset value (the preset value can be but is not limited to 100). If so, rebuild the factor graph;
[0115] Add the IMU raw data pre-integration factor, zero bias factor, and current frame laser odometry factor between the current frame laser point cloud and the previous frame laser point cloud to the updated factor graph;
[0116] The pose and velocity estimated by the pre-integrator used to optimize the IMU zero bias are used as the estimated values of the pose factor and velocity factor of the current frame, and the zero bias optimized in the previous frame is used as the estimated value of the zero bias factor of the current frame. Factor graph optimization is performed to generate the optimized and updated velocity and zero bias.
[0117] Reset the pre-integrator used to optimize the IMU zero bias using the optimized updated zero bias;
[0118] Testing the updated speed and zero bias after optimization, and reconstructing the factor graph for optimization if they do not meet the test requirements;
[0119] Resetting the pre-integrator for calculating the IMU odometer using the optimized and updated zero bias, and pre-integrating the IMU raw data after the current frame laser point cloud moment to obtain a pre-integration result;
[0120] The state of the laser point cloud at the current frame obtained by factor graph optimization and the IMU zero bias are used in combination with the pre-integration result to estimate the state after the laser point cloud at the current frame and output it as a high-frequency odometer.
[0121] S105, when it is determined that the laser point cloud of the current frame is a key frame, factor graph optimization is performed on the laser point cloud of the current frame, and the normal distribution transformation algorithm is used to align the laser point cloud of the current frame with the local map composed of historical frames to optimize and correct the global pose.
[0122] Specifically, in this embodiment:
[0123] When the current frame laser point cloud is determined to be a keyframe, the loop detection thread is called based on the laser odometry. It should be noted that even when the current frame is detected as a keyframe, the loop detection thread still needs to be determined based on the laser odometry to avoid loop detection for each keyframe, which may lead to insufficient computing power.
[0124] Determine, according to the loop detection thread, whether there is a historical key frame in the historical key frame set that is close to the current key frame;
[0125] If yes, then determine whether the timestamp interval between the close historical key frame and the current key frame is greater than the threshold. If it is greater than the threshold, use the normal distribution transformation algorithm to match the current key frame with the close historical key frame to generate a relative coordinate transformation matrix.
[0126] The global pose is optimized and corrected using the relative coordinate transformation matrix.
[0127] In a possible embodiment of the present invention, the normal distribution transformation algorithm is used to match the current key frame with the adjacent historical key frames to generate a relative coordinate transformation matrix, specifically:
[0128] The similar historical key frames are used as target point clouds for rasterization. Under the condition that each grid conforms to the normal distribution, the probability density function of the laser point cloud distribution of each grid is calculated. The calculation model is as follows:
[0129] Where D is the vector dimension, is the mean vector, Σ is the covariance matrix of the random vector;
[0130] The target point cloud is placed in each grid, and the mean of the laser point cloud data in each grid is calculated. The calculation model is as follows:
[0131] in, is the coordinates of all points in the point cloud within a single grid;
[0132] The covariance calculation formula is used to calculate the covariance of the point cloud data in each grid. The calculation model is as follows:
[0133] The current key frame is placed in each grid as the source point cloud for point cloud registration using the normal distribution transformation algorithm. The probability of each point in the source point cloud being in each grid is calculated. The calculation model is as follows:
[0134] The maximum likelihood function is obtained by multiplying the probability of each point in the source point cloud in each grid. When the maximum likelihood function reaches its maximum value, the relative coordinate transformation matrix at this time is the optimal solution. Its calculation model is as follows:
[0135] Among them, R 3×3 is the rotation matrix of the source point cloud relative to the target point cloud, t 3×1 is the translation matrix of the source point cloud relative to the target point cloud, T is the coordinate transformation matrix of the source point cloud relative to the target point cloud, is the coordinate of each point in the source point cloud in the target point cloud coordinate system, is the coordinate of each point in the source point cloud in its own coordinate system;
[0136] Taking the logarithm of both ends of the maximum likelihood function, the calculation model is as follows:
[0137] The Newton iteration method is used to solve the maximum value of the maximum likelihood function. The coordinate transformation matrix of the source point cloud relative to the target point cloud is used as the iteration variable. The coordinate transformation matrix corresponding to the maximum value of the maximum likelihood function is solved by continuously updating the iteration variable in the direction of gradient descent. The calculation model is as follows: T=T+ΔT
[0138] Where H is the Hessian matrix of the maximum likelihood function, is the gradient vector of the maximum likelihood function, and T is the coordinate transformation matrix of the source point cloud relative to the target point cloud.
[0139] Referring to FIG. 2 , a second embodiment of the present invention provides a mapping device for engineering machinery, comprising:
[0140] The distortion correction unit 201 is used to obtain environmental information collected by the vehicle-mounted multi-sensor fusion platform and perform motion distortion correction on the current frame laser point cloud of the environmental information using IMU data and IMU odometry;
[0141] A map matching unit 202 is configured to extract point-line features and point-surface features based on the corrected curvature of each point in the laser point cloud of the current frame, and match the point-line features and the point-surface features with a local map;
[0142] A judging unit 203 is configured to judge whether the laser point cloud of the current frame is a key frame;
[0143] IMU calibration unit 204, used to calibrate the IMU zero bias and reset the IMU pre-integrator;
[0144] The global optimization unit 205 is used to perform factor graph optimization on the laser point cloud of the current frame, and to register the laser point cloud of the current frame with the local map composed of historical frames using a normal distribution transformation algorithm, so as to optimize and correct the global posture.
[0145] A third embodiment of the present invention provides a mapping device for engineering machinery, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a mapping method for engineering machinery as described in any one of the above.
[0146] A fourth embodiment of the present invention provides a computer-readable storage medium, characterized in that it stores a computer program, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement a construction machinery mapping method as described in any one of the above.
[0147] Based on the mapping, method, device, and readable storage medium for engineering machinery provided by the embodiments of the present invention, the key points of its technical solution are to use IMU data and IMU odometry to correct motion distortion of the current frame laser point cloud, extract point-line and point-surface features based on the curvature of each point in the current frame laser point cloud, match the local map with the current frame laser point cloud, and perform factor graph optimization on the key frame. According to the output laser odometry, the IMU zero bias is corrected, the IMU pre-integrator is reset, and the IMU odometry is output. When the current frame laser point cloud meets the loop detection conditions, the normal distribution transformation algorithm is used to perform loop detection on the current frame laser point cloud, and the global pose is updated, which solves the mapping problem in degraded scenes of engineering machinery and realizes rapid mapping and positioning in large scenes.
[0148] For example, the computer programs described in the third and fourth embodiments of the present invention may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the mapping device for implementing an engineering machine. For example, the apparatus described in the second embodiment of the present invention.
[0149] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor serves as the control center of the method for mapping an engineering machine, utilizing various interfaces and circuits to connect the various components of the method for mapping an engineering machine.
[0150] The memory can be used to store the computer program and / or module. The processor implements various functions of a method for mapping engineering machinery by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, a text conversion function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0151] Wherein, if the implemented module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of each of the above-mentioned method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0152] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive effort.
[0153] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for constructing a map of a construction machinery, characterized in that, Including: Obtain the environmental information collected by the vehicle-mounted multi-sensor fusion platform, and use the IMU data and IMU odometer to perform motion distortion correction on the current frame of lidar point cloud of the environmental information; Extract point-line features and point-plane features according to the curvature of each point of the corrected current frame of lidar point cloud, and match the point-line features and the point-plane features with the local map; Judge whether the current frame of lidar point cloud is a key frame; If not, correct the IMU zero bias and reset the IMU pre-integrator; If so, perform factor graph optimization on the current frame of lidar point cloud, and register the current frame of lidar point cloud with the local map composed of historical frames using the normal distribution transformation algorithm, and optimize and correct the global pose.
2. The mapping method for construction machinery according to claim 1, characterized in that The obtaining the environmental information collected by the vehicle-mounted multi-sensor fusion platform and using the IMU data and IMU odometer to perform motion distortion correction on the current frame of lidar point cloud of the environmental information is specifically: Perform pre-integration on the IMU data to obtain the coordinate transformation matrix of the lidar from the end scan time to the start scan time of the current frame of lidar point cloud; Perform motion distortion correction on the current frame of lidar point cloud using the coordinate transformation matrix; wherein, the coordinate transformation matrix is: Among them, T i k is the coordinate transformation matrix of each point of the current frame of laser point cloud relative to the starting scanning moment, is the coordinate transformation matrix of the lidar from the scanning end time to the scanning start time, t i is the measurement time of each point in the current frame of lidar point cloud during the scanning period, t k is the scanning start time, t k+1 is the scanning end time, is the coordinate of each point in the current frame of lidar point cloud in the lidar coordinate system at the starting scanning moment, P i is the coordinate of each point in the current frame of lidar point cloud in the lidar coordinate system at the current moment.
3. The mapping method of a construction machinery according to claim 1, wherein, The extracting point-line features and point-plane features according to the curvature of each point of the corrected current frame of lidar point cloud and matching the point-line features and the point-plane features with the local map is specifically: Call the curvature calculation model to generate the curvature of each point in the current frame of the laser point cloud. The specific curvature calculation model is as follows: where K is the curvature of the i-th point of the laser point cloud, and d i is the distance of the i-th point from the origin of the lidar coordinate system, and di + j (j = -5, -4,..., 5) is the distance of the five laser points before and after the i-th point from the origin of the lidar coordinate system; Perform feature extraction and division on the current frame of lidar point cloud according to a preset curvature threshold. Points with curvatures greater than the curvature threshold among the points of the current frame of lidar point cloud are determined as corner points, and vice versa as plane points; Perform voxel filtering on the corner points and plane points to generate the current frame of feature point cloud; Use the kd-tree to find the points in the local map that are closest to the corner features in the current frame feature point cloud and connect them into a line, and generate the distance from the corner points in the current frame feature point cloud to this line. The calculation model is as follows: Among them, is the coordinate point of the $i$-th corner point in the current frame feature point cloud at the $(k + 1)$-th moment in the world coordinate system, and Are the coordinate points in the two world coordinate systems on the edge feature corresponding to the i-th corner point in the local map; For the plane point features in the current frame of feature point cloud, use the kd tree to find the five closest points in the local map and construct the following plane equation: Ax + By + Cz + D = 0; Where, A, B, C, D are the coefficients of the plane equation, and x, y, z are the coordinates of the five points closest to the plane point feature of the current frame of feature point cloud in the local map; Substitute the five-point coordinates corresponding to the surface features of the current frame feature point cloud in the local map into the plane equation to obtain the coefficients of the plane equation, and solve the distance from the surface points of the current frame feature point cloud to the local map feature plane according to the plane equation coefficients. The calculation model is as follows: where x = [x p , y p , z p T is the coordinate of the surface point in the current frame feature point cloud in the world coordinate system; Construct the following residual equation based on the distance between the corner points of the current-frame lidar point cloud and the corresponding edge features in the local map, and the distance between the plane points of the current-frame lidar point cloud and the corresponding plane features in the local map: Among them, is the coordinate of the i-th point of the current frame feature point cloud in the world coordinate system, is the coordinate of the i-th point of the current frame feature point cloud in the lidar coordinate system, Is the coordinate transformation matrix of the i-th point of the current frame of feature point cloud from the lidar coordinate system to the world coordinate system, m is the local map in the world coordinate system, and R and t are the rotation matrix and translation matrix of the i-th point of the current frame of feature point cloud from the lidar coordinate system to the world coordinate system respectively; Use the residual equation combined with the Levenberg algorithm to construct the following iterative equation: (J T (J + μI)·VT = -J T f Among them, J is the Jacobian matrix of the residual equation with respect to the iterative variable, μ is the diagonal update operator, I is the identity matrix, ΔT is the single-iteration variable increment, and f is the residual equation. is the coordinate of the i-th point of the current frame feature point cloud in the lidar coordinate system, Is the coordinate transformation matrix of the i-th point of the current frame of feature point cloud from the lidar coordinate system to the world coordinate system, and m is the local map in the world coordinate system; Calculate the total residual of feature matching. The calculation model is as follows: Among them, d εi is the residual value between the i-th corner point of the current frame feature point cloud and the corresponding edge feature of the local map, and d Hj is the residual value between the j-th plane point of the current frame feature point cloud and the corresponding plane feature of the local map. m and n are the numbers of corner points and plane points in the current frame feature point cloud respectively; Update the diagonal update operator according to the total residual of feature matching. When the total residual is too large, increase the diagonal operator, and vice versa decrease the diagonal operator.
4. A mapping method for construction machinery according to claim 1, characterized in that, The correcting the IMU zero bias and resetting the IMU pre-integrator is specifically: Define a pre-integrator for optimizing the IMU zero bias and a pre-integrator for calculating the IMU odometer respectively; Obtain the laser odometer and update the factor graph, and judge whether the factor tree in the updated factor graph exceeds a preset value. If it exceeds, reconstruct the factor graph; Add the IMU raw data pre-integration factor, bias factor, and the current frame laser odometry factor between the current frame laser point cloud and the previous frame laser point cloud into the updated factor graph; Use the pose and velocity estimated by the pre-integrator for optimizing the IMU bias as the estimated values of the current frame pose factor and the current frame velocity factor, and use the optimized bias of the previous frame as the estimated value of the current frame bias factor to perform factor graph optimization to generate the optimized and updated velocity and bias; Reset the pre-integrator for optimizing the IMU bias using the optimized and updated bias; Check the optimized and updated velocity and bias. If the check requirements are not met, reconstruct the factor graph for optimization; Reset the IMU odometry pre-integrator using the optimized and updated bias, and perform pre-integration on the IMU raw data after the current frame laser point cloud time to obtain the pre-integration result; Use the state at the current frame laser point cloud time and the IMU bias obtained by factor graph optimization, combine with the pre-integration result, estimate the state after the current frame laser point cloud time, and output it as the high-frequency odometry.
5. The mapping method for construction machinery according to claim 1, characterized in that The factor graph optimization of the current frame laser point cloud, and the registration of the current frame laser point cloud and the local map composed of historical frames using the normal distribution transformation algorithm to optimize and correct the global pose are specifically as follows: When it is determined that the current frame laser point cloud is a key frame, call the loop detection thread based on the laser odometry; Judge whether there is a historical key frame similar to the current key frame in the set of historical key frames according to the loop detection thread; If so, judge whether the time stamp interval between the similar historical key frame and the current key frame is greater than the threshold. If it is greater than the threshold, use the normal distribution transformation algorithm to match the current key frame and the similar historical key frame to generate a relative coordinate transformation matrix; Optimize and correct the global pose using the relative coordinate transformation matrix.
6. The mapping method for construction machinery according to claim 5, wherein The use of the normal distribution transformation algorithm to match the current key frame and the similar historical key frame to generate a relative coordinate transformation matrix is specifically as follows: Rasterize similar historical key frames as the target point cloud. Under the condition that each grid conforms to the normal distribution, calculate the probability density function of the laser point cloud distribution of each grid, and its calculation model is as follows: where D is the vector dimension, is the mean vector, and ∑ is the covariance matrix of the random vector; Put the target point cloud into each grid, and calculate the mean value of the laser point cloud data in each grid. The calculation model is as follows: Among them, is the coordinates of all points in the point cloud within a single grid; The covariance of the point cloud data at the midpoints of each grid is calculated using the covariance calculation formula, and its calculation model is as follows: Put the current key frame into each grid as the source point cloud for point cloud registration by the normal distribution transformation algorithm, and calculate the probability of each point in the source point cloud in each grid. The calculation model is as follows: Multiply the probabilities of each point in the source point cloud in each grid to obtain the maximum likelihood function. When the maximum likelihood function reaches its maximum value, the relative coordinate transformation matrix at this time is the optimal solution, and its calculation model is as follows: Among them, R 3×3 is the rotation matrix of the source point cloud relative to the target point cloud, t 3×1 is the translation matrix of the source point cloud relative to the target point cloud, and T is the coordinate transformation matrix of the source point cloud relative to the target point cloud, are the coordinates of each point in the source point cloud in the coordinate system of the target point cloud, is the coordinates of each point in the source point cloud in its own coordinate system; Taking the logarithm of both ends of the maximum likelihood function, its calculation model body is as follows: The maximum value of the maximum likelihood function is solved using the Newton iteration method. The coordinate transformation matrix of the source point cloud relative to the target point cloud is used as the iteration variable, and the coordinate transformation matrix corresponding to the maximum value of the maximum likelihood function is solved by continuously updating the iteration variable along the direction of gradient descent. The calculation model is as follows: T = T + ΔT where H is the Hessian matrix of the maximum likelihood function, is the gradient vector of the maximum likelihood function, and T is the coordinate transformation matrix of the source point cloud relative to the target point cloud.
7. A mapping device for construction machinery, characterized in that, Includes: A distortion correction unit for obtaining the environmental information collected by the vehicle-mounted multi-sensor fusion platform, and using the IMU data and the IMU odometry to perform motion distortion correction on the current frame laser point cloud of the environmental information; A map matching unit for extracting point-line features and point-plane features according to the curvature of each point of the corrected current frame laser point cloud, and matching the point-line features and the point-plane features with the local map; A judgment unit for judging whether the current frame laser point cloud is a key frame; An IMU correction unit for correcting the IMU bias and resetting the IMU pre-integrator; A global optimization unit is configured to perform factor graph optimization on the current frame of lidar point cloud, and register the local map formed by the current frame of lidar point cloud and historical frames by using the normal distribution transform algorithm, so as to optimize and correct the global pose.
8. A mapping device for construction machinery, characterized in that, It includes a memory and a processor. A computer program is stored in the memory and can be executed by the processor to implement a mapping method for a construction machinery according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored and can be executed by the processor of the device where the computer-readable storage medium is located to implement a mapping method for a construction machinery according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-source information adaptive fusion positioning method and system
CN113029137A
Mapping method and system of tight coupling laser radar and inertial odometer
CN114526745A
Positioning mapping method and device based on template matching and laser inertial navigation loose coupling
CN115077519A
Crawler-type mobile machine, established trajectory tracking control method and device thereof and medium
CN115480579A
Vehicle positioning method and device, storage medium and positioning system
CN115494533A
Cited By
Robot attitude estimation method and device under non-flat terrain and robot
CN119048547A
Positioning method and device, computing equipment and program product
CN119178433A
High-precision railway map generation method and system based on one-way trajectory correction
CN119492370A
AGV natural scene positioning method and system based on 3D laser radar
CN120085317A
Laser radar and IMU (Inertial Measurement Unit) combined calibration method and device for mine
CN120161448A
