Indoor robots are more and more widely used, and their path planning directly affects traverse efficiency and quality, which has always been a hot research topic. Excessive requirements for sensor accuracy and accuracy may reduce the adaptability of path planning or cause unacceptable costs. Based on the analysis of the path planning requirements of the indoor robot, this paper proposes a ROS path planning method based on 2D Lidar-based SLAM. The algorithm is simple and effective. In the simulation test, the robot has a high coverage of the entire area and strong environmental adaptability.