In order to compare the difference between EKF-SLAM and UKF-SLAM algorithms, MATLAB is used to carry out simulation experiments on the two algorithms, and a comparative analysis is carried out through experiments.Experimental conditions: The LIdar is mounted on the AGV body, and the maximum measurement distance is 80m, the measurement resolution is 0.01m, the maximum measurement Angle is 180°, and the resolution is 1°.The measurement results were added into the Gaussian noise.The sampling period of measurement is 25ms.AGV speed is 0.5m/s, wheel spacing is 0.8m, and the maximum rotation Angle is 30°.The simulation experiment is divided into two parts: 150 landmark points are set near the 100m long linear path, and AGV travels along the linear path.Ekf-slam and UKF-SLAM were respectively used for simulation, and the actual and estimated AGV trajectory obtained were shown in Figure 5.3 and Figure 5.4.The error between the estimated trajectory and the actual trajectory is shown in Figure 5.5 and Figure 5.6.