In the past, manual inspection was often used for equipment inspection in indoor environments such as substation rooms and chemical plant rooms. This way often accompanies high labor intensity, low inspection efficiency, and low safety, which is difficult to meet the increasingly stringent requirements of indoor equipment operation and maintenance management. For dealing with these issues, a VIORB-SLAM2 algorithm based on the integration of IMU and visual information, was proposed by this paper. Firstly, the IMU data and image data were integrated to restore scale information of cameras, and then an error function was established to enhance the algorithm’s robustness. Secondly, in order to improve the accuracy of the algorithm, the random sampling consensus method was used to eliminate the wrong matching points in feature point matching, and the normalized cross-correlation matching was employed to constrain key frame matching conditions. Finally, through the iterative closest point method to stitch the point clouds, a dense map for navigation was constructed. The experimental results show that the algorithm designed by this paper has solved the shortcomings of applying the ORB-SLAM2 algorithm to indoor inspection robots while achieving high positioning accuracy, which can be combined with other algorithms in the field of artificial intelligence for object detection and semantic map construction in the future.