To meet the needs of monitoring the indoor environment, a mobile robot that patrols indoors is designed. The mobile robot uses Raspberry Pi equipped with a ROS system as the control core, uses lidar to collect environmental information, and uses various function packages to develop algorithms under the ROS distributed framework. It is based on the Karto algorithm to build maps and uses the A* algorithm and DWA algorithm to realize autonomous navigation. The robot uses a two-wheel independent drive robot chassis to cope with the complex environment. After the indoor environment test, the goal of indoor map construction and path planning can be completed, which is of great significance to the research in the indoor environment in the future.