{'fraction_non_alphanumeric': 0.026010404161664665, 'fraction_numerical': 0.008936908096571963, 'mean_word_length': 4.587183308494784, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Real-time Track Obstacle Detection from 3D LIDAR Point Cloud

Obstacle detection is one of the important works in the field of driverless vehicle. Camera, millimeter wave radar, LIDAR and other sensors are widely used in the obstacle detection of driverless vehicle. However, cameras and millimeter wave radar are highly dependent on the environment and greatly affected by external factors, especially in the process of high-speed driving, which is easy to produce serious system errors, and even unable to detect obstacles, which has a great potential for the safety of driverless vehicle. LIDAR is used to detect obstacles by launching laser, which is not easy to be interfered by the environment. It has high precision and is suitable for outdoor environment. The main contributions of this paper are as follows: 1) a 16 line LIDAR track recognition method based on driverless equation is proposed. 2) it is easy to get the obstacle coordinates through plane segmentation and clustering for the use of subsequent camera and LIDAR fusion.


Introduction
In driverless technology, environmental obstacle is one of the most important field. Generally, sensors such as LiDAR, camera, millimeter wave radar and IMU will be installed on the vehicle to identify the surrounding environment such as lane line, vehicle and pedestrian, and these sensors will be used to realize vehicle positioning and mapping [1][2][3]. However, monocular camera cannot provide accurate location of obstacles.
Generally, triangulation and other methods are needed to calculate the real-time location of vehicles. However, this method not only cannot get accurate results, but also has limited detection distance. Although binocular and RGB-D cameras can get the position of obstacles, they are easy to be affected by the environment light and have poor stability, so they are difficult to be well applied outdoors. LiDAR not only has a long detection range, but also has a high stability. Especially in the driverless race, because the camera can only shoot at a fixed angle, some information will be lost when it encounters a curve [4][5][6]. Therefore, in obstacle detection, LiDAR becomes a good choice.

Overview
Specifically, to the application scenario of driverless formula racing, our track is made of the same shape cone barrel, the distance between pile bucket is 5 meters, and there are no other obstacles on the track (figure 1). Therefore, we only need to use LiDAR to identify the pile bucket on the left and right sides of the lane line, find the centre coordinates of pile bucket and then fit the curve to get the contour of the track. Similar to RGB-D camera, the point cloud data output 4 information, coordinates and reflection intensity of the point cloud. We use the American velodyne-16 line LiDAR, which supports 16 channels, can generate 300000 point cloud data per second, 360 degree horizontal scanning full angle [7][8][9][10][11].
After obtaining the point cloud data of LiDAR, we can achieve our goal by filtering, plane segmentation, clustering, and taking the center point (figure 2).

Point Cloud Process
Because the LiDAR can generate 300000 points cloud data per second, such a large amount of data has a high demand on the computing capacity of vehicles, and because of the impact of equipment accuracy, external environment factors and other factors, the point cloud data we get will inevitably appear noise points. In the actual track, especially on the curve, there will be line of sight occlusion, and there are some outliers in the point cloud. Therefore, we first filter the received point cloud data. On the premise of not destroying the environmental information, we will comprehensively use a variety of filtering algorithms to ensure a small amount of calculation and the effectiveness of the data.
Although the measurement radius of 16 line LiDAR can reach 100 meters, with the increase of distance, the number of points falling on the target will become more and more sparse, which makes it impossible to get the actual shape of the target through clustering, as shown in the figure 3. Therefore, when the distance is large to a certain extent, the point cloud data obtained has no practical significance. Therefore, similar to the common passes through filter, the point cloud in a certain range along a certain coordinate axis can be removed or retained. We can build a cube V1 with the length, width and height of 10 meters that runs with the car as the origin, and retain the point cloud data in the cube. At the same time, the point cloud data around the car is also useless for us. Let's build a cube V2 with the car as the origin and the length, width and height of 2m. Subtract the point cloud data in V2 from the point cloud data in V1 to get the point cloud we need. This method can greatly reduce the number of point clouds, greatly reduce the amount of calculation, and increase the speed of calculation.
In order to further reduce the amount of point cloud data, we can also use voxel mesh method to achieve filtering. The principle of this method is to create a three-dimensional cube grid from the input point cloud data, and all points in the voxel can be represented by the center of gravity of the cube.

Plane Segmentation
In the segmentation plane, we use the RANSAC (random sample consensus) method. The fundamental is getting the model we need from a group of point clouds with errors and defects. In our data, figure 4 displays the algorithm. First, we get three points (x, y, z) from the point cloud to fit a plane model, and then judge whether the distance from the fourth point (x4, Y4, Z4) to this plane is less than the tolerance we set. If the distance from the point to the plane is less than the threshold T, then the point is the interior point.
RANSAC has good robustness [12][13][14]. When there is a big error in our data, we can still estimate a good model. But the number of iterations required is higher, which may take up more time cost.

Clustering
Through RANSAC we segment the track plane, then we will find the pile bucket on both sides of the track by clustering, and finally fit the available track.
Because our track is composed of cones, there are no other complex obstacles, so we can use Euclidean algorithm to cluster pile bucket. First, take a certain point as the target point, use K-D tree to find the nearest n points, and calculate the distance from these n points to the target point. If the distance is less than the threshold we set, these points will be divided into one class. Repeat this process until no point cloud can be divided to complete clustering.
In order to prove the practicability of this method, we try to test the above method on the open dataset. The results show that our method can also identify vehicles on urban roads. The following figure 5 shows the test results using Baidu dataset. In the box is the vehicle identified by LiDAR. We can see that our method accurately detects two vehicles on the current road.

Conclusion
In this paper, a method of using LiDAR to detect obstacles is proposed. It can be seen from the experiment that the 16 line LiDAR can quickly and accurately detect the size and location of obstacles when the surrounding environment is not too complex. Compared with the camera, the LiDAR can output more accurate and stable results where the light changes obviously, especially in the corners where the camera has blind field of vision, the LiDAR has more advantages.