A dynamic obstacle removal method for low-beam 3D lidar

By de-distorting, ground segmenting and depth map projection methods for laser point cloud data, and adjusting the resolution based on lidar distance information, the problem of dynamic obstacle removal in low-beam 3D lidar is solved, and efficient dynamic object removal and Static map construction.

CN116879870BActive Publication Date: 2024-08-23WUHAN TRONIC ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310678823.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2024-08-23
Estimated Expiration
2043-06-08

AI Technical Summary

Technical Problem

Existing laser SLAM methods are difficult to effectively remove dynamic obstacles in outdoor dynamic environments, resulting in reduced positioning accuracy and map deviation. Especially under low-beam 3D lidar conditions, dynamic object removal is not effective.

Method used

By de-distorting and filtering the laser point cloud data, segmenting the ground, constructing a local map and projecting it into a depth map, using lidar distance information to adjust the resolution of the depth map, combining viewpoint visibility to remove dynamic point clouds, and reducing the resolution Restore static point clouds to improve the accuracy and efficiency of dynamic obstacle removal.

Benefits of technology

It improves the accuracy and efficiency of dynamic obstacle removal on low-beam 3D lidar, reduces accidental deletions, enhances the robustness and operating efficiency of the algorithm, and ensures the construction of accurate static maps in outdoor environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116879870B
    Figure CN116879870B
Patent Text Reader

Abstract

In view of the problem that the presence of dynamic objects such as pedestrians and vehicles in the outdoor environment of mobile robots leads to the presence of trajectory afterimages of dynamic objects in the map generated by laser SLAM, which affects the subsequent positioning and path planning, the present invention proposes a dynamic obstacle removal method suitable for low-beam 3D laser radar. The method includes the following steps: first, pre-processing the three-dimensional point cloud data collected by the laser radar; then, ground segmentation is performed, and the non-ground point cloud map is projected into a depth map, and the visibility between the query frame is compared by the viewpoint visibility method to remove the trajectory afterimage; considering that the point cloud has the characteristic that the farther the distance, the sparser it is, the resolution of the depth map is adaptively adjusted according to the distance information, and the static points that were mistakenly deleted are restored by continuously reducing the resolution. Experiments have proved that this method can efficiently remove dynamic obstacles on low-beam 3D laser radars, retain complete static maps, and reduce the impact of dynamic obstacles on the SLAM system.
Need to check novelty before this filing date? Find Prior Art

Description

(I) Technical field

[0001] The present invention belongs to the field of mobile robot positioning and mapping, and in particular relates to a dynamic obstacle removal method suitable for low-beam 3D laser radar. (II) Background technology

[0002] With the development of intelligent perception and intelligent control technology, the autonomous ability of mobile robots has also been improved, and they have been widely used in various fields such as daily production, smart logistics, and disaster relief. The perception of the surrounding environment is the most important component in the field of mobile robot research and development, and its core includes real-time positioning and mapping technology (SLAM). According to the main environmental perception sensors carried by mobile robots, SLAM technology can be divided into camera-based visual SLAM and laser SLAM based on lidar. However, in outdoor environments, since cameras are easily affected by light, it is difficult to perform effective environmental perception in scenes such as darkness where light is severely disturbed, and cameras cannot obtain accurate three-dimensional information, which is not conducive to the construction of outdoor large scene maps; while lidar is not affected by ambient light and can obtain centimeter-level distance information, and performs well in tasks such as positioning and mapping and environmental perception in outdoor environments.

[0003] At present, most of the existing laser SLAM methods are basically based on indoor and fixed application scenarios. When facing outdoor unknown dynamic scenes and real-time moving dynamic obstacles (such as moving vehicles and pedestrians, etc.), their moving tracks will be left in the final generated point cloud map, and the robot cannot effectively realize positioning and mapping in dynamic scenes. The existence of dynamic objects increases the uncertainty of odometer registration, resulting in a decrease in the accuracy of attitude estimation; at the same time, the point cloud of the moving object contained in the point cloud data will be added to the final generated environment map, leaving a residual image of its moving track on the map, which is called "ghost". These "ghosts" of dynamic objects will be regarded as obstacles and block road traffic signs and other important static features, causing the constructed map to deviate from the real environment, resulting in the inability to construct an accurate environment map, affecting subsequent loop detection and navigation. Therefore, it is very necessary for mobile robots to remove the "ghosts" caused by dynamic obstacles in the environment and construct accurate static maps.

[0004] To address the above issues, the paper "Moving Object Segmentation in 3D LiDAR Data: A Learning-based Approach Exploiting Sequential Data" proposed a new CNN-based method that uses the range image generated by the 3D LiDAR point cloud and the residual image generated by the past scan as input, and the labels in the output mainly distinguish whether it is a dynamic object. However, learning-based methods perform well in a well-trained environment, but usually require a lot of data training and have high requirements for hardware equipment. They cannot be effectively promoted in different environments or different LiDAR sensors.

[0005] The paper "Remove, then Revert: Static Point cloud Map Construction using Multiresolution Range Images" proposes a method based on viewpoint visibility, which projects the point cloud map into a depth map, removes the dynamic point cloud by comparing the visibility between the query frame and the point cloud map, and then restores the mistakenly deleted static points by reducing the resolution of the depth map. However, this method uses the visible range of the LiDAR to project the depth map. When using a low-beam LiDAR, it is difficult to obtain useful information from the sparse point cloud due to the small number of beams in the vertical direction. The generated high-resolution depth map is prone to frame loss, and the removal effect of dynamic objects on the low-beam LiDAR is not good. (III) Summary of the invention

[0006] In view of the shortcomings of the existing methods, the present invention provides a dynamic obstacle removal method suitable for low-beam (such as 16-line) 3D laser radar, aiming to solve the impact of dynamic obstacles on the SLAM system when the traditional laser SLAM faces an outdoor dynamic environment. First, the laser point cloud data is dedistorted and filtered; then the processed point cloud data is ground segmented. A large part of the points in the point cloud data perceived by the 3D laser radar belong to the ground, and these ground points are static. When removing dynamic point clouds, all ground points can be set to "static" in advance to reduce the number of false dynamic point clouds and improve computing efficiency; in addition, most moving objects, such as vehicles and people, are connected to the ground. Good ground segmentation can greatly reduce the difficulty of dynamic target removal in subsequent steps; for the segmented ground point clouds, the SLAM method is used to splice them into point cloud maps, and the non-ground point cloud maps are projected into depth maps. Dynamic objects are removed by comparing the visibility of the query frame and the depth map projected by the point cloud map; finally, the static point clouds that were mistakenly deleted are restored from the dynamic point clouds by adjusting the resolution of the depth map, and the proportion of the restored static point clouds is used to determine whether to continue to reduce the resolution.

[0007] The present invention improves the removal effect of dynamic objects on low-beam 3D laser radars by performing ground segmentation on point cloud data, only projects non-ground points, and combines the distance information of laser radar, thereby reducing the situation of mistaken deletion of ground points and improving the operation efficiency; in addition, considering that when using low-resolution 3D laser radars, due to the small number of beams in the vertical direction, the sparse point cloud contains less useful information, and it is easy to lose frames after generating the depth map, which will seriously affect the output quality of the algorithm. Therefore, according to the fact that the farther the laser radar is, the sparser the point cloud is, especially on low-beam 3D laser radars, the important distance information of the laser radar is set as the weight for adjusting the resolution of the depth map, so that the image at a position closer to the laser radar has a finer resolution, while the resolution at a farther distance is low, so that the "ghost" caused by dynamic obstacles can be efficiently removed on low-beam 3D laser radars, and the use of low-beam 3D laser radars makes it possible to establish a low-cost unmanned system. A dynamic obstacle removal method suitable for low-beam 3D laser radars includes the following steps:

[0008] S1. The mobile robot collects three-dimensional point cloud data of the surrounding environment through its own 3D laser radar, and performs dedistortion and filtering on the collected point cloud data;

[0009] S2, performing ground segmentation on the processed laser point cloud into ground point cloud and non-ground point cloud;

[0010] S3, construct a local map of the segmented point cloud, perform global optimization, generate a point cloud map with global consistency, and obtain the robot's position information;

[0011] S4. Project the generated non-ground point cloud map into a depth map.

[0012] S5. Select N consecutive scans in the non-ground point cloud as query frames, adjust the resolution of the depth map corresponding to the query frame according to the lidar distance information, and remove all suspicious dynamic points in the point cloud map by comparing the visibility of the depth map of the query frame and the local map at the same resolution.

[0013] S6. By continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and whether to continue to reduce the resolution is determined according to the ratio of the number of restored static points.

[0014] In the above S1, the mobile robot collects three-dimensional point cloud data of the surrounding environment through the 3D laser radar carried by itself, and performs dedistortion and filtering on the collected point cloud data, which specifically includes the following steps:

[0015] When the posture of the mobile robot changes, there is a certain delay between the laser radar transmission and reception, which causes the relative position between the laser radar center and the detected obstacle to change. This will cause all points in a frame of point cloud to not be collected at the same position, and the collected point cloud will be distorted. Therefore, it is necessary to consider the self-motion of the mobile robot in a collection cycle and eliminate the motion distortion in each frame of point cloud.

[0016] Assume t k-1 At time t, the laser radar starts scanning for the kth time and scans to t k At the end of the moment, the point cloud collected during this period is represented by P k In other words, the so-called motion distortion correction is to change P k All point clouds are projected onto t k At this moment, in the laser radar coordinate system, the point cloud after distortion correction is obtained. First, the point cloud is sorted, and the vertical angle β and horizontal angle α of the laser point can be calculated according to the following formula:

[0017]

[0018] By combining the horizontal and vertical angular resolutions of the lidar, we can get the number of rows and columns to which each point belongs, and then sort the point cloud in the order in which it was collected.

[0019] Since the interval between two frames of point cloud data collected by the laser radar is very short, it is approximately assumed that the speed of the mobile robot is constant during this period. Let T(t) be the position transformation of the mobile robot relative to the initial position at any time t, T(t k ) is the robot position at the end of the current frame scan (t k is the end time of the kth scan). k Time, T(t m )(m<k) is known, so the current posture T(t k ):

[0020] T(t k )=T(t k-1 )·T(t k-2 ) -1 ·T(t k-1 ) (2)

[0021] At a known t k-1 ,t k After the pose at time t i (t i ∈(t k-1 ,t k )) The point i(i∈P k ) corresponds to the pose T(t k,i ) can be obtained by linear interpolation, so point i is projected to t k The coordinate X′ in the laser radar coordinate system at the moment (k,i) , and its calculation formula is:

[0022]

[0023] P k All points in the projected onto t k The k-th frame point cloud P is obtained in the radar coordinate system after eliminating motion distortion. k '.

[0024] Voxel grid filtering can reduce the amount of data without destroying the geometric structure of the point cloud data itself. According to the size of the input point cloud, the maximum and minimum values ​​of the point cloud on the X, Y, and Z coordinate axes are determined, which are denoted by x and z, respectively. max ,y max 、z max 、x min ,y min 、z min . The size of the minimum enclosing grid is determined based on the maximum and minimum values, and the length, width and height are l respectively. x , l y , l z , as shown below:

[0025]

[0026] Set the side length R of the voxel grid, divide the X, Y, and Z coordinate axes into M, N, and L parts respectively, and calculate the number of grids S:

[0027] S=M*N*L (5)

[0028] Calculate the grid number h for each point x 、h y 、h z , determine which grid the point cloud falls into and calculate the centroid (c x 、c y 、c z ), with the centroid representing all points in the grid, the centroid is expressed as:

[0029]

[0030] Where n is the number of point clouds in a grid.

[0031] When using a low-beam 3D lidar, since the point cloud data itself is relatively sparse, a smaller grid size is used to ensure that the geometric structure in the point cloud is not lost.

[0032] In the above-mentioned S2, the processed laser point cloud is ground segmented into ground point cloud and non-ground point cloud, which specifically includes the following steps:

[0033] If the laser radar with low beam has 16 lines, its vertical resolution is -15° to +15°, and only the laser beam below the horizontal direction can scan the ground information. The laser radar obtains a cluster of point clouds P at time t. t ={p1,p2,.....p n}, where p i Represents the point cloud P t The horizontal resolution of the laser radar is res1, and the number of vertical lines is 16. The resolution of the projection is 360 / res1×16, that is, the number of rows r of the projected depth map is determined by the number of laser radar lines, and the number of columns c is determined by the horizontal resolution of the emitted point cloud. The data stored in each pixel is the Euclidean distance τ of the laser radar detection object. i =||p i ||.

[0034] Assume that the point where the adjacent laser beam hits the obstacle is P A , P B , P C , x, y, z are the coordinates of the laser point in space, then the angle α between two adjacent points in the vertical direction can be calculated using trigonometric rules:

[0035]

[0036] Where P i (z)(i=B, C) represents the coordinate of the point cloud in the z-axis direction. The calculation formulas of Δx and Δy are as follows:

[0037]

[0038] Where P i (x)(i=A, B, C) represents the coordinate of the point cloud in the x-axis direction, P i (y)(i=A, B, C) represents the coordinate of the point cloud in the y-axis direction.

[0039] Because the scanning range of the 16-line laser radar is [-15°, 15°], it can be known that the ground point must be in the range of [-15°, -1°]. Within this range, an angle threshold Δα and a beam threshold are set. If the angle is less than the angle threshold Δα within the specified range, it is marked as a ground point.

[0040] In the above S3, the segmented point cloud is used to construct a local map, perform global optimization, generate a point cloud map with global consistency, and obtain the position and posture information of the robot, which specifically includes the following steps:

[0041] The construction process of the local map is to solve the position transformation T of the scan frame formed by the lidar scanning data relative to the local map. ξ , the conversion process is shown as follows:

[0042]

[0043] In the formula, P represents a laser point cloud scanned by the laser radar; represents the rotation matrix; ξ x ,ξ y ,ξ z Represents the translation in the x, y, and z directions, that is, the coordinate difference relative to the origin of the local map;

[0044] Insert the scanned frame into the local map, which will generate a probability grid map:

[0045] M:rZ×rZ→[p min ,p max ] (10)

[0046] Where M represents the probability map; rZ represents the size of each grid in the probability grid; p min and p max Indicates the range of probability values;

[0047] Obtaining the position of the scanned frame relative to the local map can be regarded as a nonlinear least squares problem, as shown in the following formula:

[0048]

[0049] Where M s is a smooth function; h k Expressed as the coordinates of the point in the scanning frame coordinate system; T ξ It is expressed as the position of the scan frame coordinate system relative to the local map coordinate system;

[0050] The point cloud after ground segmentation is iteratively incrementally constructed into a global map, and the feature point cloud D of the k-1th frame is used to k-1 and the feature point cloud D of the kth frame k The pose transformation relationship is used to calculate the local submap of the kth frame Assume that the feature point cloud D of the k-1th frame k-1 The corresponding local submap projected in the global coordinate system is Through inter-frame matching of point clouds, the pose transformation matrix between the feature point cloud of the kth frame and the point cloud of the k-1th frame can be obtained. According to the pose transformation matrix, the feature point cloud D of the current frame can be k Projected in the global coordinate system, the estimated value of the local submap of the kth frame is obtained Right now:

[0051]

[0052] The observation value can be obtained by matching the local submap of the current frame with the previous frame. The error term between the estimated value and the observed value is used as the output in real time and solved by the graph optimization method. The optimized local submap is compared with the local submap of the previous frame. The overlapping feature point clouds are used as the global sub-map of the current frame and put into the kd-tree where the historical global sub-map is located to construct the global map. At the same time, the current local submap Put it into kd-tree for the next frame feature point cloud to perform Scan to Map operation.

[0053] In the above-mentioned S4, projecting the generated non-ground point cloud map into a depth map specifically includes the following steps:

[0054] In order to remove dynamic objects by comparing the visibility of the point cloud map and the depth map projected by the query frame, the point cloud map must first be projected into a depth map and the large-scale map P M, and a fixed-size depth map is obtained. In the projection process, the physical meaning of the depth map resolution is the angular resolution in the horizontal and vertical directions. When it is a low-beam 16-line laser radar, its horizontal viewing angle is 360°, the vertical viewing angle is 30° (-15°~15°), and the resolution is 1°, that is, a single pixel represents 1° horizontal field of view and vertical field of view, so the size of the depth map is 360×30.

[0055] Each pixel value in the depth map is a visible point cloud in the map point cloud at a certain perspective. Through the field of view of the laser radar, the point cloud P M Split into multiple visible map point clouds Its expression is:

[0056]

[0057] In the formula, Represented in point cloud collection The point cloud collection with the closest distance to the pixel.

[0058] Define visible map point cloud The equivalent depth map of

[0059]

[0060] In the formula, represents the projection intensity value of the pixel in the i-th row and j-th column at the k-th frame viewing angle; m represents the number of pixels in the horizontal direction, which is obtained by dividing the horizontal field of view by the horizontal resolution; n represents the number of pixels in the vertical direction, which is obtained by dividing the vertical field of view by the vertical resolution;

[0061] but The projected two-dimensional depth image is Where (x, y) represents the pixel coordinates in the image, and the corresponding distance value can be calculated by the following formula:

[0062]

[0063] Where N is the number of lines scanned by the laser radar, d i (x, y) represents the distance value at (x, y) on the i-th line, which means that at a certain pixel (x, y), the nearest distance value among all scan lines is taken as the distance value of the pixel.

[0064] In the above S5, N consecutive scans in the non-ground point cloud are selected as query frames, and the resolution of the depth map corresponding to the query frame is adjusted according to the laser radar distance information. By comparing the visibility of the depth map of the query frame and the local map at the same resolution, all suspicious dynamic points in the point cloud map are removed, which specifically includes the following steps:

[0065] Select N scans in the point cloud data to form a query frame P Q , perform batch dynamic point removal (BR). According to the relative pose of the k-th frame query frame Project the query frame onto the local map In the same coordinate system, the depth map of the query frame and the local map are set to the same resolution. When setting the resolution of the depth map, the distance information of the lidar is used as the weight for adaptively adjusting the resolution of the depth map, so that the depth maps in different distance intervals have different resolutions.

[0066] Specifically, let d i,j Represents the distance value of the jth laser point in the i-th scan of the laser radar, then the weight w can be defined i,j for:

[0067]

[0068] Next, define the number of resolution layers L and divide the distance range into L intervals Where 1≤l≤L, and Respectively represent the distance range of the lth layer. For the lth layer pixel (i, j), its corresponding pixel value r i,j It is expressed as follows:

[0069]

[0070] In the formula, Represents the weight of pixel (i, j) in the depth map at layer l, and the calculation formula is as follows:

[0071]

[0072] According to the above formula, when the distance value d of pixel (i, j) i,j Falling in the range When it is inside, its weight in layer l is 1 / d i,j , that is, the closer the distance, the greater the weight and the corresponding resolution; conversely, the farther the distance, the lower the corresponding resolution. When the distance is outside the range of this layer, the corresponding weight is 0, that is, it does not participate in the depth map construction of this layer.

[0073] The query frame The corresponding depth map The value of each point on For point cloud maps Set depth maps of the same resolution The value of each point is In this way, the resolution of the depth map can be adjusted according to the weights of different distance intervals, so that the resolution of the depth map is finer at locations closer to the lidar.

[0074] Adjust the depth map corresponding to the local map and the query frame to the maximum resolution and perform matrix subtraction to obtain:

[0075]

[0076] For any point If its corresponding The value is greater than the set threshold τ D , then the point is considered to be a dynamic point and is added to In , the process is:

[0077]

[0078] Through dynamic subsets, you can calculate and obtain mutually exclusive static subsets

[0079] According to the continuous N scans in the robot's motion direction, for each scan It is passed through the visibility of the depth map and p M Compare and count the number of times each point is marked as a static point and a dynamic point, recorded as n S and n D After completing all comparisons, the evaluation score s(p M ), and its calculation formula is:

[0080] s(p M )=α S n S +α D n D (twenty one)

[0081] In the formula, α S is the static weight coefficient, which is a positive value; α D is the dynamic weight coefficient, which is a negative value.

[0082] Therefore, according to the evaluation score and the threshold τ S The dynamic point cloud subset can be obtained as:

[0083]

[0084] In the above S6, by continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and according to the ratio of the number of restored static points, it is decided whether to continue to reduce the resolution, which specifically includes the following steps:

[0085] After the dynamic point cloud is removed, the point cloud set P M Divided into two mutually exclusive subsets: static point cloud subset P SM and the dynamic point cloud subset P DM , expressed as:

[0086]

[0087] In high-resolution depth maps, it is easy to mistakenly delete the boundaries of objects or other static points. When the resolution of the depth map is reduced, the number of mistaken deletions will be significantly reduced. Therefore, after comparing the visibility of the depth map at the highest resolution, the mistakenly deleted static points are removed from the dynamic point cloud subset P by continuously reducing the resolution of the depth map. DM Add to the static point cloud subset P SM middle.

[0088] Assume that in the first round of static point recovery at the highest resolution, the number of static points recovered is n1, and in the i-th (i>1) round of recovery, the number of static points recovered is n i , then the number of static points restored in the i-th round accounts for the proportion of the first round, that is, the static point recovery rate in the i-th round is In the i-th round of restoration, the resolution of the depth map is r i If the recovery rate p i is greater than the preset threshold α, that is, the ratio of the number of static points restored in this round to the number of static points restored in the first round is greater than the preset threshold, which means that there are still a large number of static points in the dynamic point cloud, and it is necessary to continue to reduce the point resolution according to the visibility information and perform the next round of iteration to achieve a better recovery effect; on the contrary, when the recovery rate p is i When it is less than the threshold α, it means that there is basically no static point cloud in the dynamic point cloud, and the resolution should be reduced to avoid wasting computing resources.

[0089] The present invention has the following beneficial effects:

[0090] 1. The present invention avoids the problem of poor posture accuracy caused by motion distortion by dedistorting and filtering the point cloud acquired by the lidar, removes some useless information in the point cloud, and improves the quality of the point cloud data. The accurate posture can reduce the projection deviation, thereby avoiding the accidental deletion of static point clouds and the missed deletion of dynamic point clouds.

[0091] 2. Since the ground points are static, the present invention can set all ground points as "static" when removing dynamic point clouds by performing ground segmentation on the point cloud data, thereby reducing the number of false dynamic point clouds and improving the robustness and operating efficiency of the algorithm; at the same time, it avoids the situation where some ground points are treated as dynamic objects and are "mistakenly deleted" when the incident light of the laser radar is close to the ground.

[0092] 3. The present invention projects the point cloud map into a depth map, and compares the depth map projected by the query frame with the viewpoint visibility to detect and remove the "ghost" formed by the trajectory afterimage of the moving object; and sets weights according to the distance information of the laser radar to adaptively adjust the resolution of the depth map, so that the depth map resolution at a position closer to the laser radar is high, and the depth map resolution at a farther position is relatively lower; so that the "ghost" caused by dynamic obstacles can be efficiently detected and removed on the low-beam 3D laser radar, eliminating the influence of moving objects on the positioning and path planning of the mobile robot. (IV) Description of the drawings

[0093] Figure 1 A flow chart of a dynamic obstacle removal method for low-beam 3D LiDAR;

[0094] Figure 2 A block diagram of a dynamic obstacle removal method for low-beam 3D LiDAR;

[0095] Figure 3 3D point cloud rendering with dynamic obstacle trajectory afterimages;

[0096] Figure 4 Depth map projected from the local point cloud map

[0097] Figure 5 The depth map projected by the query frame

[0098] Figure 6 Disparity map formed by the local map and the query frame

[0099] Figure 7 The effect of removing the afterimage of dynamic obstacle trajectory using the original method;

[0100] Figure 8 The effect diagram of removing the afterimage of the dynamic obstacle track by using the method of the present invention. (V) Specific implementation methods

[0101] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.

[0102] The present invention provides a dynamic obstacle removal method suitable for low-beam 3D laser radar, such as Figure 1 As shown, the following steps are included:

[0103] S1. The mobile robot collects three-dimensional point cloud data of the surrounding environment through its own 3D laser radar, and performs dedistortion and filtering on the collected point cloud data;

[0104] S2, performing ground segmentation on the pre-processed laser point cloud into ground point cloud and non-ground point cloud;

[0105] S3, construct a local map of the segmented point cloud, perform global optimization, generate a point cloud map with global consistency, and obtain the robot's position information;

[0106] S4, projecting the generated non-ground point cloud map into a depth map, and adaptively adjusting the resolution of the depth map according to the distance information of the laser radar;

[0107] S5, selecting N consecutive scans in the non-ground point cloud as a query frame, converting the point cloud map to the coordinate system of the query frame, and removing all suspicious dynamic points in the point cloud map by comparing the visibility of the depth map of the query frame and the local map at the same resolution;

[0108] S6. By continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and the ratio of the number of restored static points is used as a judgment condition for whether to continue to reduce the resolution;

[0109] In the above S1, the mobile robot collects three-dimensional point cloud data of the surrounding environment through the 3D laser radar carried by itself, and performs dedistortion and filtering on the collected point cloud data, which specifically includes the following steps:

[0110] When the posture of the mobile robot changes, there is a certain delay between the laser radar transmission and reception, which causes the relative position between the center of the laser radar and the detected obstacle to change, and the corresponding series of laser beams represent the geometric features of the environmental contour distorted. When the laser radar calculates the coordinates of the laser points, it is based on the laser radar's own coordinate system at the moment when the laser beam is received. Therefore, during the movement of the mobile robot, the reference coordinate system of each column of laser points is different, which will cause all points in a frame of point cloud to not be collected at the same position, and the collected point cloud will be distorted. Therefore, it is necessary to consider the self-motion of the mobile robot in a collection cycle, unify the point cloud of the same frame in the same coordinate system, and eliminate the motion distortion in the point cloud.

[0111] Assume t k-1 At time t, the laser radar starts scanning for the kth time and scans to t k At the end of the moment, the point cloud collected during this period is represented by P k In other words, the so-called motion distortion correction is to change P k All point clouds are projected onto t k At this moment, in the laser radar coordinate system, the point cloud P after correction of distortion is obtained. k '.

[0112] Since the collected point cloud is unordered, when processing and calculating the point cloud data, only the coordinates of each point are known, but the order of point collection is unknown, so it is necessary to first calculate the line bundle where each point is located and its position in the line bundle. The vertical angle β and horizontal angle α of the laser point p(x,y,z) can be calculated according to the following formula:

[0113]

[0114] Combined with the horizontal and vertical angular resolution of the lidar, we can get the number of rows and columns to which each point belongs, and then sort the point cloud in the order of acquisition.

[0115] The time interval between two frames of point cloud data collected by the laser radar is very short. For a 10Hz laser radar, it is about 0.1s. Therefore, it can be approximately assumed that the speed of the mobile robot is constant during this period. Let T(t) be the position transformation of the mobile robot relative to the initial position at any time t, including the six-degree-of-freedom motion of the laser radar. T(t k ) is the robot position at the end of the current frame scan (t k is the end time of the kth scan). k Time, T(t m )(m<k) is known, so the current posture T(t k ):

[0116] T(t k )=T(t k-1 )·T(t k-2 ) -1 ·T(t k-1 ) (2)

[0117] At a known t k-1 ,t k After the pose at time t i (t i ∈(t k-1 ,t k )) The point i(i∈P k ) corresponds to the pose T(t k,i ) can be obtained by linear interpolation, so point i is projected to t k Coordinate X in the radar coordinate system at this moment ( ' k,i) The calculation formula is:

[0118]

[0119] P k All points in the projected onto t according to the above formula k In the radar coordinate system at the moment, we get the k-th frame point cloud P after eliminating motion distortion.k '.

[0120] When the LiDAR scans the surrounding environment, a large amount of point cloud data will be collected in a short time. However, there will be redundant data in these data, which will affect the efficiency of the system, and the collected point cloud needs to be filtered. Voxel grid filtering can reduce the amount of data without destroying the geometric structure of the point cloud data itself. Its basic principle is to create point voxel grids in the three-dimensional point cloud data and approximate the centroid of all points in the grid to reduce the amount of data.

[0121] According to the size of the input point cloud, determine the maximum and minimum values ​​of the point cloud on the X, Y, and Z coordinate axes, which are denoted by x max ,y max 、z max 、x min ,y min 、z min .in:

[0122]

[0123] According to the maximum and minimum values ​​in the above formula, determine the size of the minimum enclosing grid, the length, width and height are l respectively x , l y , l z , as shown below:

[0124]

[0125] Set the side length of the voxel grid to R, divide the X, Y, and Z coordinate axes into M, N, and L parts respectively, and calculate the number of grids S:

[0126] S=M*N*L (6)

[0127] Among them, M, N, and L are represented by the following formulas:

[0128]

[0129] In the formula, It means rounding down, that is, selecting the integer that is closest to this value and smaller than it.

[0130] Calculate the grid number h for each point x 、h y 、h z , determine which grid the point cloud falls in, as shown in the following formula:

[0131]

[0132] Calculate the centroid (c x 、c y 、cz ), with the centroid representing all points in the grid, the centroid is expressed as:

[0133]

[0134] Where n is the number of point clouds in a grid.

[0135] Voxel grid filtering determines the efficiency and accuracy of filtering by changing the size of the grid. The larger the grid, the more obvious the filtering effect, but it is easier to lose the geometric features in the space. The smaller the grid, the higher the filtering accuracy, but the running speed will also be slower. Therefore, choosing a suitable grid size is the key. When using a lower resolution 3D lidar, since the point cloud data itself is relatively sparse, it is appropriate to use a smaller grid size to ensure that the geometric structure in the point cloud is not lost.

[0136] In the above-mentioned S2, the pre-processed laser point cloud is ground segmented into ground point cloud and non-ground point cloud, which specifically includes the following steps:

[0137] A large portion of the point cloud data is ground point cloud and has a certain texture, which will affect the subsequent point cloud processing process. On the one hand, the ground point cloud will interfere with the point cloud of objects on the ground, reducing the accuracy and robustness of the algorithm; on the other hand, when the incident light of the LiDAR is close to the ground, some ground points will be mistakenly deleted as dynamic objects, which can reduce the number of false dynamic points.

[0138] Assuming that the low-beam laser radar has 16 lines, its vertical resolution is -15° to +15°, and only the laser beam below the horizontal direction can scan the ground information. The laser radar obtains a cluster of point clouds P at time t. t ={p1,p2,.....p n}, where p i Represents the point cloud P t The horizontal resolution of the laser radar is res1, and the vertical beam is 16. The resolution of the projection is 360 / res1×16, that is, the number of rows r of the projected depth map is determined by the number of laser radar lines, and the number of columns c is determined by the horizontal resolution of the emission point cloud. The data stored in each pixel is the Euclidean distance τ of the laser radar detection object. i =||p i ||.

[0139] Assume that the point where the adjacent laser beam hits the obstacle is P A , P B , P C , x, y, z are the coordinates of the laser point in space, then the angle α between two adjacent points in the vertical direction can be calculated using trigonometric rules:

[0140]

[0141] Where P i (z)(i=B, C) represents the coordinate of the point cloud in the z-axis direction. The calculation formulas of Δx and Δy are as follows:

[0142]

[0143] Where P i (x)(i=A, B, C) represents the coordinate of the point cloud in the x-axis direction, P i (y)(i=A, B, C) represents the coordinate of the point cloud in the y-axis direction.

[0144] Because the scanning range of the 16-line laser radar is [-15°, 15°], it can be known that the ground point must be in the range of [-15°, -1]. Within this range, an angle threshold Δα and a beam threshold are set. If the angle is less than the angle threshold Δα within the specified range, it is marked as a ground point.

[0145] In the above S3, the segmented point cloud is used to construct a local map, perform global optimization, generate a map with global consistency, and obtain the position and posture information of the robot, which specifically includes the following steps:

[0146] The local map construction process is to solve the position transformation T of the scan frame formed by the lidar scanning data relative to the local map ξ , the conversion process is as follows:

[0147]

[0148] In the formula, P represents a laser point cloud scanned by the laser radar; represents the rotation matrix; ξ x ,ξ y ,ξ z Represents the translation in the x, y, and z directions, that is, the coordinate difference relative to the origin of the local map;

[0149] The scanned frame is inserted into the local map, which generates a probability grid map:

[0150] M:rZ×rZ→[p min ,p max ] (13)

[0151] Where M represents the probability map; rZ represents the size of each grid in the probability grid; p min and p max Indicates the range of probability values;

[0152] Obtaining the position of the scanned frame relative to the local map can be regarded as a nonlinear least squares problem, as shown in the following formula:

[0153]

[0154] Where M s is a smooth function; h k Expressed as the coordinates of the point in the scanning frame coordinate system; T ξ It is expressed as the position of the scan frame coordinate system relative to the local map coordinate system;

[0155] The point cloud after ground segmentation is iteratively incrementally constructed into a global map, and the feature point cloud D of the k-1th frame is used to k-1 and the feature point cloud D of the kth frame k The pose transformation relationship is used to calculate the local submap of the kth frame Assume that the feature point cloud D of the k-1th frame k-1 The corresponding local submap projected in the global coordinate system is Through inter-frame matching of point clouds, the pose transformation matrix between the feature point cloud of the kth frame and the point cloud of the k-1th frame can be obtained. According to the pose transformation matrix, the feature point cloud D of the current frame can be k Projected in the global coordinate system, the estimated value of the local submap of the kth frame is obtained Right now:

[0156]

[0157] The observation value can be obtained by matching the local submap of the current frame with the previous frame. The error term between the estimated value and the observed value is used as the output in real time and solved by the graph optimization method. The optimized local submap is compared with the local submap of the previous frame. The overlapping feature point clouds are used as the global sub-map of the current frame and put into the kd-tree where the historical global sub-map is located to construct the global map. At the same time, the current local submap Put it into kd-tree for the next frame feature point cloud to perform Scan to Map operation. The mapping effect is as follows Figure 3 As shown in the figure, the shadow part in the middle of the road is the track afterimage left by the moving object.

[0158] In the above-mentioned S4, projecting the generated non-ground point cloud map into a depth map specifically includes the following steps:

[0159] For non-ground point clouds, their 360° environment can be unfolded and converted into a flat depth image. The converted depth map is essentially a two-dimensional matrix. The number of rows in the matrix corresponds to the angular range of the laser point cloud in the horizontal direction, that is, 0° to 360°; the number of columns in the matrix corresponds to the angular range of the laser radar in the vertical direction (its maximum and minimum values ​​match the field of view of the laser radar), and each element value in the matrix corresponds to the point cloud depth information in the specific horizontal and vertical angle directions.

[0160] In order to remove dynamic objects by comparing the visibility of the point cloud map and the depth map projected by the query frame, the point cloud map must first be projected into a depth map and the large-scale map P M , and a fixed-size depth map is obtained. In the projection process, the physical meaning of the depth map resolution is the angular resolution in the horizontal and vertical directions. When it is a low-beam 16-line laser radar, its horizontal viewing angle is 360°, the vertical viewing angle is 30° (-15°~15°), and the resolution is 1°, that is, a single pixel represents 1° horizontal field of view and vertical field of view, so the size of the depth map is 360×30.

[0161] When projecting a point cloud map into a depth map, a depth map with a specific resolution is used. This sampled map point cloud with a limited field of view is called a "visible map point cloud". Each pixel value in the depth map is a visible point cloud in the map point cloud at a certain viewing angle. Through the field of view of the lidar, the point cloud P M Split into multiple visible map point clouds Its expression is:

[0162]

[0163] In the formula, Represented in point cloud collection The point cloud collection with the closest distance to the pixel.

[0164] Define visible map point cloud The equivalent depth map of

[0165]

[0166] In the formula, It represents the projection intensity value of the pixel in the i-th row and j-th column at the k-th frame viewing angle; m represents the number of pixels in the horizontal direction, which is obtained by dividing the horizontal field of view by the horizontal resolution; n represents the number of pixels in the vertical direction, which is obtained by dividing the vertical field of view by the vertical resolution.

[0167] Depth Map The value of each point in can be calculated by the following formula:

[0168]

[0169] Where N represents the laser radar scanning beam, d i (x, y) represents the distance value at (x, y) on the i-th line, which means that at a certain pixel (x, y), the nearest distance value among all scan lines is taken as the value of the pixel.

[0170] In the above S5, N consecutive scans in the non-ground point cloud are selected as query frames, the point cloud map is converted to the coordinate system of the query frame, and all suspicious dynamic points in the point cloud map are removed by comparing the visibility of the depth map of the query frame and the local map at the same resolution, which specifically includes the following steps:

[0171] In order to remove dynamic obstacles, N scans are selected from the point cloud data to form a query frame P Q , perform batch dynamic point removal (BR). According to the relative pose of the k-th frame query frame Project the query frame onto the local map In the same coordinate system, the query frame and the depth map of the local map are set to the same resolution.

[0172] When setting the resolution of the depth map, we take into account the fact that the farther the laser radar is, the sparser the point cloud is. At locations far away from the laser radar, the sparse point cloud cannot reflect the real environment information, especially in low-beam laser radars. Therefore, when setting the resolution of the depth map, we use the distance information of the laser radar as the weight for adaptively adjusting the resolution of the depth map, so that the depth maps in different distance intervals have different resolutions.

[0173] Specifically, let d i,j Represents the distance value of the jth laser point in the i-th scan of the laser radar, then the weight w can be defined i,j for:

[0174]

[0175] Next, define the number of resolution layers L and divide the distance range into L intervals Where 1≤l≤L, and Respectively represent the distance range of the lth layer. For the lth layer pixel (i, j), its corresponding pixel value r i,j It is expressed as follows:

[0176]

[0177] In the formula, Represents the weight of pixel (i, j) in the depth map at layer l, and the calculation formula is as follows:

[0178]

[0179] According to the above formula, when the distance value d of pixel (i, j) i,j Falling in the range When it is inside, its weight in layer l is 1 / d i,j , that is, the closer the distance, the greater the weight and the corresponding resolution; conversely, the farther the distance, the lower the corresponding resolution. When the distance is outside the range of this layer, the corresponding weight is 0, that is, it does not participate in the depth map construction of this layer.

[0180] The query frame The corresponding depth map The value of each point on The calculation formula is:

[0181]

[0182] Similarly, for point cloud maps Set depth maps of the same resolution The value of each point is In this way, the resolution of the depth map can be adjusted according to the weights of different distance intervals, so that the resolution of the depth map is finer at locations closer to the lidar. The depth map projected by the local map and the query frame is as follows: Figure 4 , Figure 5 shown.

[0183] like Figure 6 As shown, the depth map corresponding to the local map and the query frame is adjusted to the initial resolution, that is, the maximum resolution, and matrix subtraction is performed to subtract the two depth maps pixel by pixel to obtain the disparity map of the two depth maps.

[0184]

[0185] When the pixel value of a certain pixel in the disparity map is greater than the threshold, the point cloud corresponding to the pixel in the depth map of the corresponding current laser point cloud is a dynamic point, and the determined dynamic point is removed from the current laser point cloud. If its corresponding The value is greater than the set threshold τ D , then the point is considered to be a dynamic point and is added to In , the process is:

[0186]

[0187] Through dynamic subsets, you can calculate and obtain mutually exclusive static subsets

[0188] According to the continuous N scans in the robot's motion direction, for each scan It is passed through the visibility of the depth map and p M Compare and count the number of times each point is marked as a static point and a dynamic point, recorded as n S and n D After completing all comparisons, the evaluation score s(p M ), and its calculation formula is:

[0189] s(p M )=α S n S +α D n D (25)

[0190] In the formula, α S is the static weight coefficient, which is a positive value; α D is the dynamic weight coefficient, which is a negative value.

[0191] Therefore, according to the evaluation score and the threshold τ S The dynamic point cloud subset can be obtained as:

[0192]

[0193] In the above S6, by continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and the ratio of the number of restored static points is used as a condition for determining whether to continue to reduce the resolution, which specifically includes the following steps:

[0194] After the dynamic point cloud is removed, the point cloud set P M Divided into two mutually exclusive subsets: static point cloud subset P SM and the dynamic point cloud subset P DM , expressed as:

[0195]

[0196] By comparing the visibility of the point cloud map and the depth map projected from the query frame, all suspicious dynamic points are removed at the maximum resolution. However, experimental verification shows that when comparing the visibility based on the high-resolution depth map, it is easy to mistakenly delete the boundaries of dynamic objects or other static points, that is, a certain number of static points will be included in the deleted dynamic points. However, when the resolution of the depth map is reduced, the number of mistaken deletions will be significantly reduced. Therefore, the mistakenly deleted static points can be restored to the static point cloud map by continuously reducing the resolution of the depth map.

[0197] When considering restoring static points that were deleted by mistake, first set the resolution to the highest, and then gradually reduce the resolution according to the visibility information until the number of restored static points is less than the threshold. When the resolution of the depth map is reduced, a relatively rougher depth map can be obtained. The recovery rate is calculated based on the number of static points restored in each iteration, that is, the number of static points restored in this round of recovery divided by the number of static points restored in the first round. If the recovery rate exceeds the threshold, it indicates that there are still a large number of static points in the dynamic point cloud, that is, continue to reduce the resolution of the depth map and continue to iterate; if the recovery rate is lower than the threshold, it indicates that there is basically no static point cloud in the dynamic point cloud, that is, stop reducing the resolution and return to the final static point cloud map.

[0198] Assume that in the first round of static point recovery at the highest resolution, the number of static points recovered is n1, and in the i-th (i>1) round of recovery, the number of static points recovered is n i , then the number of static points restored in the i-th round accounts for the proportion of the first round, that is, the static point recovery rate in the i-th round is In the i-th round of restoration, the resolution of the depth map is r i If the recovery rate p i is greater than the preset threshold α, that is, the ratio of the number of static points restored in this round to the number of static points restored in the first round is greater than the preset threshold, which means that there are still a large number of static points in the dynamic point cloud, and it is necessary to continue to reduce the point resolution according to the visibility information and perform the next round of iteration to achieve a better recovery effect; on the contrary, when the recovery rate p is i When it is less than the threshold α, it means that there is basically no static point cloud in the dynamic point cloud, and the resolution should be reduced to avoid wasting computing resources.

[0199] like Figure 2 As shown in the figure, S (k) and D (k) They represent the point cloud map mainly composed of static point cloud and dynamic point cloud in the kth iteration, respectively, and S (k) and D (k) The size of the box represents the size of the point cloud map. In the result of the first deletion, the point cloud map size of the dynamic point cloud is the largest, while the corresponding point cloud map of the static point cloud is the smallest. Then, in the recovery phase, static points of a certain size are found from the point cloud map of the dynamic point cloud each time and added to the previous static point cloud. After the entire recovery phase, the static point cloud will become larger and larger, and the corresponding dynamic point cloud will become smaller and smaller. The final output is the static point cloud map accumulated after the entire process is completed.

[0200] The present invention is verified by combining the experimental results below: Figure 3This is a 3D point cloud image containing the afterimages of dynamic obstacle trajectories. It can be clearly seen from the image that due to the presence of moving vehicles, the point cloud map contains a large number of "ghost images"; Figure 4 The depth map is projected from the local point cloud map; Figure 5 The depth map projected by the query frame; Figure 6 It is a disparity map between the depth map projected by the local point cloud map and the depth map projected by the query frame; Figure 7 This is a 3D point cloud image of the dynamic obstacle trajectory afterimage removal using the original algorithm. It can be seen that the image contains some dynamic object trajectory afterimages. This method can obviously remove the "ghost images" caused by dynamic obstacles, but its removal effect is not good. Some "ghost images" that have not been completely removed still remain in the image. Figure 8 This is a three-dimensional point cloud map of dynamic obstacle trajectory afterimages removed using the improved algorithm of the present invention. It can be clearly seen from the figure that the present invention is very effective in removing the trajectory afterimages of dynamic obstacles, and can remove almost all of the "ghost images" and retain a complete static point cloud map.

[0201] Finally, it should be noted that the specific implementation scheme described above further illustrates the purpose, technical scheme and beneficial effects of the present invention. The above embodiments are only used to illustrate the technical scheme of the present invention, rather than to limit the scope of protection of the present invention. Those skilled in the art should understand that any modification or equivalent substitution of the technical scheme of the present invention is included in the scope of protection of the present invention.

Claims

1. A dynamic obstacle removal method suitable for low-beam 3D laser radar, characterized in that: The following steps are involved: S1. The mobile robot collects three-dimensional point cloud data of the surrounding environment through its own 3D laser radar, and performs dedistortion and filtering on the collected point cloud data; S2, performing ground segmentation on the processed laser point cloud into ground point cloud and non-ground point cloud; S3, construct a local map of the segmented point cloud, perform global optimization, generate a point cloud map with global consistency, and obtain the robot's position information; S4, projecting the generated non-ground point cloud map into a depth map; S5, selecting N consecutive scans in the non-ground point cloud as query frames, adjusting the resolution of the depth map corresponding to the query frame according to the laser radar distance information, and removing all suspicious dynamic points in the point cloud map by comparing the visibility of the depth map of the query frame and the local map at the same resolution; S6, by continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and according to the ratio of the number of restored static points, it is decided whether to continue to reduce the resolution; In the above S1, the mobile robot collects three-dimensional point cloud data of the surrounding environment through the 3D laser radar carried by itself, and performs dedistortion and filtering on the collected point cloud data. The specific steps are as follows: Assume that the mobile robot moves at a constant speed within the time interval between the two frames of point cloud data. Let T(t) be the position transformation of the mobile robot relative to the initial position at any time t. k ) is the robot posture at the end of the current frame scan, at t k Time, T(t m ) is known, where m<k, so the current pose can be estimated based on the known pose: T(t k )=T(t k-1 )·T(t k-2 ) -1 ·T(t k-1 ) (1) At a known t k-1 ,t k After the posture at time [t k-1 ,t k ]The point cloud set collected within the time period is P k , for any t i Moment, P k The pose T(t k,i ) can be obtained, where t i ∈(t k-1 ,t k ), so point i is projected to t k The coordinate X' in the laser radar coordinate system at this moment (k,i) , and its calculation formula can be expressed as: P k All points in the projected onto t k At this moment, the k-th frame point cloud P' is obtained after eliminating motion distortion in the radar coordinate system. k ; According to the size of the input point cloud, determine the maximum and minimum values ​​of the point cloud on the X, Y, and Z coordinate axes, which are denoted by x max ,y max 、z max 、x min ,y min 、z min , determine the size of the minimum enclosing grid based on the maximum and minimum values, with a length, width and height of l respectively x , l y , l z ; Assume the side length of the voxel grid is R, divide the X, Y, and Z coordinate axes into M, N, and L parts respectively, and calculate the number of grids S, and the grid number h of each point x 、h y 、h z , determine which grid the point cloud falls into, and then calculate the centroid (c x 、c y 、c z ), with the centroid representing all points in the grid; when using a low-beam 3D lidar, since the point cloud data itself is relatively sparse, a smaller grid size is used to ensure that the geometric structure in the point cloud is not lost; In the above-mentioned S2, the processed laser point cloud is ground segmented into ground point cloud and non-ground point cloud. The specific steps are as follows: When the point where the adjacent laser beam hits the obstacle is P A , P B , P C , x, y, z are the coordinates of the laser point in space, then the angle α between two adjacent points in the vertical direction can be calculated using trigonometric rules: Where P B (z), P C (z) respectively represent the point P B , P C The calculation formulas for the coordinates in the z-axis direction, Δx and Δy are as follows: Where P B (x), P C (x) represents the point P B , P C The coordinate in the x-axis direction, P B (y), P C (y) respectively represent point P B , P C The coordinate in the y-axis direction; When using a 16-line laser radar, its vertical scanning range is [-15°, 15°]. It can be seen that the ground point must be in the beam range of [-15°, -1°]. Within this range, an angle threshold Δα and a beam threshold are set. If a point is less than the angle threshold Δα within the specified range, it is marked as a ground point. In the above S3, the segmented point cloud is constructed into a local map, and global optimization is performed to generate a point cloud map with global consistency, and the position and posture information of the robot is obtained. The specific steps are: The local map construction process is to solve the position transformation T of the scan frame formed by the lidar scanning data relative to the local map ξ , the conversion process is as follows: In the formula, P represents a laser point cloud scanned by the laser radar; R ξθ represents the rotation matrix; ξ x ,ξ y ,ξ z Represents the translation in the x, y, and z directions, that is, the coordinate difference relative to the origin of the local map; The scanned frame is inserted into the local map, which generates a probability grid map: M:rZ×rZ→[p min ,p max ] (6) Where M represents the probability map; rZ represents the size of each grid in the probability grid; p min and p max Indicates the range of probability values; Obtaining the position of the scanned frame relative to the local map can be regarded as a nonlinear least squares problem, as shown in the following formula: Where M s is a smooth function; h k Expressed as the coordinates of the point in the scanning frame coordinate system; T ξ It is expressed as the pose transformation of the scan frame coordinate system relative to the local map coordinate system; Assume that the feature point cloud D of the k-1th frame k-1 The corresponding local submap projected in the global coordinate system is Through inter-frame matching of point clouds, the pose transformation matrix between the feature point cloud of the kth frame and the point cloud of the k-1th frame can be obtained. According to the pose transformation matrix, the feature point cloud D of the current frame can be k Projected in the global coordinate system, the estimated value of the local submap of the kth frame is obtained The current optimized local submap The local submap of the previous frame The overlapping feature point clouds are used as the global sub-map of the current frame and put into the kd-tree where the historical global sub-map is located to construct the global map. At the same time, the current local submap Put it into kd-tree for the next frame feature point cloud to perform Scan to Map matching operation; In the above-mentioned S4, projecting the generated non-ground point cloud map into a depth map specifically includes the following steps: By comparing the visibility of the point cloud map and the depth map projected by the query frame, dynamic objects can be removed. First, the point cloud map is projected into a depth map; each pixel value in the depth map is a visible point cloud in the map point cloud at a certain perspective. Through the field of view of the lidar, the point cloud P M Split into multiple visible map point clouds Its expression is: In the formula, Represented in point cloud collection The point cloud set closest to the pixel in the middle; Then will Projected into a two-dimensional depth map, the depth image after projection is Where (x, y) represents the pixel coordinates in the image, and the corresponding distance value can be calculated by the following formula: Where N represents the laser radar scanning beam, d i (x, y) represents the distance value at (x, y) on the i-th line, which means that at a certain pixel (x, y), the nearest distance value among all scan lines is taken as the value of the pixel; In the above S5, N consecutive scans in the non-ground point cloud are selected as query frames, and the resolution of the depth map corresponding to the query frame is adjusted according to the laser radar distance information. By comparing the visibility of the depth map of the query frame and the local map at the same resolution, all suspicious dynamic points in the point cloud map are removed. The specific steps include the following: Select N scans from the non-ground point cloud data to form a query frame P Q , perform batch dynamic point removal (BR); when setting the resolution of the depth map, considering that the farther the point cloud of the LiDAR is, the sparser it is, the LiDAR distance information is used as the weight for adaptively adjusting the resolution of the depth map, so that the depth maps in different distance intervals have different resolutions; Let d i,j Represents the distance value of the jth laser point in the i-th scan of the laser radar, then the weight w can be defined i,j for: Define the number of resolution layers L and divide the distance range into L intervals Where 1≤l≤L, and Respectively represent the distance range of the lth layer; for the lth layer pixel (i, j), its corresponding pixel value r i,j It is expressed as follows: In the formula, Represents the weight of pixel (i, j) in the depth map at layer l, and the calculation formula is as follows: According to the above formula, when the distance value d of pixel (i, j) i,j Falling in the range When it is inside, its weight in layer l is 1 / d i,j , that is, the closer the distance, the greater the weight and the corresponding resolution; conversely, the farther the distance, the lower the corresponding resolution; when the distance is outside the range of this layer, the corresponding weight is 0, that is, it does not participate in the depth map construction of this layer; The query frame The corresponding depth map The value of each point on The depth map corresponding to the local map and the query frame is adjusted to the initial resolution, that is, the maximum resolution, and matrix subtraction is performed to subtract the two depth maps pixel by pixel to obtain the disparity map of the two depth maps. For any point If its corresponding The value is greater than the set threshold τ D , then the point is considered to be a dynamic point and is added to In , the process is: Through dynamic subsets, you can calculate and obtain mutually exclusive static subsets According to the continuous N scans in the robot's motion direction, for each scan Where k = 1, 2, .... N, and pass it through the visibility of the depth map and p M Compare and count the number of times each point is marked as a static point and a dynamic point, recorded as n S and n D After completing all comparisons, the evaluation score s(p M ), and its calculation formula is: s(p M )=a S n S +a D n D (15) In the formula, α S is the static weight coefficient, which is a positive value; α D is the dynamic weight coefficient, which is a negative value; Therefore, according to the evaluation score and the threshold τ S The dynamic point cloud subset can be obtained as: In the above S6, by continuously reducing the resolution of the point cloud map and the depth map projected by the query frame, the previously mistakenly deleted static points are restored to the static map, and the ratio of the number of restored static points is used as a judgment condition for whether to continue to reduce the resolution. The specific steps are: After the dynamic point cloud is removed, the point cloud set P M Divided into two mutually exclusive subsets: static point cloud subset P SM and the dynamic point cloud subset P DM , expressed as: When considering restoring the static points that were deleted by mistake, the resolution is first set to the highest, and then the resolution is gradually reduced according to the visibility information until the number of restored static points is less than the threshold; assuming that in the first round of static point recovery at the highest resolution, the number of restored static points is n1, and in the i-th round of recovery, the number of restored static points is n i , then the recovery rate of the static point in the i-th round can be calculated as Where i>1; if the recovery rate p i is greater than the preset threshold α, that is, the ratio of the number of static points restored in this round to the number of static points restored in the first round is greater than the preset threshold, which means that there are still a large number of static points in the dynamic point cloud, and it is necessary to continue to reduce the point resolution according to the visibility information and perform the next round of iteration to achieve a better recovery effect; on the contrary, when the recovery rate p is i When it is less than the threshold α, it means that there is basically no static point cloud in the dynamic point cloud, and the resolution should be reduced to avoid wasting computing resources.