Obstacle filtering method in driving area of ​​robot high-precision map construction

By determining the drivable area interval and filtering the obstacle point cloud in laser SLAM, the problem of low mapping efficiency and low accuracy caused by obstacle interference in laser SLAM is solved, and efficient point cloud data processing and accurate mapping are achieved. position.

CN114648571BActive Publication Date: 2024-09-13CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210308179.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-26
Publication Date
2024-09-13
Estimated Expiration
2042-03-26

AI Technical Summary

Technical Problem

In laser SLAM, especially in special scenarios, the requirements for original point cloud data are high, which leads to interference factors easily appearing in the process of recording a large amount of data and taking a long time, affecting the coherence and efficiency of mapping, especially moving obstacles. Long afterimages will be formed, resulting in poor mapping results.

Method used

A method for filtering obstacles in the driving area during robot high-precision map construction is adopted. By obtaining sensor data for preprocessing, the ground point cloud is extracted, and the drivable area interval is determined. Combined with the joint calibration of the radar and inertial measurement unit, downsampling is performed. and least squares method to fit the plane, filter the obstacle point cloud, and improve positioning accuracy.

Benefits of technology

It effectively filters out interfering point clouds, improves the efficiency and positioning accuracy of point cloud data processing, reduces influencing factors, avoids the need for re-recording, and significantly improves the mapping efficiency and accuracy of laser SLAM.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648571B
    Figure CN114648571B
Patent Text Reader

Abstract

The present invention discloses a method for filtering obstacles in a driving area in a robot high-precision map construction, including: obtaining sensor data and preprocessing; extracting ground point cloud; determining an executable area interval, and converting the point cloud map into a format; defining the first coordinate on the y axis as the starting point in the kth unit interval of the x axis; calculating the average number of points and the point growth rate of the points in the positive direction of the y axis, and when the point growth rate is 0, obtaining the terminal coordinates, and setting the average number of points to 0; continuing to traverse in the positive direction of the y axis, recording the first non-zero value in the average number of points, and marking the coordinates as the starting point 2, repeating the previous step until the next terminal is encountered; repeating the previous step until all y are traversed; and taking the internal area of ​​the obtained starting coordinates and terminal coordinates as the executable area interval. The drivable area interval determined by the method can filter the interfering point cloud in the point cloud map, thereby improving the accuracy of positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robot mapping, and in particular, relates to a method and system for filtering obstacles in a driving area of ​​a robot in high-precision map construction. Background Art

[0002] SLAM (Simultaneous Localization and Mapping) is a real-time positioning and map construction. It refers to a subject equipped with a specific sensor, which builds a model of the environment during movement without prior information about the environment and determines its own posture transformation. The main sensor used in this invention is a three-dimensional laser radar, so laser SLAM is mainly discussed.

[0003] The mapping process of laser SLAM is as follows: first, a three-dimensional laser radar is installed on the mapping robot, sometimes with inertial navigation and other sensors to assist in mapping. Then, the surrounding environment is scanned according to the predetermined target area and planned path to obtain frame-by-frame point cloud data and other sensor data. Finally, the robot's posture changes are estimated through the previously obtained data to generate a point cloud map of the entire scene.

[0004] At present, traditional laser SLAM has very mature algorithms that can be used, but it performs poorly in special scenarios, especially the requirements for the original point cloud data are relatively high, and thus the timing of recording the point cloud map is relatively high. If interference factors appear in the process of recording a large amount of data and a long time, in order to ensure the continuity of the mapping, it is necessary to re-record at this time, which will be extremely inefficient in the long run.

[0005] Therefore, the accuracy of the point cloud map determines the accuracy of positioning. Here, we mainly discuss the impact of obstacles in the executable area of ​​the point cloud map on the point cloud map. The obstacles here can be dynamic, such as moving pedestrians or cars. They can also be static, such as stationary pedestrians or vehicles, road cones, garbage, etc. Their characteristics are non-fixed and random, that is, they cannot be used as a fixed reference to determine the position of the robot. Especially for moving objects, a long afterimage will be formed during the mapping process, which will eventually lead to poor mapping results. Therefore, the present invention seeks a method for detecting obstacles in the executable area to filter in real time during the mapping process.

[0006] The patent with the announcement number CN 113240713 A discloses a dynamic object filtering method for autonomous mobile robot mapping. The method is a dynamic object filtering method based on clustering. First, the current clustering algorithm is not very effective in some scenes, especially it is easy to cluster two similar objects into one category, resulting in the filtering of some unnecessary scene contents. Secondly, the invention mainly realizes the filtering of dynamic objects in the scene, and has no requirements for static objects. Summary of the invention

[0007] 1. Purpose of the present invention

[0008] In view of the current technical problems of complex neural network structure, extraction of invalid features and insufficient mining and utilization of shallow feature information, a method and system for filtering obstacles in the driving area of ​​robot high-precision map construction is proposed. The drivable area interval determined by this method can filter out the interfering point cloud in the point cloud map, without the need to re-record from the starting point, which greatly improves the efficiency and reduces the influencing factors in the point cloud, thereby improving the positioning accuracy.

[0009] 2. Technical solution adopted by the present invention

[0010] A method for determining a drivable area in high-precision map construction of a robot comprises the following steps:

[0011] S01: Acquire sensor data and pre-process;

[0012] S02: Extract ground point cloud;

[0013] S03: Determine the applicable area, including:

[0014] S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format;

[0015] S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area;

[0016] S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0.

[0017] S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinate as the starting point 2, and repeat step S33 until the next end point is encountered;

[0018] S35: Repeat step S34 until all y are traversed;

[0019] The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

[0020] In the preferred technical solution, after obtaining the executable area interval, the obstacle point cloud is determined and the obstacle point cloud is filtered.

[0021] In the preferred technical solution, before the step S01 acquires the sensor data, the step also includes jointly calibrating the radar and the inertial measurement unit IMU, including:

[0022] Get lidar data and IMU data;

[0023] Downsampled LiDAR point cloud, corresponding to the timestamps of point cloud and IMU data;

[0024] Set the transformation matrix, transform the lidar point cloud in combination with the IMU data, and fuse it into the world coordinate system W;

[0025] Find the average sum of the distances between each point in the world coordinate system and the nearest neighboring point cloud, and iterate continuously to obtain the transformation matrix.

[0026] In the preferred technical solution, the pre-processing method in step S01 includes:

[0027] S11: Processing of null value points;

[0028] S12: Calculate the distance from the point to the origin, set a near distance threshold and a far distance threshold, and directly remove points that are smaller than the near distance threshold and larger than the far distance threshold;

[0029] S13: Downsampling point cloud processing, the steps are as follows:

[0030] 1) Voxelize the point cloud, establish a grid, and determine the side length L of the grid;

[0031] 2) Calculate the grid where the point cloud is located, and divide the point cloud into m×n×l small grids according to the side length L, where m=ceil(L x / L), n = ceil (L y / L), l = ceil(L z / L), L x is the range of the point cloud on the x-axis, L y is the range of the point cloud on the y-axis, L z is the range of the point cloud on the z-axis, ceil(x) is the rounding function, which represents the smallest integer not less than x. The grid formula is:

[0032]

[0033] where x min is the minimum range of the point cloud on the x-axis, y min is the minimum range of the point cloud on the y-axis, z min It is the minimum range of the point cloud on the z-axis.

[0034] In the entire grid code, point P iThe grid code is If converted to one-dimensional encoding, point P i The raster encoding formula is:

[0035]

[0036] 3) Find the grid where each point cloud is located;

[0037] 4) Calculate the centroid of each grid point cloud, and the calculation formula is:

[0038]

[0039] Among them, x i is the x-coordinate of any point in the grid, y i is the y coordinate of any point in the grid, z i is the z coordinate of any point in the grid, g is the number of point cloud data in the grid, select the data point closest to the center of gravity and delete other point data until only one data point is left for all small cube data points, completing the point cloud downsampling.

[0040] In the preferred technical solution, the method for extracting the ground point cloud in step S02 includes:

[0041] S21: The xoy plane of the 3D point cloud image is represented as a circle with a radius of r=∞, the robot as the center, and the circle is divided into several discrete sector areas;

[0042] S22: Establish the index of each point to its region. i The partition is represented as:

[0043]

[0044] in, Indicates the partition index number of each point, x i ,y i For p i The x and y coordinate values ​​of the point, α represents the angle of the segmented area;

[0045] S23: Select multiple point clouds after the segmentation area is sorted, and calculate the slope k between the multiple point clouds respectively. When k is less than the threshold th, the point is considered to be a ground point, otherwise it is deleted;

[0046] S24: Use the remaining points as sampling points and use the least squares method to fit the plane to obtain the ground point cloud.

[0047] In a preferred technical solution, the method for determining an obstacle point cloud includes:

[0048] The obtained feasible area interval is compared with the data under the original point cloud. If the height of the points in the feasible area interval in the original point cloud is greater than the set threshold, it is determined to be an obstacle point cloud.

[0049] The present invention also discloses a system for determining a drivable area in high-precision map construction of a robot, comprising:

[0050] Data acquisition and preprocessing module, which acquires sensor data and performs preprocessing;

[0051] Ground point cloud extraction module, extracting ground point cloud;

[0052] The method of determining the executable area interval by the module and determining the executable area interval includes:

[0053] S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format;

[0054] S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area;

[0055] S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0.

[0056] S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinate as the starting point 2, and repeat step S33 until the next end point is encountered;

[0057] S35: Repeat step S34 until all y are traversed;

[0058] The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

[0059] The preferred technical solution also includes an obstacle filtering module, which determines the obstacle point cloud and filters the obstacle point cloud after obtaining the movable area interval.

[0060] In the preferred technical solution, the preprocessing method in the data acquisition preprocessing module includes:

[0061] S11: Processing of null value points;

[0062] S12: Calculate the distance from the point to the origin, set a near distance threshold and a far distance threshold, and directly remove points that are smaller than the near distance threshold and larger than the far distance threshold;

[0063] S13: Downsampling point cloud processing, the steps are as follows:

[0064] 1) Voxelize the point cloud, establish a grid, and determine the side length L of the grid;

[0065] 2) Calculate the grid where the point cloud is located, and divide the point cloud into m×n×l small grids according to the side length L, where m=ceil(L x / L), n = ceil (L y / L), l = ceil(L z / L), L x is the range of the point cloud on the x-axis, L y is the range of the point cloud on the y-axis, L z is the range of the point cloud on the z-axis, ceil(x) is the rounding function, which represents the smallest integer not less than x. The grid formula is:

[0066]

[0067] where x min is the minimum range of the point cloud on the x-axis, y min is the minimum range of the point cloud on the y-axis, z min is the minimum range of the point cloud on the z-axis;

[0068] In the entire grid code, point P i The grid code is If converted to one-dimensional encoding, point P i The raster encoding formula is:

[0069]

[0070] 3) Find the grid where each point cloud is located;

[0071] 4) Calculate the centroid of each grid point cloud, and the calculation formula is:

[0072]

[0073] Among them, x i is the x-coordinate of any point in the grid, y i is the y coordinate of any point in the grid, z i is the z coordinate of any point in the grid, g is the number of point cloud data in the grid, select the data point closest to the center of gravity and delete other point data until only one data point is left for all small cube data points, completing the point cloud downsampling.

[0074] The present invention further discloses a method for filtering obstacle point clouds in a drivable area in high-precision map construction of a robot. After obtaining the drivable area interval using any of the above-mentioned methods for determining the drivable area, the obstacle point cloud is judged and filtered.

[0075] 3. Beneficial effects of the present invention

[0076] 1. In the drivable area determined in the present invention, if interfering point clouds appear in the recorded point cloud map, it only needs to be filtered out by this algorithm, and there is no need to re-record from the starting point, which greatly improves efficiency.

[0077] 2. Traditional laser SLAM mainly focuses on algorithm optimization, especially the coordination of prior and a posteriori, loop detection and back-end optimization. The present invention mainly optimizes the original point cloud data, filters out the obstacle point cloud in the movable area, reduces the influencing factors in the point cloud, and does not affect the specific point cloud factors in the original point cloud map, thereby improving the positioning accuracy. Especially when encountering an increase in influencing factors, the advantages demonstrated by the present invention can be more reflected.

[0078] 3. In terms of data processing, the present invention can remove unimportant point clouds and even noise points layer by layer, which can improve computing efficiency and reduce complexity in subsequent point cloud data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A flow chart of a method for determining a drivable area in high-precision map construction of a robot according to the present invention;

[0080] Figure 2 This is a principle block diagram of the obstacle filtering system in the driving area of ​​the robot in the high-precision map building of the present invention;

[0081] Figure 3 Flowchart for joint calibration of radar and inertial measurement unit (IMU);

[0082] Figure 4 This is a flow chart of preprocessing the original point cloud according to the present invention;

[0083] Figure 5 The least squares method is used to fit the ground algorithm flow chart for the present invention;

[0084] Figure 6 A schematic diagram of the sector-shaped areas divided by the present invention;

[0085] Figure 7 It is a schematic diagram of the generally ray-shaped data in each sector area;

[0086] Figure 8 Remove schematic diagrams for non-ground point clouds;

[0087] Fig. 9 A flow chart for determining the exercisable area interval;

[0088] Fig.10 This is a schematic diagram of scanning the entire point cloud counterclockwise;

[0089] Fig.11 Schematic diagram of the data structure of the point cloud image. DETAILED DESCRIPTION

[0090] The following is a clear and complete description of the technical solutions in the examples of the present invention in conjunction with the accompanying drawings in the examples of the present invention. 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 those skilled in the art without creative work are within the protection scope of the present invention.

[0091] The examples of the present invention will be described in further detail below with reference to the accompanying drawings.

[0092] Example 1

[0093] like Figure 1 As shown, a method for determining a drivable area in high-precision map construction of a robot includes the following steps:

[0094] S01: Acquire sensor data and pre-process;

[0095] S02: Extract ground point cloud;

[0096] S03: Determine the applicable area, including:

[0097] S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format;

[0098] S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area;

[0099] S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0.

[0100] S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinate as the starting point 2, and repeat step S33 until the next end point is encountered;

[0101] S35: Repeat step S34 until all y are traversed;

[0102] The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

[0103] In another embodiment, the present invention further discloses a method for filtering obstacle point clouds in a drivable area in high-precision map construction of a robot. After obtaining the drivable area interval using the above-mentioned method for determining the drivable area, the obstacle point cloud is judged and filtered.

[0104] In a preferred embodiment, the main sensors used in the present invention are 16-line laser radar and IMU. Before acquiring sensor data, it is necessary to first ensure the influence of the sensor itself on the data, so it is necessary to calibrate the sensor internal parameters to reduce the error. In addition, since the original coordinates of the laser radar and IMU are not at the same point, it is also necessary to calibrate the external parameters of the laser radar and IMU to determine the relative rotation and translation. Finally, the sensor data is recorded. The specific step S01 also includes joint calibration of the radar and inertial measurement unit IMU before acquiring the sensor data, including:

[0105] Get lidar data and IMU data;

[0106] Downsampled LiDAR point cloud, corresponding to the timestamps of point cloud and IMU data;

[0107] Set the transformation matrix, transform the lidar point cloud in combination with the IMU data, and fuse it into the world coordinate system W;

[0108] Find the sum of the distances between each point in the world coordinate system and the nearest neighboring point cloud, and iterate continuously to obtain the transformation matrix.

[0109] In a preferred embodiment, directly using the raw sensor data obtained by the laser radar for calculation will increase the complexity and amount of calculation, so the point cloud data needs to be preprocessed. The preprocessing method includes:

[0110] S11: Process the null value points; some lasers emitted by the lidar are not reflected back, and these points are NaN in the data.

[0111] S12: Calculate the distance from the point to the origin, set the short-distance threshold and long-distance threshold, and directly remove the points that are smaller than the short-distance threshold and larger than the long-distance threshold; the laser radar sometimes records the point cloud of the mobile robot, so it needs to be removed. Point clouds that are too far away have little practical significance and increase the amount of calculation in the actual calculation process, so they also need to be removed.

[0112] S13: Downsampling the point cloud. Downsampling divides the space into grids, then selects a new point in each grid, and finally obtains a new point cloud, which has a significantly lower density than the point before processing. The steps are as follows:

[0113] 1) Voxelize the point cloud, establish a grid, and determine the side length L of the grid;

[0114] 2) Calculate the grid where the point cloud is located, and divide the point cloud into m×n×l small grids according to the side length L, where m=ceil(L x / L), n = ceil (L y / L), l = ceil(L z / L), L x is the range of the point cloud on the x-axis, L y is the range of the point cloud on the y-axis, L z is the range of the point cloud on the z-axis, ceil(x) is the rounding function, which represents the smallest integer not less than x. The grid formula is:

[0115]

[0116] where x min is the minimum range of the point cloud on the x-axis, y min is the minimum range of the point cloud on the y-axis, z min It is the minimum range of the point cloud on the z-axis.

[0117] In the entire grid code, point P i The grid code is If converted to one-dimensional encoding, the grid encoding formula of point Pi is:

[0118]

[0119] 3) Find the grid where each point cloud is located;

[0120] 4) Calculate the centroid of each grid point cloud, and the calculation formula is:

[0121]

[0122] Among them, x i is the x-coordinate of any point in the grid, y i is the y coordinate of any point in the grid, z i is the z coordinate of any point in the grid, g is the number of point cloud data in the grid, select the data point closest to the center of gravity and delete other point data until only one data point is left for all small cube data points, completing the point cloud downsampling.

[0123] In a preferred embodiment, the present invention determines the feasible area based on the ground point cloud, and here we use the least square method. First, select the point closest to the laser radar coordinate system as the sample point for fitting the ground plane, then fit the ground plane to obtain the plane equation, then traverse all the points in the point cloud, calculate their distance to the ground plane, set a threshold, and the points within the threshold are ground point clouds, and the points outside the threshold are non-ground point clouds and are directly removed.

[0124] The method for extracting ground point cloud in step S02 includes:

[0125] S21: The xoy plane of the 3D point cloud image is represented as a circle with a radius of r=∞, the robot as the center, and the circle is divided into several discrete sector areas;

[0126] S22: Establish the index of each point to its region. i The partition is represented as:

[0127]

[0128] in, Indicates the partition index number of each point, x i ,y i For p i The x and y coordinate values ​​of the point, α represents the angle of the segmented area;

[0129] S23: Select multiple point clouds after the segmentation area is sorted, and calculate the slope k between the multiple point clouds respectively. When k is less than the threshold th, the point is considered to be a ground point, otherwise it is deleted;

[0130] S24: Use the remaining points as sampling points and use the least squares method to fit the plane to obtain the ground point cloud.

[0131] In a preferred embodiment, the method for determining the obstacle point cloud includes:

[0132] The obtained feasible area interval is compared with the data under the original point cloud. If the height of the points in the feasible area interval in the original point cloud is greater than the set threshold, it is determined to be an obstacle point cloud. The obstacle point cloud in the feasible area interval is filtered out, and the non-practicable area remains unchanged.

[0133] In another embodiment, if Figure 2 As shown, the present invention also discloses a system for determining a drivable area in high-precision map construction of a robot, comprising:

[0134] A data acquisition preprocessing module 10 acquires sensor data and performs preprocessing;

[0135] A ground point cloud extraction module 20 extracts ground point clouds;

[0136] The executable region interval determination module 30 determines the executable region interval, including:

[0137] S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format;

[0138] S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area;

[0139] S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0.

[0140] S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinate as the starting point 2, and repeat step S33 until the next end point is encountered;

[0141] S35: Repeat step S34 until all y are traversed;

[0142] The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

[0143] In a preferred embodiment, an obstacle filtering module 40 is further included, which determines the obstacle point cloud and filters the obstacle point cloud after obtaining the movable area interval.

[0144] The following is a detailed description of the process of the obstacle point cloud filtering method in the drivable area by taking a best embodiment as an example:

[0145] like Figure 3 The figure shows the flow chart of the joint calibration of the LiDAR and the IMU. First, the transformation matrix between the LiDAR and the IMU is set. Then, the relative coordinates of the point cloud and the IMU motion transformation are combined with the above transformations to fuse all the LiDAR points into a point cloud. Then, the average sum of the distances between each point and its nearest neighboring point cloud is calculated. This process is repeated in an optimization process, and the transformation matrix that minimizes this distance is found iteratively. To ensure the accuracy of the results, rotation and translation should be done as much as possible during the calibration process. Then, the point cloud data is recorded.

[0146] Next, preprocess the point cloud

[0147] like Figure 4The following is a flowchart for preprocessing the original point cloud. First, the null value points are processed. The member function of the point cloud object is is_dense(), which returns true if all points are valid. If NaN appears, it means that the distance value measured by the sensor is problematic, perhaps because the sensor is too close or too far away. To remove these NaN points, you can use the pcl_isfinite function to traverse the entire point cloud to check whether a certain value is a normal value; or use the pcl::removeNanFromPointCloud function to remove them directly.

[0148] The next step is to process the points at close and far distances. The distance from the point to the origin can be directly calculated, and the close and far distance thresholds can be set to directly remove the points that are smaller than the close distance threshold and larger than the far distance threshold.

[0149] Finally, the downsampling method is used. The main idea of ​​the algorithm is to voxelize the point cloud first, and then build a grid, each grid contains a certain number of point clouds. The centroid of each grid point cloud is calculated to represent the point cloud of this grid, thereby realizing voxel grid downsampling.

[0150] The steps are as follows:

[0151] 1) Voxelize the point cloud, establish a grid, and determine the side length L of the grid;

[0152] 2) Calculate the grid where the point cloud is located, and divide the point cloud into m×n×l small grids according to the side length L, where m=ceil(L x / L), n = ceil (L y / L), l = ceil(L z / L), L x is the range of the point cloud on the x-axis, L y is the range of the point cloud on the y-axis, L z is the range of the point cloud on the z-axis, ceil(x) is the rounding function, which represents the smallest integer not less than x. The grid formula is:

[0153]

[0154] where x min is the minimum range of the point cloud on the x-axis, y min is the minimum range of the point cloud on the y-axis, z min It is the minimum range of the point cloud on the z-axis.

[0155] In the entire grid code, point P i The grid code is If converted to one-dimensional encoding, point P iThe raster encoding formula is:

[0156]

[0157] 3) Find the grid where each point cloud is located;

[0158] 4) Calculate the centroid of each grid point cloud, and the calculation formula is:

[0159]

[0160] Among them, x i is the x-coordinate of any point in the grid, y i is the y coordinate of any point in the grid, z i is the z coordinate of any point in the grid, g is the number of point cloud data in the grid, select the data point closest to the center of gravity and delete other point data until only one data point is left for all small cube data points, completing the point cloud downsampling.

[0161] like Figure 5 The following is an algorithm for fitting the ground using the least squares method. The specific steps are as follows:

[0162] 1. Sort the unordered point cloud and select a part of the ground point cloud data points, which are called sampling data points in this paper. The sampling data points are usually points on the road surface.

[0163] 2. Set the sampling point p i Substitute the formula to find the equation of the fitting plane:

[0164] aX+bY+c=Z

[0165] Where X represents the coordinate value of the x-axis, Y represents the coordinate value of the y-axis, Z represents the coordinate value of the z-axis, and a, b, and c are coefficients;

[0166] 3. All points p i Substitute into the formula and find the error:

[0167] loss=|z-ax-by-c|

[0168] The obtained error value loss is compared with the threshold th. If it is less than the threshold, it is considered to be a ground point cloud, otherwise it is considered to be non-ground.

[0169] However, the effect of using the least squares method to fit the ground is directly related to the selection of sampling points. The present invention uses a part of the ground point cloud for sampling. How to obtain the correct part of the ground point cloud, then use the ray filtering algorithm, the steps are as follows:

[0170] The xoy plane of the 3D point cloud is represented as a circle with a radius of r = ∞ and the robot as the center. The circle is divided into several discrete sectors. Figure 6 shown.

[0171] Among them, Δα represents the angle of the segmentation area, and the general value is 0.18°, which divides the point cloud into 2000 blocks, and each area contains a certain number of point clouds.

[0172] As mentioned in the point cloud features above, point cloud data is disordered. In order to distinguish the 2000 regions, an index to its region is established for each point. i The partition representation of this paper uses the following formula:

[0173]

[0174] in, Indicates the partition index number of each point, x i ,y i Indicates p i The x and y coordinate values ​​of the point Δα represent the angle of the segmented area. Each area is generally a ray-shaped data such as Figure 7 shown.

[0175] where p 1 、p 2 、p 3 is the point cloud sorted in this area, and p is calculated respectively. 1 、p 2 、p 3 When k is less than the threshold t, the point is considered to be a ground point, otherwise it is deleted. Figure 8 shown.

[0176] where p 3 、p 4 If the slope k is greater than the threshold th, delete the pth 4 After calculating p 3 、p 5 The slope k is less than the threshold th and p is retained 5 .

[0177] The remaining points become sampling points, and then the ground point cloud is obtained by fitting the plane using the least squares method. At this point, the ground point cloud extraction is completed.

[0178] like Fig. 9 The following is a flowchart for determining the executable area interval. First, a frame of point cloud image is read, and then Fig.10 As shown, first use α as the division value to scan the entire point cloud counterclockwise and divide it into two halves. Fig.11 The x-axis of the data structure shown is the y-axis, and the point cloud is divided equally at a distance of l from the origin. The number of points in each grid is filled into the array.

[0179] This completes the conversion of the format of a frame of point cloud image, and then you can follow Fig. 9The flowchart shown is used to determine the executable area.

[0180] In the previous step, the ground point cloud extracted can only roughly determine the usable area, but for obstacles in the area, the lidar can only receive the laser emitted from its surface, and the obstacle point cloud is reflected as a cavity on the ground point cloud. Based on this feature, we propose a new way to locate them.

[0181] Before introducing the implementation steps, we first introduce a data structure for storing point cloud images, which will be used in the following. Its structure is a two-dimensional array, the origin of the x-axis is the x-axis of the laser radar coordinate system, and then the entire point cloud is scanned 360° counterclockwise, with m as the division value and distributed in equal proportion on the x-axis. The y-axis is the distance from the point to the origin, which can be n meters as the division value. The value in the array is the number of points in each square.

[0182] The following are the steps to determine the exercisable range:

[0183] 1. Store the ground point cloud and the original point cloud in a new data structure.

[0184] 2. Since the autonomous robot itself is already in the executable area, the first coordinate on the y-axis in the k-th unit interval of the x-axis is defined as the starting point of the executable area, that is, (k, 1) is the starting point.

[0185] 3. Then start to calculate the average number of points in the positive direction of the y-axis. Since the grid is actually fan-shaped when it is divided, this average value should increase slightly. When encountering the cavity of the obstacle, the amplitude of this value change is not very large, but when reaching the end of the executable area, the next grid midpoint will be greatly reduced until it is 0. Therefore, the end of the executable area can be determined by the rate of point growth. Assuming it is the pth coordinate of the y-axis, (k,p) is defined as the end point. The rate of point growth can be determined by the slope, and the slope can be obtained by differentiation.

[0186] 4. Sometimes the autonomous robot does not drive along a straight road, but may drive to some special situations, such as intersections, curved roads, etc. At this time, the point cloud under this data structure has a value on the y axis and a null value on the y axis. Therefore, based on 3, the average is set to zero, and the traversal continues in the positive direction of the y axis. When the first non-zero value is encountered, it is recorded in the average, and the coordinate is marked as the starting point of the executable area 2 (i.e. Fig. 9 ), and then repeat the operation in 3 until the end of the next executable area is encountered.

[0187] 5. Repeat step 4 until y is traversed to the end.

[0188] Through the previous operations, the range of the executable area can be determined. The starting and ending coordinates are within the executable area, and the meaning of the point is the ground point. Since segmenting the ground point cloud does not change the original point cloud, the difference between the original point cloud and the ground point cloud is that the obstacle cavity and the point cloud in the non-executable area are filled. The only difference is that the obstacle point cloud is within the range of the executable area.

[0189] In the previous step, the coordinate pairs of the executable area interval are determined, and then the original point cloud format is converted. The entire point cloud map is traversed first, and the coordinate grid of the point is determined. If it is between the coordinate pairs of the executable interval, its height is determined whether it is less than the obstacle threshold height. If it is, continue, otherwise filter the point.

[0190] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for determining a drivable area in high-precision map construction of a robot, characterized in that: The following steps are involved: S01: Acquire sensor data and perform preprocessing; the preprocessing method includes: S11: Processing of null value points; S12: Calculate the distance from the point to the origin, set a near distance threshold and a far distance threshold, and directly remove points that are smaller than the near distance threshold and larger than the far distance threshold; S13: Downsampling point cloud processing, the steps are as follows: 1) Voxelize the point cloud, create a grid, and determine the side length of the grid L ; 2) Calculate the grid where the point cloud is located, and divide the point cloud into A small grid, where , , , is the range of the point cloud on the x-axis, is the range of the point cloud on the y-axis, is the range of the point cloud on the z-axis, is the rounding function, which means not less than The smallest integer for any point , the grid formula is: , in is the minimum range of the point cloud on the x-axis, is the minimum range of the point cloud on the y-axis, is the minimum range of the point cloud on the z-axis; In the entire grid encoding, point The grid code is , if converted to one-dimensional encoding, point The raster encoding formula is: , 3) Find the grid where each point cloud is located; 4) Calculate the centroid of each grid point cloud, and the calculation formula is: , in, is the x-coordinate of any point in the grid, is the y coordinate of any point in the grid, is the z coordinate of any point in the grid, is the number of point cloud data in the grid. The data point closest to the center of gravity is selected and other point data are deleted until only one data point is left in all small cube data points, completing the point cloud downsampling. S02: Extracting ground point cloud; the method for extracting ground point cloud comprises: S21: The three-dimensional point cloud The plane is represented as A circle with a radius of , with the robot as the center, and this circle is divided into several discrete sectors; S22: Establish the index of each point to its region. The partitions are represented as: , in, Represents the partition index number of each point, , for Pointed , The coordinate value of Indicates the angle of the segmented area; S23: Select multiple point clouds after the segmentation area is sorted, and calculate the slopes between the multiple point clouds respectively. ,when Less than threshold , the point is considered to be a ground point, otherwise it is deleted; S24: Use the remaining points as sampling points and use the least squares method to fit the plane to obtain the ground point cloud; S03: Determine the applicable area, including: S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format; S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area; S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0. S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinates of the first non-zero value point as starting point 2, and repeat step S33 until the next end point is encountered; S35: Repeat step S34 until all y are traversed; The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

2. The method for determining the drivable area in high-precision map construction of a robot according to claim 1, characterized in that: Before the step S01 acquires the sensor data, the step also includes jointly calibrating the radar and the inertial measurement unit IMU, including: Get lidar data and IMU data; Downsampled LiDAR point cloud, corresponding to the timestamps of point cloud and IMU data; Set the transformation matrix, transform the lidar point cloud in combination with the IMU data, and fuse it into the world coordinate system W; Find the average sum of the distances between each point in the world coordinate system and the nearest neighboring point cloud, and iterate continuously to obtain the transformation matrix.

3. The method for determining the drivable area in high-precision map construction of a robot according to claim 1, characterized in that: After obtaining the feasible area, the obstacle point cloud is determined and filtered.

4. The method for determining the drivable area in high-precision map construction of a robot according to claim 3, characterized in that: The method for determining an obstacle point cloud comprises: The obtained feasible area interval is compared with the data under the original point cloud. If the height of the points in the feasible area interval in the original point cloud is greater than the set threshold, it is determined to be an obstacle point cloud.

5. A system for determining drivable areas in high-precision map construction for robots, characterized in that: include: Data acquisition and preprocessing module, which acquires sensor data and performs preprocessing; The pretreatment method comprises: S11: Processing of null value points; S12: Calculate the distance from the point to the origin, set a near distance threshold and a far distance threshold, and directly remove points that are smaller than the near distance threshold and larger than the far distance threshold; S13: Downsampling point cloud processing, the steps are as follows: 1) Voxelize the point cloud, create a grid, and determine the side length of the grid L ; 2) Calculate the grid where the point cloud is located, and divide the point cloud into A small grid, where , , , is the range of the point cloud on the x-axis, is the range of the point cloud on the y-axis, is the range of the point cloud on the z-axis, is the rounding function, which means not less than The smallest integer for any point , the grid formula is: , in is the minimum range of the point cloud on the x-axis, is the minimum range of the point cloud on the y-axis, is the minimum range of the point cloud on the z-axis; In the entire grid encoding, point The grid code is , if converted to one-dimensional encoding, point The raster encoding formula is: , 3) Find the grid where each point cloud is located; 4) Calculate the centroid of each grid point cloud, and the calculation formula is: , in, is the x-coordinate of any point in the grid, is the y coordinate of any point in the grid, is the z coordinate of any point in the grid, is the number of point cloud data in the grid. The data point closest to the center of gravity is selected and other point data are deleted until only one data point is left in all small cube data points, completing the point cloud downsampling. The ground point cloud extraction module extracts the ground point cloud; the method for extracting the ground point cloud includes: S21: The three-dimensional point cloud The plane is represented as A circle with a radius of , with the robot as the center, and this circle is divided into several discrete sectors; S22: Establish the index of each point to its region. The partitions are represented as: , in, Represents the partition index number of each point, , for Pointed , The coordinate value of Indicates the angle of the segmented area; S23: Select multiple point clouds after the segmentation area is sorted, and calculate the slopes between the multiple point clouds respectively. ,when Less than threshold , the point is considered to be a ground point, otherwise it is deleted; S24: Use the remaining points as sampling points and use the least squares method to fit the plane to obtain the ground point cloud; The method of determining the executable area interval by the module and determining the executable area interval includes: S31: Scan the entire point cloud counterclockwise with m as the division value and divide it equally as the x-axis of the data structure, divide the point cloud equally with the distance n from the origin as the y-axis, fill the number of points in each grid into the array, and convert the point cloud image into a format; S32: In the kth unit interval of the x-axis, define the first coordinate on the y-axis as the starting point (k, 1) of the executable area; S33: Calculate the average number of points and the point growth rate in the positive direction of the y-axis. When the point growth rate is 0, obtain the end point coordinates and set the average number of points to 0. S34: Continue traversing in the positive direction of the y-axis, record the first non-zero value in the average number of points, and mark the coordinates of the first non-zero value point as starting point 2, and repeat step S33 until the next end point is encountered; S35: Repeat step S34 until all y are traversed; The internal area of ​​the obtained starting coordinates and end point coordinates is used as the executable area interval.

6. The system for determining the drivable area in high-precision map construction of a robot according to claim 5, characterized in that: It also includes an obstacle filtering module, which determines the obstacle point cloud and filters the obstacle point cloud after obtaining the operable area interval.

7. A method for filtering obstacle point clouds in a drivable area in a robot high-precision map construction, characterized in that: After obtaining the drivable area interval by using the drivable area determination method described in any one of claims 1-2, the obstacle point cloud is determined and the obstacle point cloud is filtered.