To overcome the problems of blind zone and incomplete detection in the traditional health monitoring of steel structure building, a rigid-flexible coupling structure inspection robot with magnetic adsorption is studied and its control system is improved. The displacement and attitude kinematics mathematical models of the front and rear bodies of flexible robots and the position and attitude equations of the rigid-flexible coupling structure of the robot are established. The inertial measurement unit and encoder are used to get the real-time dynamic pose parameters of the front and rear bodies of flexible robots, the explicit complementary filter and extended Kalman filter are used respectively to calculate the attitudes of the front and the rear bodies of robots in the dynamic and static working conditions, and the dead reckoning algorithm is used to calculate the robot position. Then, the spatial pose of the rigid-flexible coupling structure of flexible robots is obtained through data fusion. The experimental results show that the extended Kalman filter algorithm provides accurate spatial pose parameters and better dynamic tracking performance for the flexible inspection robot in the obstacle-negotiation movement in complex building structures.