Abstract:This paper presents the design of an optimized Cartographer-SLAM based autonomous navigation system for mobile robots. It aims to address the problems of mismatches and accumulated errors in loop closure detection encountered by the traditional Cartographer algorithm in long corridors, repetitive structures, and dynamic environments. The proposed method improves robustness and accuracy by enhancing loop closure detection and adopting adaptive optimization strategies.The main improvements involve using dynamic time warping for loop candidate selection and dynamic threshold adjustment to reduce computational redundancy. A Bayesian optimization mechanism is applied to fuse grid matching and temporal matching scores, with adaptive weight tuning according to environmental characteristics. In the back-end optimization, a confidence-propagation-based dynamic weighting scheme is introduced to suppress the impact of false matches on map consistency.Experiments are conducted in Gazebo simulation and real-world scenarios. In simulation, the loop closure error is reduced by 23% in “日”-shaped corridors and factory shelf environments. In the corridor of Teaching Building 9 at Nanjing Forestry University, the error decreases from 0.52 to 0.31 m. Tests on the ACES Building dataset show that the proposed algorithm outperforms mainstream methods with good generalization. The AGV navigation system also performs well in dynamic obstacle avoidance and path planning.This work provides an efficient and low-cost solution for autonomous navigation in complex environments and exhibits high engineering application value..