Using Vmware+Ubuntu20.04+ros to achieve ground point cloud segmentation

Table of Contents

1. The main work of the paper

2. The composition of the patchwork proposed in the paper

2.1 Problem definition

2.2 Concentric region model

2.3 Regional ground fitting

2.4 Ground likelihood estimation

3. Code download location

4. Reproduction process – related configuration installation

4.1 ros installation

4.2 readme

5.Results

The main contents of this article are: 1. A brief introduction and translation of the paper. 2. Perform installation and configuration of relevant environments. 3. Reproduce the code for point cloud segmentation in the paper “Concentric Zone-Based Region-Wise Ground Segmentation With Ground Likelihood Estimation Using a 3D LiDAR Sensor”. I hope it can help everyone.

1. The main work done in the paper

(1) In this paper, as shown in Figure 1, a new regional ground segmentation method based on Concentric Zone Model (CZM) is proposed, called Patchwork. It is an extension of Region-wise Ground Plane Fitting (R-GPF) in previous research.

(2) Additionally, Ground Likelihood Estimation (GLE) is utilized in terms of verticality, height, and flatness to determine whether each box is on the ground.

(3) Compared with state-of-the-art region fitting-based methods, the method proposed in the paper shows good performance at frequencies exceeding 40 Hz. Among them, Patchwork estimates ground points with the smallest recall variance, which shows that the proposed method overcomes the under-segmentation problem in complex urban environments.

2. The composition of the patchwork proposed in the paper

2.1 Problem Definition

First, we represent the point cloud at this moment as P. Then, let P={P1, P2,…,Pk,…,PN} be a set of point clouds containing the current N points acquired by the 3D lidar sensor, where each point Pk is represented by Cartesian coordinates k={xk, yk, zk}. In the paper, P is clearly divided into two categories: a set ofground points G and non-ground pointsG^{c}, they satisfy G∪G^{c}=P. Among themG^{c}also Includes vehicles, walls, street trees, pedestrians, etc.

Next, the estimated ground points can be defined as \hat{G}, since estimates will inevitably contain inherent errors, some points that are actually from non-terrestrial objects can be included in \hat{G}, and vice versa, in short, \hat {G}and\ hat{G^{c}} Expressed as follows:

Among them, \hat{G}and\hat{G^{c}} also satisfies \hat{G}\hat{G^{c}}=P, where TP, FP, FN, and TN represent the sets of true, false positive, false negative, and true negative respectively.

2.2 Concentric Region Model

As mentioned earlier, most plane-based methods are based on the common assumption that the observable world may not be flat. Therefore, estimates of ground level should be made by area, assuming that the world may not be flat and that small portions or boxes of ground are indeed flat within that area.

Some previous methods use a uniform polar grid to represent S and divide the point cloud into multiple barrels with regular intervals in the radial and azimuthal directions, that is, rings and sectors, as shown in the figure.

Found problem: Therefore, S has two limitations. First, as the distance gets farther and farther, the point cloud becomes too sparse to find the correct ground plane, which is what we call the sparsity problem. Some methods adaptively adjust the bin size to fit the logarithmic point distribution. However, since the size of the bins increases in a linear or quadratic manner, the sparsity problem is not completely solved. On the other hand, when the size of the bins close to the origin is too small to represent one unit space in S, this sometimes causes the correct normal vector estimation of the ground plane to fail, which we call the representativeness problem.

In order to solve the above problems, this paper proposes a polar grid representation based on CZM, denoted as C. Distribute appropriate densities between bins in a computationally uncomplicated way. Therefore, P is divided into multiple regions, each region consists of bins of different sizes, as shown in Figure 2(b). Let ={1, 2, 3, 4, 5,…, N}, then the proposed model is as follows:

Among them, Zm is the m-th region of C, Nz is the number of regions, and four types are set in this paper. Zm={pk∈P | Lmin,m≤pk≤Lmax,m}.Lmin,m and Lmax,m represent the minimum and maximum radial boundaries respectively; Zm is also divided into Nr,m×N_{ \theta ,m}bin, each Each area has different sizes, and each Si,j,m is defined as follows:

2.3 Regional Ground Fitting

Thereafter, each bin is assigned an estimated local ground via R-GPF; then, the partial ground points are merged. In this letter, we usePrincipal Component Analysis (PCA) instead of RANSAC. Of course, RANSAC tends to be less sensitive to outliers than PCA. However, using PCA shows faster speed and acceptable performance than using RANSAC; therefore, PCA-based estimation is more suitable as a preprocessing process. Furthermore, experiments show that PCA-based methods are at least two times faster than ransac-based methods.

Given a bin, let C∈R3×3 be the covariance matrix of the point cloud in the unit space; the three eigenvalues λα and the corresponding three eigenvectors vα are calculated as follows:

where α = 1,2,3, and it is assumed that λ1≥λ2≥λ3. Then, the eigenvector corresponding to the smallest eigenvalue v3 is the most likely to represent the normal vector to the ground plane. Therefore, let n = v3 =[a b c]T; then, the plane coefficient can be calculated asd=-n^{^{T}}\bar{p}, where \ \bar{p}Represents the average value of unit space.

For the sake of simplicity, let the nth bin on all bins be Sn, and its number is equal to , if the base of Sn is large enough, the point with the lowest height is selected as the initial seed. In fact, the point with the lowest height in each bin most likely belongs to the ground. Let\bar{z_{init}}is the average of the z values of the total number of selected seed points Nseed; then the initial estimated ground point set is obtained \hat{G}^{_{n}^{0 }}, as shown below:

Among them, z(·) returns the z value of a point, and zseed represents the height edge.

Since our method is iterative, let the estimated ground point at the lth iteration be \hat{G}^{_{n}^{l}}, then use \, obtain \hat{G}^{_{n}^{l}} through (4) The normal vector is recorded as n_{n}^{l}. Then, calculate the plane coefficientd_{n}^{l}is, where\bar{p}_{n}^{l}means\hat{G}^{_{n}^{l}} mean. Finally, \hat{G}^{_{n}^{l + 1}} is as follows:

Note that the main difference between the original R-GPF and this paper is that ours involves using adaptive initial seed selection to prevent R-GPF from converging to local minima. Sometimes, due to multipath problems or reflection of lidar signals, wrong cloud points are acquired under the actual ground, as shown in Figure 3(a). This phenomenon is observed mainly in Z1, since reflections only occur in areas with stronger signals. These outliers prevent R-GPF from estimating the correct ground surface.

In order to solve this problem, we used the z value of the ground point with only Z1, mainly distributed near ?hs, where hs represents the sensor height. Therefore, in the estimation \hat{G}^{_{n}^{0}}, if zk is lower than Mh·hs, then the pk belonging to Z1 in Sn is filtered out, where Mh < ?1 is the height margin. For Sn that does not belong to Z1, the adaptive threshold decreases as m increases to avoid improper filtering that may come from points downhill (actually TP).

2.4 Ground likelihood estimation

Therefore, it is necessary to robustly judge \hat{G}_{n}Is it the actual situation? To this end, a region-based binary classification probability test method GLE is proposed. To this end, Patchwork leverages GLE to improve overall accuracy by excluding initial unintended planes consisting of non-ground points.

Let L(θ |X) be GLE, where θ represents all parameters of Patchwork, and Each bin is assumed to be independent of each other. Then L(θ |X) is expressed as

According to our prior knowledge, each \hat{G}_{n}The possibility of becoming a ground point is defined by verticality, height and flatness, expressed as φ(·), ψ(·) and φ(·) respectively ,As follows:

Then set different filters for processing in the three directions of verticality, height and flatness (omitted…)

3. Code download location

code link

4.1 ros installation

The VMware virtual machine used during testing was installed with ubuntu20.04.

Regarding the installation of ros, whoever is pretending is confused, but you deserve to have Yuxiang ros!

Then use the little turtle to test whether the installation is successful!

4.2 readme

Then follow the readme inside and install the following content in the terminal. I am using ubuntu20.04

(if you use ubuntu 20.04)
sudo apt-get install ros-noetic-jsk-recognition
sudo apt-get install ros-noetic-jsk-common-msgs
sudo apt-get install ros-noetic-jsk-rviz-plugins

Then follow the steps below to compile the package and see how many cores your virtual machine has. Mine is 8 and then -j8. You can also directly catkin_make without adding -j8

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/LimHyungTae/patchwork.git
cd..
catkin_make -j8 

The compiled result is as shown below

Modify data set path

Dataset folder format

Then, enter the following command in the terminal, and the result will be as shown in the figure.

source devel/setup.bash

Enter the startup command in the readme again and press Enter to run.

roslaunch patchwork offline_kitti.launch

5.Result

https://live.csdn.net/v/339771icon-default.png?t=N7T8https://live.csdn.net/v/339771