Ground Detection Method, Device, Vehicle and Storage Medium

The method uses fan-shaped grids and PCA plane fitting to enhance ground detection in laser radar systems, addressing real-time and filtering inefficiencies by adapting to the dense and sparse nature of point cloud data, thereby improving computational efficiency and detection precision.

CN115542346BActive Publication Date: 2025-07-15CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211287725.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2025-07-15
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

In the prior art, ground filtering and removal problems have poor real-time performance and poor filtering effect in lidar point cloud data, especially when dealing with sparse point clouds in distance, it is difficult to meet the real-time requirements of autonomous driving.

Method used

The PCA plane fitting method is used to initialize and fit the sector grid. By filtering out the grilled grids with verticality, average height and flatness that meet the preset requirements, and correcting the grid plane equation, the distance from point to grid plane is calculated to filter out the ground points.

Benefits of technology

It realizes the rapid and accurate filtering of ground points in lidar point cloud data, improves computing efficiency and detection accuracy, and meets the real-time requirements of autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115542346B_ABST
    Figure CN115542346B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of lidar detection, and particularly to a ground detection method, device, vehicle, and storage medium. The method includes: collecting point cloud data of the vehicle's surrounding environment and initializing a preset fan-shaped grid; allocating the point cloud data to the preset fan-shaped grid, performing PCA plane fitting on each fan-shaped grid, and screening out qualified fan-shaped grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted fan-shaped grids; and correcting the plane equation corresponding to the qualified fan-shaped grids, calculating the first point-plane distance from each point in each fan-shaped grid to the grid plane obtained from the corrected plane equation, and taking the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground. Thus, the problem that the ground filtering in the related art lacks real-time performance and has a poor filtering effect is solved, and the effect of real-time and accurate ground filtering can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of lidar detection, and particularly to a ground detection method, device, vehicle, and storage medium. Background Art

[0002] In recent years, with the development of automotive "intelligence", more and more mass-produced vehicles have begun to install lidar, using multi-sensors such as lidar, cameras, and millimeter-wave radars to meet the autonomous driving function in specific scenarios. Since lidar point clouds can provide 3D information of objects, they have been highly sought after. However, the characteristics of lidar 3D point clouds, such as no texture information, large data volume, and disorder, pose more challenges to algorithms. Among them, the most urgent challenge is that the algorithm needs to efficiently and accurately process lidar 3D point cloud information to meet the real-time requirements of autonomous driving.

[0003] Since a considerable part of the points in the lidar 3D point cloud data are ground information, removing the points on the ground before target detection can not only reduce the calculation amount and shorten the calculation time, but also improve the detection accuracy. Therefore, ground detection is a crucial step in traditional lidar target detection.

[0004] The commonly used ground detection algorithms in related technologies are to first divide the point cloud into pre-set grids or voxels, and then perform RANSAC (Random Sample Consensus) plane fitting on each grid or voxel respectively, and use the Euclidean distance from the point to the plane to screen out the final ground points that meet the requirements. Another method is to use three-dimensional voxels instead of two-dimensional grids, making full use of the three-dimensional point cloud information. In addition to the distance from the point to the plane, the elevation value (Z value) is also added as a judgment condition to determine whether a point belongs to a ground point.

[0005] However, although the first method has high fitting accuracy, its running time is relatively long, which cannot meet the real-time requirements of lidar algorithms. Moreover, this method does not make good use of the characteristic that lidar point clouds are denser near and sparser far away. Dividing the fan-shaped area equally is difficult to meet the requirements of the far-end area. At the same time, this scheme only uses one Euclidean distance as the judgment condition for whether the final point cloud is the ground, and it is difficult to achieve robustness, so the expected ground filtering effect cannot be achieved. The other method still does not make full use of the property that lidar is denser near and sparser far away. For the voxels in the distance, it is challenging to fit a plane that meets the requirements using sparse point clouds. It is difficult to achieve real-time performance by using the time-consuming method of RANSAC to fit the plane. At the same time, this scheme does not consider the characteristic that the ground is a continuously changing plane to filter non-ground points, so the expected ground filtering effect cannot be achieved either. Summary of the Invention

[0006] The present application provides a ground detection method, device, vehicle and storage medium to solve the problems that ground filtering in related technologies lacks real-time performance and has poor filtering effect, and can achieve the effect of real-time and accurate ground filtering.

[0007] In a first aspect embodiment of the present application, a ground detection method is provided, including the following steps: collecting point cloud data of the vehicle surrounding environment and initializing a preset fan-shaped grid; allocating the point cloud data to the preset fan-shaped grid, performing PCA plane fitting on each fan-shaped grid, and screening out qualified fan-shaped grids whose verticality, average height and / or flatness meet preset requirements from the fitted fan-shaped grids; and correcting the plane equation corresponding to the qualified fan-shaped grids, calculating the first point-plane distance from each point in each fan-shaped grid to the grid plane obtained from the corrected plane equation, and taking the points with the first point-plane distance less than a first preset distance as ground points to generate an actual ground.

[0008] According to the above technical means, the present application can solve the problems that ground filtering in related technologies lacks real-time performance and has poor filtering effect, and can achieve the effect of real-time and accurate ground filtering.

[0009] Optionally, in some embodiments, the initializing the preset fan-shaped grid includes: dividing the preset fan-shaped grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; obtaining the maximum value of the number of point clouds in each grid in different scenarios, and using the maximum value of the number of point clouds in each grid as the reserved space for the point cloud data of each grid point when initializing the preset fan-shaped grid.

[0010] According to the above technical means, the present application can initialize the fan-shaped grid, adapt to the characteristics of the laser radar point cloud being dense near and sparse far away, improve the calculation efficiency, and enhance the detection accuracy.

[0011] Optionally, in some embodiments, the preset radial length is:

[0012] ρ r-1 ≤ρ r <ρ r+1 (r>1);

[0013]

[0014] where ρ is the radial distance, r is the number of circles, FOV is the field of view of the laser radar, N r is the number of fan-shaped grids in the r-th circle, and θ r is the fan-shaped grid angle.

[0015] According to the above technical means, the present application can adapt to the characteristics of the laser radar point cloud being dense near and sparse far away, improve the calculation efficiency, and enhance the detection accuracy.

[0016] Optionally, in some embodiments, the step of allocating the point cloud data to the preset sector grids includes: allocating the point cloud data to the preset sector grids based on a preset allocation formula, where the preset allocation formula is:

[0017]

[0018] θ k = actan(y k , x k );

[0019] where ρ k is the radial distance of each point, θ k is the angle of each point, x k is the X-axis coordinate value of the k-th point, and y k is the Y-axis coordinate value of the k-th point.

[0020] By the above technical means, the present application can eliminate noise points and improve the accuracy of subsequent PCA plane fitting.

[0021] Optionally, in some embodiments, the step of performing PCA plane fitting on each sector grid includes: traversing each sector grid, screening the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted for each sector grid; using a preset PCA method to fit a plane equation to the point cloud data to be fitted for each sector grid to obtain an initial grid plane equation; calculating the second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and screening out the point cloud data with a second point-plane distance less than a second preset distance as the point cloud data to be fitted for fitting until a preset condition is met to obtain a final grid plane equation.

[0022] By the above technical means, the present application adopts a method of PCA plane fitting, and only needs to iterate several times to obtain an ideal result, which greatly shortens the running time of plane fitting and effectively improves the running speed.

[0023] Optionally, in some embodiments, screening out the qualified sector grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted sector grids includes: calculating the verticality of the fitted sector grids, and screening out the first target sector grids whose verticality is greater than the first threshold; calculating the average height of each first target sector grid, and screening out the second target sector grids whose average height is less than the preset height; obtaining the third target sector grids in the target area among the second target sector grids, calculating the flatness of the third target sector grids, and obtaining the qualified sector grids based on the flatness of the third target sector grids and the flatness of the target area.

[0024] According to the above technical means, the present application can screen out the grids that meet the requirements by judging the verticality, elevation, and flatness of the grids.

[0025] Optionally, in some embodiments, correcting the plane equation corresponding to the qualified sector grids based on the qualified sector grids includes: for each qualified sector grid, obtaining a plurality of adjacent qualified sector grids of each qualified sector grid; correcting the plane equation coefficients of the current each qualified sector grid according to the weights of each qualified sector grid and the weights of the plurality of adjacent qualified sector grids, and obtaining the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

[0026] According to the above technical means, the present application traverses the grids containing the ground, finds the adjacent multiple grids, and then performs a weighted average on the plane equations of the grids and the grids in the domain to realize the correction of the plane of the grids containing the ground.

[0027] Optionally, in some embodiments, calculating the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation includes: calculating the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation based on a preset first point-plane distance calculation formula, where the preset first point-plane distance calculation formula is:

[0028]

[0029] where x, y, z are the coordinate values of the corresponding X, Y, Z coordinate axes of the grid point cloud, is the plane coefficient of the grid after being corrected.

[0030] According to the above technical means, the present application can traverse the distances from each point in the sector grid to the corrected grid plane, screen out the points less than the threshold as ground points, screen out the ground points, and save the indexes of the ground points.

[0031] The second aspect of the present application provides a ground detection device, including: an acquisition module, configured to acquire point cloud data of the vehicle surrounding environment and initialize a preset sector grid; a fitting module, configured to allocate the point cloud data to the preset sector grid, perform PCA plane fitting on each sector grid, and screen out qualified sector grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted sector grids; and a correction module, configured to correct the plane equation corresponding to the qualified sector grids, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and use the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground.

[0032] Optionally, in some embodiments, the acquisition module is further configured to: divide the preset sector grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; obtain the maximum value of the point cloud quantity in each grid in different scenarios, and use the maximum value of the point cloud quantity in each grid as the reserved space for the point cloud data of each grid point when initializing the preset sector grid.

[0033] Optionally, in some embodiments, the preset radial length is:

[0034] ρ r-1 ≤ρ r <ρ r+1 (r>1);

[0035]

[0036] where ρ is the radial distance, r is the number of circles, FOV is the field of view angle of the lidar, N r is the number of sector grids in the r-th circle, and θ r is the sector grid angle.

[0037] Optionally, in some embodiments, the fitting module is further configured to: allocate the point cloud data to the preset sector grid based on a preset allocation formula, where the preset allocation formula is:

[0038]

[0039] θ k = actan(y k , x k );

[0040] where ρ k is the radial distance of each point, θ k is the angle of each point, x k is the X-axis coordinate value of the k-th point, and y kIt is the Y-axis coordinate value of point k.

[0041] Optionally, in some embodiments, the fitting module is further configured to: traverse each sector grid, and filter the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted for each sector grid; use a preset PCA method to fit a plane equation to fit the point cloud data to be fitted for each sector grid to obtain an initial grid plane equation; calculate the second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and filter out the point cloud data with a second point-plane distance less than a second preset distance as the point cloud data to be fitted for fitting until a preset condition is met to obtain a final grid plane equation.

[0042] Optionally, in some embodiments, the fitting module is further configured to: calculate the perpendicularity of the fitted sector grid, and filter out the first target sector grids with a perpendicularity greater than a first threshold; calculate the average height of each first target sector grid, and filter out the second target sector grids with an average height less than a preset height; obtain the third target sector grids in the target area among the second target sector grids, calculate the flatness of the third target sector grids, and obtain the qualified sector grids based on the flatness of the third target sector grids and the flatness of the target area.

[0043] Optionally, in some embodiments, the correction module is further configured to: for each qualified sector grid, obtain a plurality of adjacent qualified sector grids of each qualified sector grid; correct the plane equation coefficients of the current each qualified sector grid according to the weights of each qualified sector grid and the weights of the plurality of adjacent qualified sector grids, and obtain the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

[0044] Optionally, in some embodiments, the correction module is further configured to: based on a preset first point-plane distance calculation formula, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, where the preset first point-plane distance calculation formula is:

[0045]

[0046] where x, y, and z are the coordinate values of the corresponding X, Y, and Z coordinate axes of the grid point cloud, are the plane coefficients of the corrected grid.

[0047] A third - aspect embodiment of the present application provides a vehicle, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the program to implement the ground detection method as described in the above - mentioned embodiment.

[0048] A fourth - aspect embodiment of the present application provides a computer - readable storage medium, on which a computer program is stored. The program is executed by a processor to implement the ground detection method as described in the above - mentioned embodiment.

[0049] Thus, by collecting the point - cloud data of the vehicle surrounding environment, initializing a preset sector grid, allocating the point - cloud data to the preset sector grid, performing PCA plane fitting on each sector grid, screening out the qualified sector grids whose perpendicularity, average height, and / or flatness meet the preset requirements from the fitted sector grids, correcting the plane equations corresponding to the qualified sector grids, calculating the first point - to - plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and taking the points with the first point - to - plane distance less than the first preset distance as ground points to generate the actual ground. Thus, the problem that the ground filtering in the related technology lacks real - time performance and has a poor filtering effect is solved, and the effect of real - time and accurate ground filtering can be achieved.

[0050] Additional aspects and advantages of the present application will be given in part in the following description, will become apparent in part from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The above - mentioned and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0052] Figure 1 is a flowchart of the ground detection method according to an embodiment of the present application;

[0053] Figure 2 is a schematic diagram of a 2D sector grid according to a specific embodiment of the present application;

[0054] Figure 3 is a schematic diagram of grid initialization point selection according to a specific embodiment of the present application;

[0055] Figure 4 is a flowchart of PCA fitting plane according to a specific embodiment of the present application;

[0056] Figure 5 is a flowchart of determining whether a grid contains the ground according to a specific embodiment of the present application;

[0057] Figure 6Schematic diagram of height thresholds at different radial distances provided according to a specific embodiment of the present application;

[0058] Figure 7 Schematic diagram of grid domain weights provided according to a specific embodiment of the present application;

[0059] Figure 8 Flow chart of a ground detection method provided according to a specific embodiment of the present application;

[0060] Figure 9 Block diagram of a ground detection device provided according to an embodiment of the present application;

[0061] Figure 10 Schematic diagram of a vehicle provided according to an embodiment of the present application.

[0062] Explanation of reference numerals: 10 - ground detection device, 100 - acquisition module, 200 - fitting module, and 300 - correction module. Detailed description of the specific implementation

[0063] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application and should not be construed as a limitation of the present application.

[0064] The ground detection method, device, vehicle, and storage medium of the embodiments of the present application will be described below with reference to the accompanying drawings. In view of the problems in the related art that the ground filtering is not real-time and the filtering effect is poor, the present application provides a ground detection method. In this method, by collecting the point cloud data of the vehicle surrounding environment, initializing a preset fan-shaped grid, allocating the point cloud data to the preset fan-shaped grid, performing PCA plane fitting on each fan-shaped grid, screening out the qualified fan-shaped grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted fan-shaped grids, correcting the plane equation corresponding to the qualified fan-shaped grids, calculating the first point-plane distance from each point in each fan-shaped grid to the grid plane obtained from the corrected plane equation, and taking the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground. Thus, the problems in the related art that the ground filtering is not real-time and the filtering effect is poor are solved, and the effect of real-time and accurate ground filtering can be achieved.

[0065] Specifically, Figure 1 Schematic flow chart of a ground detection method provided by an embodiment of the present application.

[0066] As Figure 1 shown, the ground detection method includes the following steps:

[0067] In step S101, point cloud data of the vehicle surrounding environment is collected, and a preset fan-shaped grid is initialized.

[0068] Optionally, in some embodiments, initializing the preset fan-shaped grid includes: dividing the preset fan-shaped grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; obtaining the maximum value of the number of point clouds in each grid in different scenarios, and using the maximum value of the number of point clouds in each grid as the reserved space for the point cloud data of each grid when initializing the preset fan-shaped grid.

[0069] Optionally, in some embodiments, the preset radial length can be formula (1), and the preset grid angle is formula (3).

[0070] ρ r-1 ≤ρ r <ρ r+1 (r>1); (1)

[0071] ρ0<ρ1<ρ2<ρ3<ρ4; (2)

[0072]

[0073] Where ρ is the radial distance, r is the number of circles, FOV is the field of view angle of the lidar, N r is the number of fan-shaped grids in the r-th circle, and θ r is the fan-shaped grid angle.

[0074] Specifically, in the embodiments of the present application, the point cloud data around the vehicle can be collected by a lidar, and the collection range can be specified according to the range of the lidar. In the embodiments of the present application, first, the lidar point cloud in the range of 1.5m - 70m is divided into 4 regions, denoted as Z1, Z2, Z3, and Z4 respectively. According to the characteristic that the lidar point cloud is denser near and sparser far away, the lidar is divided into 4 regions with different radial distances (smaller near and larger far away), as Figure 2 shown. The radial distance and the fan-shaped angle of the fan-shaped grid in each region are the same. Among them, the radial length of the fan-shaped grid is as shown in formula (1), and the fan-shaped grid angle is as shown in formula (3). Z1, Z2, Z3, and Z4 are arranged outward in sequence, so the corresponding fan-shaped regions of these 4 parts are getting larger and larger. Not only the radial length becomes larger, but the grid angle also increases accordingly, so as to adapt to the characteristic that the lidar is denser near and sparser far away. This is beneficial to improving the calculation efficiency and enhancing the ground detection accuracy.

[0075] It should be noted that the grid size should not be too small. A too small grid will incur additional computing power overhead, making the algorithm unable to meet the real-time requirements. However, the grid should not be too large either, as a too large grid is prone to missing detections on the ground. Therefore, the radial threshold for each region in this application can be as shown in formula (4):

[0076]

[0077] To shorten the algorithm running time and save space overhead, a certain amount of space is reserved during the initialization of each grid. The specific method is as follows: First, count the number of laser point clouds in each grid multiple times under different scenarios, and then record the maximum value of the number of point clouds in each grid. When initializing the sector grid, use the maximum value of the number of point clouds in the grid as the reserved space for the grid point cloud, ensuring both the running speed and the minimum space overhead during the point cloud allocation process.

[0078] In step S102, the point cloud data is allocated to a preset sector grid, and PCA plane fitting is performed on each sector grid. Then, qualified sector grids whose perpendicularity, average height, and / or flatness meet the preset requirements are selected from the fitted sector grids.

[0079] Optionally, in some embodiments, performing PCA plane fitting on each sector grid includes: traversing each sector grid, screening the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted for each sector grid; using a preset PCA method to fit the plane equation and fitting the point cloud data to be fitted for each sector grid to obtain the initial grid plane equation; calculating the second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and screening out the point cloud data with a second point-plane distance less than a second preset distance as the point cloud data to be fitted for fitting until the preset conditions are met to obtain the final grid plane equation.

[0080] Specifically, the collected laser point cloud is allocated to a 2D sector grid. All laser point clouds are traversed, and the radial distance ρ and angle θ of each point are calculated. The calculation formulas are as shown in formulas (5)-(6).

[0081] Optionally, in some embodiments, allocating the point cloud data to a preset sector grid includes: based on a preset allocation formula, allocating the point cloud data to a preset sector grid, where the preset allocation formula is:

[0082]

[0083] θ k =actan(y k ,x k ); (6)

[0084] Among them, ρ k is the radial distance of each point, θ k is the angle of each point, x k is the X-axis coordinate value of point k, and y k is the Y-axis coordinate value of point k.

[0085] Use the radial distance ρ and the angle θ to find the index of the sector grid, and then put the index of this point into the corresponding grid. Since the angular index boundaries of the point clouds of different FOV lidars are different, judgments need to be made.

[0086] In order to eliminate noise and improve the accuracy of subsequent PCA plane fitting, the embodiments of the present application can screen out the points used for PCA plane fitting, traverse each sector grid, and sort the points of each sector grid according to the z value to find suitable points as the initial points for PCA plane fitting. As Figure 3 shown, the specific operations are as follows:

[0087] (a) First, according to heap sorting, find the first n points with the smallest z value (n = 20 in this application). To speed up the operation, this application adopts a heap sorting scheme to reduce the sorting time consumption.

[0088] (b) Then calculate the average value of the z values of these n points as the initial height h init .

[0089] (c) Next, calculate the lower limit h margin of the z value of the grid, and the calculation formula is shown in formula (7):

[0090] h margin = h init * margin; (7)

[0091] Among them, margin = -1.05.

[0092] (d) Then calculate the upper limit h max of the z value of the grid, and the calculation formula is shown in formula (8):

[0093] h max = h init + h seed ; (8)

[0094] Among them, h seed = 0.2.

[0095] (e) Finally, screen out the point cloud that meets the condition of formula (9).

[0096] h margin ≤ z < h max ; (9)

[0097] Among them: z represents the z value of the laser point cloud.

[0098] Use the PCA method to fit the plane equation. In order to improve the running speed, this application adopts the PCA method to fit the plane, and the points selected and fitted to the plane will be more stable and accurate. Select these points and calculate their mean value M and covariance C.

[0099] Then, solve the plane equation of the grid by calculating the eigenvalues of the covariance.

[0100] Cx α =λ α x α ; (10)

[0101] Where C is the covariance, α = 1, 2, 3, and λ α is the eigenvalue, and λ1 ≥ λ2 ≥ λ3.

[0102] The eigenvector x3 corresponding to the minimum eigenvalue λ3 is the normal vector of the grid plane equation. Therefore, the normal vector of the grid plane equation is:

[0103] n = x3 = [a, b, c] T ; (11)

[0104] The plane equation is:

[0105] ax + by + cz + d = 0; (12)

[0106] Where x, y, and z are the coordinate values of the corresponding X, Y, and Z coordinate axes of the grid point cloud, and a, b, c, and d are the plane equation coefficients.

[0107] After using the PCA method to fit the plane equation, the initial grid plane equation can be obtained. In order to obtain a more robust result, this application can perform 3 - 4 iterations, traverse all the points of the grid, calculate the distance from the points to the plane equation, select the points that meet the conditions, and then calculate the covariance and the plane equation, and repeat this several times. As Figure 4 shown. Using this method, an ideal result can be obtained only after several iterations, which greatly shortens the running time of plane fitting.

[0108] Optionally, in some embodiments, select qualified sector grids whose perpendicularity, average height, and / or flatness meet the preset requirements from the fitted sector grids, including: calculating the perpendicularity of the fitted sector grids, and selecting the first target sector grids whose perpendicularity is greater than the first threshold; calculating the average height of each first target sector grid, and selecting the second target sector grids whose average height is less than the preset height; obtaining the third target sector grids in the target area among the second target sector grids, calculating the flatness of the third target sector grids, and obtaining the qualified sector grids based on the flatness of the third target sector grids and the flatness of the target area.

[0109] Those skilled in the art can understand that in the embodiments of the present application, it is necessary to determine which planes fitted by the fan-shaped grids contain the ground and which grids do not contain the ground. The specific process is as Figure 5 shown.

[0110] Calculate the perpendicularity u between the grid plane and the Z-axis of the lidar coordinate system. The definition of the plane perpendicularity is shown in formula (13):

[0111]

[0112] where: v n is the normal vector of the grid plane, z is the direction vector of the Z-axis in the lidar coordinate system, and in the present application, z = (0, 0, 1), and θ τ is the threshold of the perpendicularity. Here, 0.7854 is selected, that is, 45°.

[0113] Calculate the average height h of the grid z , in order to exclude flat areas such as the roof of the vehicle, it is necessary to limit the average height of the grid, and at the same time, it can also ensure that the ground is smoother. Different height thresholds are adopted for different radial distance regions, as Figure 6 shown. In the present application, different thresholds are adopted for 4 different regions, specifically as shown in formula (14) (here it is assumed that the ground plane Z = 0):

[0114]

[0115] For the points in the Z1 and Z2 regions, it is also necessary to calculate their flatness f. The definition of the flatness f is shown in formula (15):

[0116]

[0117] where, λ α is the eigenvalue.

[0118] In the present application, the flatness thresholds of the 4 regions are different, and the flatness threshold of each region is shown in formula (16):

[0119]

[0120] By judging the perpendicularity, elevation and flatness of the grid, the grids that meet the requirements (i.e., the grids containing ground points) can be screened out, and then the plane equations of these grids that meet the requirements are corrected, and finally the ground points can be obtained.

[0121] In step S103, correct the plane equation corresponding to the qualified sector grid, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and use the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground.

[0122] Optionally, in some embodiments, based on the qualified sector grid, correcting the plane equation corresponding to the qualified sector grid includes: for each qualified sector grid, obtaining a plurality of adjacent qualified sector grids of each qualified sector grid; correcting the plane equation coefficients of the current each qualified sector grid according to the weights of each qualified sector grid and the weights of the plurality of adjacent qualified sector grids, and obtaining the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

[0123] Specifically, after screening out the grids that meet the requirements in the embodiments of the present application, the grids can be corrected, and the grid plane containing the ground is corrected. First, traverse the grids containing the ground, find the adjacent 8 grids, and then perform a weighted average on the grid plane equations of the grid and its neighborhood. The weighting coefficients can be as Figure 7 shown. Figure 7 Among them, the grid with a weight of 3 is the grid containing the ground. Note that if there are grids that do not contain ground points in the neighborhood, the weight of this grid is set to 0.

[0124] The grid plane correction equation is shown in equations (17)-(20):

[0125]

[0126] Where, λ i is the weight of each grid. When the grid is a grid that does not contain ground points, λ i = 0, a i , b i , c i , d i are the plane equation coefficients of each grid, are the plane coefficients of the corrected grid.

[0127] Screen out the ground points and save the indexes of the ground points. Traverse the distance from each point in the sector grid to the corrected grid plane, and screen out the points less than the threshold as the ground points. The formula for the distance from a point to the corrected plane is shown in formula (21):

[0128]

[0129] Where, x, y, z are the coordinate values of the corresponding X, Y, Z coordinate axes of the grid point cloud, are the plane coefficients of the corrected grid.

[0130] To enable those skilled in the art to further understand the ground detection method of the embodiments of the present application, the following will be elaborated in detail with specific embodiments.

[0131] As Figure 8 shown, Figure 8 FIG. is a flowchart of the ground detection method according to the embodiments of the present application.

[0132] Step 1: Start the vehicle-mounted lidar and collect the lidar point cloud of the vehicle surrounding environment.

[0133] Step 2: Initialize the 2D sector grid.

[0134] Step 3: Assign the collected lidar point cloud to the 2D sector grid.

[0135] Step 4: Perform PCA plane fitting on each sector grid.

[0136] Step 5: Calculate the perpendicularity of the plane and the Z-axis of the lidar coordinate system, the elevation and the flatness of the plane, and then use this information to filter out the qualified sector grids.

[0137] Step 6: Correct the plane equation of the qualified sector grid.

[0138] Step 7: Traverse each point in the sector grid, calculate the distance from the point to the corrected plane, filter out the points less than the threshold as ground points, and output the index of the points.

[0139] According to the ground detection method proposed by the embodiments of the present application, by collecting the point cloud data of the vehicle surrounding environment, initializing the preset sector grid, assigning the point cloud data to the preset sector grid, performing PCA plane fitting on each sector grid, filtering out the qualified sector grids whose perpendicularity, average height and / or flatness meet the preset requirements from the fitted sector grids, correcting the plane equation corresponding to the qualified sector grid, calculating the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and taking the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground. Thus, the problem that the ground filtering in the related art is not real-time and the filtering effect is poor is solved, and the effect of real-time and accurate ground filtering can be achieved.

[0140] Next, a ground detection device according to the embodiments of the present application will be described with reference to the accompanying drawings.

[0141] Figure 9 FIG. is a block diagram of the ground detection device according to the embodiments of the present application.

[0142] As Figure 9 shown, the ground detection device 10 includes: a collection module 100, a fitting module 200, and a correction module 300.

[0143] Among them, the acquisition module 100 is used to acquire the point cloud data of the vehicle surrounding environment and initialize a preset fan-shaped grid; the fitting module 200 is used to allocate the point cloud data to the preset fan-shaped grid, perform PCA plane fitting on each fan-shaped grid, and screen out the qualified fan-shaped grids whose perpendicularity, average height, and / or flatness meet the preset requirements from the fitted fan-shaped grids; and the correction module 300 is used to correct the plane equation corresponding to the qualified fan-shaped grid, calculate the first point-plane distance from each point in each fan-shaped grid to the grid plane obtained from the corrected plane equation, and use the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground.

[0144] Optionally, in some embodiments, the acquisition module 100 is further used to: divide the preset fan-shaped grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; obtain the maximum value of the number of point clouds in each grid in different scenarios, and use the maximum value of the number of point clouds in each grid as the reserved space for the point cloud data of each grid point when initializing the preset fan-shaped grid.

[0145] Optionally, in some embodiments, the preset radial length is:

[0146] ρ r-1 ≤ρ r <ρ r+1 (r>1);

[0147]

[0148] Among them, ρ is the radial distance, r is the number of circles, FOV is the field of view angle of the lidar, N r is the number of fan-shaped grids in the r-th circle, and θ r is the fan-shaped grid angle.

[0149] Optionally, in some embodiments, the fitting module 200 is further used to: allocate the point cloud data to the preset fan-shaped grid based on a preset allocation formula, where the preset allocation formula is:

[0150]

[0151] θ k =actan(y k ,x k );

[0152] Among them, ρ k is the radial distance of each point, θ k is the angle of each point, x k is the X-axis coordinate value of the k-th point, and yk is the Y-axis coordinate value of point k.

[0153] Optionally, in some embodiments, the fitting module 200 is further configured to: traverse each sector grid, and filter the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted for each sector grid; use a preset PCA method to fit a plane equation, and fit the point cloud data to be fitted for each sector grid to obtain an initial grid plane equation; calculate a second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and filter out the point cloud data with a second point-plane distance less than a second preset distance as the point cloud data to be fitted for fitting until a preset condition is met, and obtain a final grid plane equation.

[0154] Optionally, in some embodiments, the fitting module 200 is further configured to: calculate the perpendicularity of the fitted sector grid, and filter out first target sector grids with a perpendicularity greater than a first threshold; calculate the average height of each first target sector grid, and filter out second target sector grids with an average height less than a preset height; obtain third target sector grids in the target area among the second target sector grids, calculate the flatness of the third target sector grids, and obtain the qualified sector grids based on the flatness of the third target sector grids and the flatness of the target area.

[0155] Optionally, in some embodiments, the correction module 300 is further configured to: for each qualified sector grid, obtain a plurality of adjacent qualified sector grids of each qualified sector grid; correct the plane equation coefficients of the current each qualified sector grid according to the weights of each qualified sector grid and the weights of the plurality of adjacent qualified sector grids, and obtain the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

[0156] Optionally, in some embodiments, the correction module 300 is further configured to: based on a preset first point-plane distance calculation formula, calculate a first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, where the preset first point-plane distance calculation formula is:

[0157]

[0158] where x, y, z are the coordinate values of the corresponding X, Y, Z coordinate axes of the grid point cloud, are the plane coefficients of the grid after being corrected.

[0159] It should be noted that the foregoing explanation of the embodiment of the ground detection method also applies to the ground detection device of this embodiment, and will not be elaborated here.

[0160] The ground detection device provided by the embodiment of the present application collects point cloud data of the vehicle surrounding environment, initializes a preset sector grid, distributes the point cloud data to the preset sector grid, performs PCA plane fitting on each sector grid, and screens out qualified sector grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted sector grids, corrects the plane equation corresponding to the qualified sector grids, calculates the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and uses the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground. Thereby, the problem that the ground filtering in the related technology is not real-time and has a poor filtering effect is solved, and the effect of real-time and accurate ground filtering can be achieved.

[0161] Figure 10 The structural schematic diagram of the vehicle provided by the embodiment of the present application. The vehicle may include:

[0162] A memory 1001, a processor 1002, and a computer program stored on the memory 1001 and executable on the processor 1002.

[0163] When the processor 1002 executes the program, it implements the ground detection method provided in the foregoing embodiment.

[0164] Further, the vehicle further includes:

[0165] A communication interface 1003 for communication between the memory 1001 and the processor 1002.

[0166] The memory 1001 is used to store a computer program executable on the processor 1002.

[0167] The memory 1001 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0168] If the memory 1001, the processor 1002, and the communication interface 1003 are implemented independently, the communication interface 1003, the memory 1001, and the processor 1002 can be interconnected via a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 only a thick line is used in Figure 10 , but it does not mean that there is only one bus or one type of bus.

[0169] Optionally, in specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on a single chip, the memory 1001, the processor 1002, and the communication interface 1003 can communicate with each other through an internal interface.

[0170] The processor 1002 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0171] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned ground detection method is implemented.

[0172] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0173] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0174] Any process or method description shown in a flowchart or described otherwise herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process. The scope of the preferred embodiments of the present application includes additional implementations, where functions may be performed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0175] It should be understood that the various parts of the present application may be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art may be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays, field programmable gate arrays, etc.

[0176] Those of ordinary skill in the art of the present technology can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0177] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A ground detection method, characterized in that, It includes the following steps: Collect point cloud data around the vehicle through a lidar and initialize a preset sector grid; Allocate the point cloud data to the preset sector grid, perform PCA plane fitting on each sector grid, and screen out qualified sector grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted sector grids; And Correct the plane equation corresponding to the qualified sector grid, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and use the points with the first point-plane distance less than the first preset distance as ground points to generate the actual ground; The initialization of the preset sector grid includes: Dividing the preset sector grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; Obtain the maximum value of the number of point clouds in each grid in different scenarios, and use the maximum value of the number of point clouds in each grid as the reserved space for the point cloud data of each grid point when initializing the preset sector grid; Correcting the plane equation corresponding to the qualified sector grid includes: For each qualified sector grid, obtain multiple adjacent qualified sector grids of each qualified sector grid; Correct the plane equation coefficients of the current qualified sector grid according to the weights of each qualified sector grid and the weights of the multiple adjacent qualified sector grids, and obtain the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

2. The method according to claim 1, wherein The preset radial length is: ; ; Among them, is the radial distance, is the number of turns, is the field of view angle of the lidar, is the number of fan-shaped grids in the th turn, and is the fan-shaped grid angle.

3. The method according to claim 1, characterized in that, The allocation of the point cloud data to the preset sector grid includes: Based on a preset allocation formula, allocate the point cloud data to the preset sector grid, where the preset allocation formula is: ; ; wherein, is the radial distance of each point, is the angle of each point, is the axial coordinate value of the point, is the axial coordinate value of the point.

4. The method according to claim 1, wherein The PCA plane fitting for each sector grid includes: Traverse each sector grid, and screen the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted for each sector grid; Use a preset PCA method to fit the plane equation and fit the point cloud data to be fitted for each sector grid to obtain an initial grid plane equation; Calculate the second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and screen out the point cloud data with the second point-plane distance less than the second preset distance as the point cloud data to be fitted for fitting until the preset conditions are met to obtain the final grid plane equation.

5. The method according to claim 4, characterized in that, The screening of qualified sector grids whose verticality, average height, and / or flatness meet the preset requirements from the fitted sector grids includes: Calculate the verticality of the fitted sector grid and screen out the first target sector grids with the verticality greater than the first threshold; Calculate the average height of each first target sector grid and screen out the second target sector grids with the average height less than the preset height; Obtain the third target sector grid in the target area of the second target sector grid, calculate the flatness of the third target sector grid, and obtain the qualified sector grid based on the flatness of the third target sector grid and the flatness of the target area.

6. The method according to claim 1, characterized in that The calculating the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation includes: Based on a preset first point-plane distance calculation formula, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, where the preset first point-plane distance calculation formula is: ; Among them, , , are the coordinate values of the corresponding coordinate axes of the grid point cloud, , , , are the plane coefficients of the corrected grid.

7. A ground detection device, characterized in that, including: An acquisition module, configured to collect point cloud data around the vehicle through a lidar and initialize a preset sector grid; A fitting module, configured to allocate the point cloud data to the preset sector grid, perform PCA plane fitting on each sector grid, and screen out qualified sector grids whose perpendicularity, average height, and / or flatness meet preset requirements from the fitted sector grids; and A correction module, configured to correct the plane equation corresponding to the qualified sector grid, calculate the first point-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, and use the points with the first point-plane distance less than a first preset distance as ground points to generate an actual ground; The acquisition module is further configured to: Divide the preset sector grid into multiple regions with different radial distances based on a preset radial length and a preset grid angle; Obtain the maximum value of the point cloud quantity in each grid in different scenarios, and use the maximum value of the point cloud quantity in each grid as the reserved space for the point cloud data of each grid point when initializing the preset sector grid; The correction module is further configured to: For each qualified sector grid, obtain multiple adjacent qualified sector grids of each qualified sector grid; Correct the plane equation coefficients of the current each qualified sector grid according to the weights of each qualified sector grid and the weights of the multiple adjacent qualified sector grids, and obtain the plane equation corresponding to the qualified sector grid according to the corrected plane equation coefficients of each qualified sector grid.

8. The device according to claim 7, characterized in that, The preset radial length is: ; ; in, is the radial distance, is the number of circles, is the field of view of the laser radar, For the The number of circle sectors, is the fan grid angle.

9. The device according to claim 7, wherein The fitting module is further configured to: Allocate the point cloud data to the preset sector grid based on a preset allocation formula, where the preset allocation formula is: ; ; Among them, is the radial distance of each point, is the angle of each point, is the axial coordinate value of the point, is the axial coordinate value of the point.

10. The device according to claim 7, characterized in that, The fitting module is further configured to: Traverse each sector grid, and screen the point cloud data of each sector grid based on a preset height value to obtain the point cloud data to be fitted of each sector grid; Use a preset PCA method to fit a plane equation, and fit the point cloud data to be fitted of each sector grid to obtain an initial grid plane equation; Calculate the second point-plane distance from the point cloud data of each sector grid to the plane obtained from the initial grid plane equation, and screen out the point cloud data with the second point-plane distance less than a second preset distance as the point cloud data to be fitted for fitting until preset conditions are met to obtain a final grid plane equation.

11. The device according to claim 10, characterized in that, The fitting module is further configured to: Calculate the perpendicularity of the fitted sector grid, and filter out the first target sector grids whose perpendicularity is greater than the first threshold; Calculate the average height of each first target sector grid, and filter out the second target sector grids whose average height is less than the preset height; Obtain the third target sector grids in the target area among the second target sector grids, calculate the flatness of the third target sector grids, and obtain the qualified sector grids based on the flatness of the third target sector grids and the flatness of the target area.

12. The device according to claim 7, characterized in that The correction module is further configured to: Based on a preset first point-to-plane distance calculation formula, calculate the first point-to-plane distance from each point in each sector grid to the grid plane obtained from the corrected plane equation, where the preset first point-to-plane distance calculation formula is: ; Among them, , , are the coordinate values of the corresponding coordinate axes of the grid point cloud, , , , are the plane coefficients of the corrected grid.

13. A vehicle, characterized in that, including: A memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the ground detection method according to any one of claims 1-6.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to be used to implement the ground detection method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Mobile platform state estimation method and system, mobile platform and storage medium

    CN111684382A

  • Road environment element sensing method based on laser radar

    CN111985322A