Mobile robots need to rely on sensor information for positioning in indoor or structured environments, build a map while positioning, and then use the constructed map for navigation. This research has developed a mobile robot control system based on dual lidars to construct indoor maps and autonomous navigation. Fusion of two lidars, Inertial measurement unit (IMU) sensor, encoder sensor information, real-time localization and mapping based on cartographer algorithm. Use the Dijkstra algorithm to plan the global path according to the constructed map, and use the Time Elastic Band Local Planner to plan the local path to complete autonomous navigation. Experiments show that compared with single lidar, the system can effectively improve mapping efficiency, real-time obstacle avoidance and meet indoor navigation and positioning accuracy requirements.