| Simultaneous Localization and Mapping(SLAM)is one of the core technologies for mobile robots.Camera sensors have the advantages of low cost,rich information,and small size,so visual SLAM technology has become a hot research topic in recent years.However,visual SLAM has the disadvantages of strong dependence on environment texture and poor adaptability to fast motion.To address these problems,this thesis proposes a visual inertial SLAM method based on point and line features.Based on the data obtained by monocular camera and inertial measurement unit(IMU),the point and line features extracted from images are used to establish data association between images and further tightly coupled with IMU pre-integration results,which leads to the effective solution of the pose of camera and spatial coordinates of point and line features.A set of line feature extraction and matching methods are proposed.Firstly,the extracted line segments are sorted according to their lengths,and the longest one is selected as the reference line.The angles and distances between the remaining line segments and the reference line are calculated and used as the criteria to select candidate line segments from the remaining line segments.After that,the distance between the candidate line segment and the reference line is compared with the length of the candidate line segment to determine whether the candidate line segment should be merged with the reference line.This algorithm can merge potential short line segments that originally belong to the same long line segment,obtain more stable long line segments,increase the number of matched line segments between frames,and enhance data association.The data association of inter-frame line segments is then established using line segment matching algorithm based on the optical flow method.The points are uniformly sampled on the line segments detected in the current frame,and these points are tracked in the previous frame using optical flow method.Then the line segments are matched and selected according to the position relationship between the tracked points and each line segment.The algorithm does not need to compute descriptors,which makes it enable to match line segments more quickly.Aiming at the effect of the fusion of point and line features on the system and the problem of insufficient utilization of line features,the weighted coefficients of errors in tightly coupled optimization of SLAM system are adjusted to make it more suitable for the visual inertial SLAM method based on point and line features.At the same time,a loop closure detection algorithm based on point and line features is proposed.By applying the line features to the loop closure detection,the system can make full use of the line features,and a more complete visual inertial SLAM system based on point and line features is further constructed.In the loop closure module,the image similarity is calculated based on point features and line features respectively,and the number of point features and line features and the distribution of ambient texture are combined to carry out weighted calculation,so as to determine the loop closure candidate frame.In this thesis,the proposed method is tested on EuRoC dataset and in real scenes.Experimental results based on EuRoC dataset show that the absolute trajectory error of the proposed method is reduced by 17.76%,12.79%,and 9.32%on average compared with VINS-Mono,PL-VIO,and PL-VINS respectively in the case of no loop closure.And under the loop closure case,the absolute trajectory error of the proposed method is reduced by 27.25%and 6.81%on average compared with VINS-Mono and PL-VINS respectively.The tests in real scenes also show the feasibility and robustness of the proposed algorithm. |