Abstract:In order to reduce the cumulative drift error of the orchard robot in simultaneous localization and mapping(SLAM), a loop closure detection algorithm was proposed based on density binary pattern(DBP). The LiDAR scanning was divided into eight-bit binary bins along the vertical height direction. If the number of point clouds in the bin exceeded five, it was considered a valid scan, and the bin value was set to be 1, otherwise 0. Further, the eight-bit data were projected to construct the DBP descriptor. The DBP descriptor contained point cloud density and height information and had a significant distinguishing effect on tall fruit trees and low shrubs. A two-stage search algorithm was utilized to ensure the task real-time requirements in the large-scale orchard. Firstly, to extract a low-dimensional ring factor vector of DBP, the K-nearest neighbor candidate loop closure frames were quickly found in the K-dimensional tree(KD-Tree), which was constructed by the ring factors. The maximum similarity between the candidates and the query frame was obtained. If the distance threshold condition was met, the candidate frame was considered an effective target loop closure. The experiment was carried out in three orchards of different scales. In the orchard scene with multiple loop closure events, the root mean square error and standard deviation of the DBP-LeGO-LOAM trajectory were 0.24m and 0.09m, compared with the LeGO-LOAM algorithm which had been reduced 81% and 91% respectively. It provided an effective solution for improving the mapping and localization accuracy of orchard robots.