A large number of particles are needed to improve the precision in particle filtering SLAM(simultaneous localization and mapping) of mobile robots. To solve this problem,a SLAM method based on particle swarm optimization(PSO) is presented by introducing PSO's idea into the FastSLAM. Through the particle swarm optimization,the particle's prediction is updated,the particle's proposal distribution is adjusted in FastSLAM,and then the particles are concentrated around the robot's true pose. The method can enhance the SLAM precision effectively,and reduce the particle number and the computational time complexity. The simulation experiment results prove its effectiveness and feasibility.