Abstract:In view of low localization accuracy and poor map construction during the visual navigation for orchard spraying robot, a visual localization and dense mapping algorithm was proposed. The algorithm was based on the ORB-SLAM2 algorithm architecture, firstly, through the optimization of FAST corner points, descriptor thresholds, and adopting the image pyramid method and Gaussian filtering algorithm, poor quality ORB feature points were eliminated to improve the image key frame quality and feature matching accuracy. Secondly, the dense map building thread was introduced, the point cloud recovery algorithm and statistical filtering method were used to form the point cloud queue, the point cloud stitching technology and voxel filtering algorithm were adopted to output the dense point cloud maps, and the key frame output interface and position publishing topic were added in the ROS node of ORB-SLAM2 algorithm, and then the key frame generated by ORB-SLAM2 algorithm was selected through the NeedNewKeyFrame function to reduce the system computation. Finally, the RGB-D camera was used to realize the precise positioning and dense mapping of the orchard spraying robot. In order to verify the effectiveness and practicality of the algorithm, simulation analysis of TUM dataset and real scenario testing were conducted. The results showed that compared with that of ORB-SLAM2 algorithm, the absolute trajectory average error of this algorithm was reduced by 44.01%, the relative trajectory average error was reduced by 7.93%, the average number of ORB feature point matching was increased by 19.03%, and the positioning accuracy and running trajectory effect were improved significantly. In addition, the working scene information of orchard spraying robot can be obtained with high accuracy. The algorithm can provide a theoretical basis for the autonomous navigation of orchard spraying robot.