## 1 Introduction  
With the rapid development of UAVs, self-driving vehicles, and mobile robots, the requirements for positioning technology are increasing [1]. While traditional simultaneous localization and mapping (SLAM) methods are low-precision, perturbation-prone, and poor in real time [2, 3], the visual-inertial odometer (VIO) method realizes navigation of the carrier by combining measurement data from inertial sensors and visual information from camera images [4], thus basically solving the shortcomings of technologies such as GPS [5]. Among them, VIO fuses a monocular camera with an IMU as a sensor to jointly realize the pose estimation of the moving body and the reconstruction of the 3D environment [6, 7]. Monocular vision is categorized into feature and direct methods based on front-end visual odometry [8]. The feature-point method calculates camera pose with respect to map points by minimizing the reprojection error, whereas the direct method minimizes photometric error and uses pixel gradients for semi-dense or dense map building in feature-deficient settings [9]. Filter-based and optimization-based approaches in state estimation for dynamic systems with given noise measurements dominate the field of VIO [10]. Meanwhile, initialization methods of VIO are divided into two categories: loosely coupled [11], where the results are fused after the IMU and camera perform their own motion estimation separately [12], and tightly coupled, where state estimation is performed after the IMU and camera jointly construct the equations of motion [13]. Tight coupling can add new states to the system vector according to the characteristics of each sensor, which better utilizes the complementary nature of various types of sensors [14]. In VIO algorithms, point features have the advantage of being easy to detect and track, and are often used as the basic unit of pose estimation in many traditional methods [13]. However, point features are susceptible to environmental complexity, illumination, and camera motion speed [14], and cannot systematically meet the robustness requirements in some challenging scenarios [15]. Straight lines carry a lot of scene information and provide more constraints for the optimization process [16]; therefore, line features with high dimensional characteristics have often been used as compensation for point feature extraction in recent years [17]. PL-VIO [18] integrates the measurement of line features into VIO and successfully adds the error term of line feature construction by designing two representation methods of line features. However, the tracking and matching of line features varies widely based on different algorithms. PL-VINS [19] and PLF-VINS [20] optimize and complement the extraction of features to achieve a high degree of line feature reduction. PL-SVO [21] adds equidistant sampling of line feature endpoints to the semi-direct monocular visual, which avoids feature matching steps by virtue of the advantage of the direct method, effectively shortens the processing time of line features, and improves the stable pose estimation in semantic environments. However, since the line features are arranged and combined with countless point features, a lot of errors will inevitably occur in many point feature-based processing methods, thus affecting the localization performance of the system. UV-SLAM [22] proposes vanishing point features, which are obtained from line features under the premise that vanishing point measurements are the only mapping solution, thus solving geometrical problems and improving the robustness of the system. In this paper, a visual-inertial odometry system based on vanishing points is proposed to deal with inaccurate positioning and underutilization of line features in indoor environments. The main contributions are as follows:  
1. Firstly, for the degeneracy problem caused by special positional line features during camera translation, a degeneracy phenomenon detection strategy is proposed to locate the line where the error occurs.