Vehicle pose estimation algorithm for parking automated guided vehicle

Parking automated guided vehicle is more and more widely used for efficient automatic parking and one of the tough challenges for parking automated guided vehicle is the problem of vehicle pose estimation. The traditional algorithms rely on the profile information of vehicle body and sensors are required to be mounted at the top of the vehicle. However, the sensors are always mounted at a lower place because the height of a parking automated guided vehicle is always beyond 0.2mm, where we can only get the vehicle wheel information and limited vehicle body information. In this article, a novel method is given based on the symmetry of wheel point clouds collected by 3-D lidar. Firstly, we combine cell-based method with support vector machine classifier to segment ground point clouds. Secondly, wheel point clouds are segmented from obstacle point clouds and their symmetry are corrected by iterative closest point algorithm. Then, we estimate the vehicle pose by the symmetry plane of wheel point clouds. Finally, we compare our method with registration method that combines sample consensus initial alignment algorithm and iterative closest point algorithm. The experiments have been carried out.


Introduction
Parking problem is becoming a major issue in urban development due to the increase in number of vehicles. Many smart parking systems have been developed in recent years, which mainly focus on parking safety 1,2 and finding parking space. 3 For space-saving parking, stereo garage is one of the solutions. Parking automated guided vehicle (AGV) is a flexible robot that has been used for automatic parking in flat parking lots. Since there is no need to reserve space for opening vehicle doors, entering and exiting parking stall, the parking space is greatly saved. Besides, parking lot accidents are avoided due to automatic parking and multi-robot cooperations will make parking more efficient. 4 A typical parking AGV was designed and developed in 2014. 5 It is bigger and lower flexibility than most mobile robots. In 2017, two types of pallet parking AGVs with lidar 6 and vision navigation 7 were developed, respectively. Like most parking AGVs, an extra mechanical platform for transporting vehicle is primarily provided and users is required to park the vehicle on it accurately. Different from these parking AGVs, clamp-on parking AGV does not rely on the extra mechanical platform and is only required to park the vehicle to parking buffer zone, which effectively reduces security risks and improves user experience. So the vehicle pose estimation technology is required to be adopted. More than 10 years ago, many scholars have begun to research this topic in autonomous driving based on lidar data. In general, these methods can be roughly divided into two categories: feature-based [8][9][10][11] and measurement model-based. [12][13][14][15] Since most vehicles are in the shape of a box, the partial profiles of them are like the letter L. Thus, L-shape feature can be used to represent them with a simple structure, which is widely used in feature-based methods. Gan et al. 8 and Kim et al. 9 proposed an efficient algorithm to fit a cluster of 2-D laser scan points with an L-shape and got the vehicle pose by this feature. Wang et al. 10 determined the interest area of vehicle point clouds based on L-shape feature, and used RANSAC (Random Sample Consensus) algorithm to fit straight line of points in interest region to calculate the orientation of vehicle. Mertz et al. 11 used line fit and corner fit for features extraction of a segment to estimate vehicle pose. However, just as stated in Morris et al., 12 feature-based methods are sensitive to noises and interferences.
In measurement model-based methods, vehicles are usually represented as some rectangles or cuboids, and sampling or optimization techniques are used to estimate the vehicle pose. Morris et al. 12 proposed four-rectangles measurement model to represent vehicle point clouds and used gradient-based optimization method to obtain vehicle pose. Chen et al. 13 combined a likelihood-field-based model with scaling series algorithm to realize real-time vehicle pose estimation based on four-rectangles model. Threerectangles measurement model is proposed by Petrovskaya et al. 14 and they used importance sampling technique to estimate vehicle pose. Wojke and Häselich 15 extended Petrovskaya's method in unstructured environments and realized vehicle pose estimation and tracking in real time. However, the results obtained by measurement modelbased methods may be locally optimal because of the inappropriate initial value. Figure 1 shows a novel clamp-on parking AGV that was introduced in 2018, which is a heavy load smart mobile robot and its maximum load can reach 3 tons but the height of the parking AGV is only 0.125 m. It works by moving to the bottom of the target vehicle and sensors are required to be mounted at a lower height, which greatly limits sensors' view. Besides, in order to save parking space, the distance between target vehicle and parking AGV is not large. Thus, when we use lidar to collect data, the number of lidar beams hitting on vehicle body would be small and the profile information of the whole vehicle body cannot be obtained. Since feature-based methods and measurement model-based methods rely on the profile information of vehicle body, they cannot be applied in this case.
In 3-D point clouds processing, ground segmentation is very important, which is the precondition of other higher processes, such as obstacle detection, object classification, and recognition. Generally, approached of ground segmentation include cell-based methods [16][17][18][19] and model-based methods. [20][21][22] Cell-based method was firstly proposed by Thrun et al. 16 They project 3-D point clouds to 2.5-D grids and segment the ground point clouds by calculating the maximum height difference of each cell, which was widely used in the 2007 DARPA Grand Challenge competition. 17 Because Thrun's method relies on the minimum and maximum height of the points in the cell, it cannot segment the overhanging structures. Thus, Douillard et al. 18 proposed an improved cellbased method based on cell's gradient. If the gradient is less than the given threshold, the cell is the ground cell. Based on gradient threshold, Vu et al. 19 combined adaptive break point detection with mean height evaluation to segment the ground point clouds. The algorithm obtains a better result in uneven and sparse regions than Douillard's method. Because the cell-based methods only use the local information, they are sensitive to observation noises.
Model-based methods segment the ground by fitting geometric shape of point clouds. Himmelsbach et al. 20 proposed a method for segmenting large-scale remote 3-D point clouds. The method divides the polar grid map into many segments and uses the line extraction algorithm to estimate local ground plane. Different from Himmelsbach's method, Chen et al. 21 used Gaussian process regression to classify ground and obstacles for each segment in polar grid map. Because the point clouds are divided into independent segments, the continuity of the overall ground height cannot be guaranteed. Since the ground is flat in most cases, Lam et al. 22 used the plane RANSAC algorithm followed by the least square fitting on point cloud data to segment the ground point clouds. However, it will oversegment ground point clouds because the surface of some obstacles may be parallel to the ground.
In this article, we propose a vehicle pose estimation method based on the symmetry of wheel point clouds for the clamp-on parking AGV, which can be used to estimate vehicle pose when the mounting heights of sensors are very low. Before wheel point clouds segmentation, we combine Thrun's cell-based method with support vector machine (SVM) classifier 23 to segment ground point clouds. The global information and local features of point clouds are used. It has a good performance and is not sensitive to the observation noises.
The rest of this article is structured as follows. In the next section, we introduce the ground segmentation algorithm based on cell-based method and SVM classifier. The third section elaborates the steps of the vehicle pose estimation algorithm with 3-D lidar. The experiments and results are offered in the fourth section. Finally, we summarize this article in the fifth section. Figure 2 is the procedures of ground segmentation. Firstly, we use cell-based method and pass-through filter to presegment some ground point clouds and obstacle point clouds, respectively. Then, the normal vectors and height features from pre-segmented point clouds are extracted. Next, these features will be trained as the training data of SVM classifier. Finally, we use the optimal model of SVM classifier to predict the ground and obstacle point clouds.

Ground and obstacle pre-segmentation
We take a W Â W plane in xy plane and divide it into N Â N cells, as shown in Figure 3. The point clouds are projected vertically to the cell plane. Thus, for a point p (x, y, z) in lidar coordinate system, the cell it belongs to is where W Â W is the plane size and N Â N is the number of cells. The first cell is the lower-right cell. The threshold is set to h and the maximum height difference 4h of each cell is calculated. If 4h ! h, the cell is set to a ground cell. All points in ground cell form the ground point clouds. The input point clouds and the ground pre-segmentation results are shown in Figure 4(a) and (b), respectively. Because the height of obstacle point clouds is higher than ground point clouds, a lower threshold of passthrough filter in z-axis direction that is larger than the average height of the ground point clouds segmented by cell-based method is given and the upper threshold is 2 m. Besides, the points far from the lidar center are filtered. Thus, we can get a part of obstacle point clouds, as shown in Figure 4(c).

Ground and obstacle classification based on SVM classifier
Since the driving area is relatively flat, the normal vectors of ground point clouds will be approximately parallel to the z-axis of lidar coordinate system. Besides, the height of the ground is lower than the obstacles. Therefore, the normal   For a point, its normal vector coincides with the normal of the tangent plane of the surface formed by this point and its neighbors. Thus, it can be obtained by principal component analysis method. 24 Let the k-nearest points set of a point p is P ¼ fp 1 , p 2 , . . . , p k g and we can get the corresponding covariance matrix C as follows where P is the center of gravity of P. Let l 1 , l 2 , and l 3 be the eigenvalues of the covariance matrix C, 0 l 1 l 2 l 3 , and the eigenvectors corresponding to the eigenvalues are n 1 , n 2 , and n 3 where n 1 (n x , n y , n z ) is the normal vector of p. The normal estimation result of point clouds is shown in Figure 5. Therefore, the feature vector of the point is n (n x , n y , n z , h), where h is the height of the point. After feature extraction, we can get the training data x where N is the number of pre-segmented point clouds. The ground point clouds are set to the positive samples and the obstacles point clouds are set to the negative samples. Thus, the training model is The optimization function is After getting the optimal solution of W and b, we can use the model to predict whether a point is a ground point or an obstacle point. In order to avoid under-segmentation, the points below the average height of ground point clouds will eventually be filtered.

Wheel point clouds segmentation
Since the lidar is mounted at a very low height, when parking AGV is behind the vehicle, the vehicle point clouds collected by the lidar mainly consist of two parts: wheel point clouds and chassis point clouds. As shown in Figure 6, the shape of the vehicle point clouds is like the letter n and the wheel point clouds are segmented from obstacle point clouds based on this feature.
The minimum height of each cell can be calculated based on cell-based method. The vehicle cell is set to the suspended obstacle cell if the minimum height is greater than the given threshold. Because the distance between parking AGV and target vehicle is small, vehicle chassis point clouds contain more points than other suspended objects. We use Euclidean cluster algorithm 25 to cluster the point clouds of suspended objects and select the largest cluster as the vehicle chassis point clouds. In Euclidean cluster algorithm, if the distance between two points is small, they belong to the same cluster.
As shown in Figure 7, the wheel point clouds is under the vehicle chassis point clouds. Thus, a sector region of interest based on vehicle chassis point clouds can be defined to segment wheel point clouds. The Gaussian  distribution of horizontal azimuth z for each points is marked as follows The angular range of sector region of interest is defined as [ À 2s, þ 2s] and the radius r of the sector is 4 m, as shown in Figure 8.
The points outside the sector region will be filtered. Then, the Euclidean cluster algorithm is used to cluster the nonsuspended point clouds and the two clusters with the largest number of points are the wheel clusters.

Correction of wheel symmetry
In theory, left and right wheels are strictly symmetrical. However, because the distances from lidar center to left and right wheels are always different, when using lidar to collect point cloud data, the number of points in left and right wheel point clouds will probably be different, which causes the symmetry errors of the wheel point clouds. Thus, it is necessary to correct the wheel point clouds before obtaining its symmetry plane. In this article, the symmetry of the wheel point clouds is corrected by registration algorithm.
To improve the registration accuracy, number of the left and right wheel point clouds should be balanced. The vertical angle o of each point p(x, y, z) can be calculated as follows The points are classified into the same category with the same vertical angle. If the proportion that the number of points belong to the same wheel point clouds is small, the category will be filtered.
Assuming that the residual wheel point clouds C is fp 1 , p 2 , . . . , p n g and p i is a point, the center of gravity of the point clouds C is given by where L g (x lg , y lg , z lg ) and R g (x rg , y rg , z rg ) are the center of gravity of the left and right wheel point clouds, respectively. Let W g be (x wg , y wg , z wg ) and we can get the normal vector of the symmetry plane Therefore, the symmetry plane equation is The symmetry point p 0 i of p i (x i , y i , z i ) with respect to the symmetry plane is where D is Ax wg þ By wg þ Cz wg . The symmetry point is calculated for each point in left wheel point clouds and we can get the symmetry point clouds L 0 of the left wheel point clouds L. Let the right wheel point clouds S be [p 1 , p 2 , . . . , p n ] and the symmetry point clouds L 0 be ½p 0 1 ; p 0 2 ; . . . ; p 0 m . We assume the Euclidean Transformation T from L 0 to S is (R, t). The iterative closest point (ICP) algorithm minimizes the distances between points in S and L 0 . 26 In each iteration, ICP computes the correspondences between S and L 0 , and then (R, t) is calculated to minimize the objective function where o i,j is the weight of correspondence. The maximum matching threshold d max of point pairs is given before registration. If the distance between a point pair is greater than Thus, the normal vector of symmetry plane P 1 of point clouds H 1 is n 1 ¼ [a 1 b 1 c 1 ] T , where c 1 > 0. The angle a between P 1 and xy plane is In order to reduce the influence of unevenness on the ground, we rotate the wheel point clouds H 1 a around the xaxis and we can get The symmetry plane P 2 of point clouds H 2 is perpendicular to xy plane. Assuming that the normal vector of P 2 is n 2 ¼ [a 2 b 2 c 2 ] T , where b 2 > 0, the horizontal azimuth of the target vehicle with respect to the lidar is given by We rotate the wheel point clouds H 2 q around the z-axis of the lidar coordinate system and we can get the new wheel point clouds H 3 is The symmetry plane of H 3 is parallel to xz plane. Thus, the distance in y-direction between vehicle center and lidar center is We translate H 3 to Dy and we can get the final wheel point clouds. In theory, the symmetry plane of final wheel point clouds is coincident with xz plane. We suppose the xz plane of lidar coordinate system is coincident with the bilateral symmetry plane of parking AGV. Thus, in order to align to the target vehicle, the adjustment of parking AGV is where Dy is the traverse displacement and q is the rotation angle.

Registration method combing SAC-IA and ICP algorithms
If we have the source point clouds at the origin location, the object pose can be obtained by registration method. 27 In ICP algorithm, the maximum matching threshold d max should be given to get the correspondent points. If the distance between two point clouds is large, d max should also be large. However, large matching threshold will cause incorrect correspondences, which will make registration failed. Thus, initial transformation should be calculated by rough registration if there is no overlap between two point clouds. Point feature histograms (PFH) is a 3-D feature descriptor, which represents the surface model properties of a point. Fast point feature histograms (FPFH) is a simplified form of PFH and its computation is more time-saving than PFH. 28 We assume the neighbors of point p is N ¼ fp 1 , . . . , p n g, where points in N are in the sphere. Sphere's radius is r and p is the center. For each pair of points p and p k in N, we calculate their normal vectors n and n k . The angular variation of n and n k is The angular variations of each point pair consist of the simplified point feature histograms (SPFH). Thus, the FPFH of point p is where k is the k neighbors of point p and o k is the distance between point p and point p k . After getting the FPFH features of the whole point clouds, we use sample consensus initial alignment (SAC-IA) algorithm 28 to register the point clouds. Different from ICP algorithm, SAC-IA algorithm finds the correspondence of a point by FPFH features and the rigid transformation T 0 i for each point pair will be calculated. The performance of T 0 i is evaluated by where H(e i ) is a Huber penalty measure where t e is a given threshold and e i is the distance between the target point clouds and the aligned point clouds transformed by the transformation of the ith matching point pair.
Finally, we find the best transformation from all transformations to minimize J. After SAC-IA registration, we can get the initial transformation T 1 and the aligned point clouds H 0 1 . Then, we use ICP algorithm to register point clouds H 0 1 to the target point clouds and we can get the transformation T 2 . Thus, the transformation T 0 from original point clouds to target point clouds is T 2 T 1. If the target point clouds are the wheel point clouds whose symmetry plane is coincident with the xz plane of lidar coordinate system, the adjustment of parking AGV is

Experiments and results
The lidar used in this article is Velodyne VLP-16 and the experimental platform is shown in Figure 9. In order to get the vehicle point clouds from the obstacle point clouds, the ground point clouds should be segmented first. Figure 10 shows the ground segmentation results. It can be seen that the ground point clouds below the vehicle are erroneously segmented to obstacles by cell-based method but there are almost no ground point clouds in obstacle point clouds by our method. Our method can get a better result. Figure 11 is the results of vehicle segmentation. The vehicle chassis point clouds can be segmented effectively by suspended object extraction and Euclidean cluster algorithm, as shown in Figure 11(a). After that, the wheel point clouds are extracted as the nonsuspended objects from the sector region of interest, as shown in Figure 11(b).
Because the point clouds of the left and right wheels are not strictly symmetrical, the symmetry of the wheel point clouds should be corrected. Figure 12 shows the correction results. In Figure 12(a), white point clouds are the symmetry point clouds of the left wheel with respect to the symmetry plane of the wheel point clouds. We can find that the symmetry point clouds are not coincident with the right wheel point clouds and there are symmetry errors in wheel point clouds. After registration, the coincidence degrees of the wheel point clouds increase and the symmetry errors decrease, as shown in Figure 12(b).
To get the vehicle pose, the corrected wheel point clouds are transformed. Figure 13 shows the transformed results of wheel point clouds (white point clouds) by the vehicle pose estimation algorithm. It can be seen that the symmetry planes (white plane) of wheel point clouds are coincident with the xz plane. In this case, lidar on parking AGV has aligned to the target vehicle. For comparison, we combine SAC-IA algorithm with ICP algorithm to register the wheel point clouds. The target point clouds are the wheel point  clouds sampled by the lidar when the xz plane is coincident with the symmetry plane of the vehicle. The original point clouds are the current wheel point clouds segmented by our algorithm. As shown in Figure 14, the original point clouds are coincident with the target point clouds after registration.
In order to evaluate the precision of the vehicle pose estimation algorithm proposed in this article, we rotated and moved the lidar to different places. The lidar data were recorded by robot operating system (ROS) and we took out 100 scans from it to calculate the vehicle pose respectively. Figure 15 is the estimation results of horizontal azimuth and Figure 16 is the estimation results of distance in y-direction. It can be seen that the results of our method are basically coincident with the registration method. Figure 17 is the Euclidean fitness scores of registration method, which are the sum of squared distances from aligned point clouds to target point clouds. The lower Euclidean fitness scores mean the better registration results and the vehicle pose estimation results are more accurate. From Figure 17, we can find that the Euclidean fitness scores are very low. Thus, the registration precision is high.        The processor used in this article is a standard laptop (Intel Core-i5-3749 CPU 3.2GHZ, 8G RAM) and the algorithm is run in ROS environment (Cþþ). Figure 18 shows the processing time of vehicle pose estimation algorithm. It can be seen that the processing speed of our method is faster than registration method. The processing time consumption of our method is mainly in SVM classifier training and ICP registration.

Conclusions
By combining cell-based method with SVM classifier, the preparation procedure of training data is simplified and the results of ground segmentation are more exactly. The method by extracting the symmetry plane of the wheel point clouds solves the vehicle pose estimation problem in the case where the vehicle body information cannot be obtained. The registration method is given to provide a reference of vehicle pose because the registration accuracy is high according to the Euclidean fitness scores. The vehicle pose estimation results of our method are basically coincident with registration method and more timesaving. Besides, our method can estimate the pose of different vehicle models but registration method needs to build a database of different wheel point clouds models to provide the target registration point clouds. Experimental results indicate that the vehicle pose estimation method in this article is feasible and it has a high precision, which can be used on parking AGV.
In the future, we will consider data fusion of vision and lidar. Vehicle wheels recognition and regions of interest determination are implemented by vision, and then the vehicle pose is estimated based on lidar data. Besides, real-time performance of the algorithm should be improved for providing real-time feedback to the robot, which would probably improve the robustness and precision of the algorithm.