Indoor and outdoor seamless switching positioning method based on loose coupling of visual inertial and RTK
Through the indoor and outdoor seamless switching positioning method that is loosely coupled with visual inertia and RTK, the problem of floating positioning accuracy and sudden changes in posture caused by the tight coupling of visual inertia and satellite navigation information is solved, and the stable and constant accuracy of the carrier in a denied environment is achieved. Seam connection positioning.
Patent Information
- Application Number
- CN202411003787.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The existing positioning method that tightly couples visual inertia and satellite navigation information is easily affected by the quality of satellite navigation information, leading to problems such as floating positioning accuracy, sudden changes in position and orientation, and positioning divergence.
An indoor and outdoor seamless switching positioning method based on visual inertia and RTK loose coupling is adopted. By processing image information and IMU information, the local pose in the relative coordinate system is obtained, and GPS information is used to obtain the position in the ENU coordinate system. Reliability screening and time alignment, constructing error state vectors for Kalman filtering, and compensating error states to achieve smooth positioning of global poses. When GPS information is unavailable, it degrades to visual inertial positioning, and the filtering strategy is adjusted to achieve seamless global positioning.
It reduces the amount of calculations, achieves stable and constant-precision seamless positioning of the carrier in and out of the rejection environment, avoids fluctuations in positioning accuracy and sudden changes in posture, and ensures a smooth transition of positioning results.
Smart Images

Figure CN118533170B_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of robot positioning technology, and in particular to a seamless indoor and outdoor switching positioning method based on loose coupling of visual inertia and RTK. Background Art
[0002] Simultaneous Localization and Mapping (SLAM) technology is the core technology for intelligent autonomous robots to perform mission objectives. In recent years, this technology has been widely studied and applied and has been successfully applied to many fields such as micro-UAVs, intelligent driving, virtual reality and augmented reality.
[0003] With the research and open source of various parties in recent years, SLAM technology is also developing in the direction of multi-sensor fusion. Among them, the visual-inertial fusion method has become the most mainstream method due to its advantages of light weight and low cost. By integrating GPS signals on the basis of the visual-inertial system, the inherent defects of the visual-inertial system can be effectively compensated, that is, the visual-inertial positioning results can only be solved using the surrounding environment information, and the positioning error accumulates over time. However, the currently commonly used method of tightly coupling visual-inertial and satellite navigation information is easily affected by the quality of satellite navigation information, affecting the tightly coupled solution results, thereby causing problems such as floating positioning accuracy, sudden changes in posture, and even positioning divergence. Summary of the invention
[0004] In order to avoid the shortcomings of the prior art, the present invention provides a seamless indoor and outdoor switching positioning method based on loose coupling of visual inertia and RTK, which is used to solve the problem that the prior art is easily affected by the quality of satellite navigation information, affecting the tightly coupled solution results, thereby causing floating positioning accuracy, sudden changes in posture and even positioning divergence.
[0005] According to an embodiment of the present disclosure, a method for seamless indoor and outdoor switching positioning based on loose coupling of visual inertial and RTK is provided, the method comprising:
[0006] Process the image information and IMU information to obtain the local position and posture of the carrier in the relative coordinate system;
[0007] The ENU position in the ENU coordinate system is obtained using GPS information, and the ENU position is screened for reliability to obtain available ENU position information;
[0008] The IMU information corresponding to the available ENU position information is stimulated and detected, and the time alignment is performed in the ENU coordinate system to obtain the transfer matrix from the relative coordinate system to the ENU coordinate system;
[0009] The local pose is converted to the ENU coordinate system through the transfer matrix to obtain the visual inertial positioning result in the ENU coordinate system;
[0010] Subtracting the visual inertial positioning result in the ENU coordinate system from the ENU position to obtain a first error state vector, performing error filtering on the first error state vector using a first extended Kalman filter to obtain a posterior error state, and compensating the posterior error state to the visual inertial positioning result to obtain a first global pose of the carrier in the ENU coordinate system;
[0011] When the GPS information is unavailable, the first error state vector is locked and filtered using a second extended Kalman filter to obtain a second global pose of the carrier in the ENU coordinate system;
[0012] When the GPS information jumps after recovery, the second global posture is processed with the previous ENU position and fed back to the first extended Kalman filter to obtain the third global posture of the carrier in the ENU coordinate system.
[0013] Furthermore, the step of processing the image information and the IMU information to obtain the local position and posture of the carrier in the relative coordinate system includes:
[0014] Feature points are extracted and matched on the image information, and pure visual SFM is performed based on the image information to obtain the relative motion between frames;
[0015] Pre-integrate the IMU information, and perform visual inertial alignment on the pre-integrated IMU information and the relative motion between frames to obtain the gyroscope zero bias;
[0016] Pre-integrate the IMU information according to the gyroscope zero bias to obtain the velocity, gravity vector and scale information of each frame to complete the initialization of the visual inertial system;
[0017] Based on the initialized visual-inertial system, the IMU pre-integration residual, visual reprojection error, and marginalization prior information are calculated, and a tightly coupled optimization model is constructed based on the IMU pre-integration residual, visual reprojection error, and marginalization prior information;
[0018] A sliding window is constructed based on key frames to optimize and solve the tightly coupled optimization model to obtain the local pose of the carrier in the relative coordinate system.
[0019] Further, the step of obtaining the ENU position in the ENU coordinate system by using the GPS information and performing reliability screening on the ENU position to obtain available ENU position information includes:
[0020] Convert the longitude, latitude and altitude information in the GPS information from the longitude and latitude coordinate system to the Earth-centered Earth-fixed coordinate system;
[0021] The longitude information, latitude information and altitude information in the GPS information are converted from the Earth-centered Earth-fixed coordinate system to the ENU coordinate system to obtain the ENU position;
[0022] The reliability of GPS information is screened through the error covariance matrix in the GPS information, and when the GPS information is available, the GPS information is converted into available ENU location information.
[0023] Further, the step of performing excitation detection on the IMU information at the time corresponding to the available ENU position information, and then performing time alignment on the available ENU position information and the local pose detected to obtain a transfer matrix from the relative coordinate system to the ENU coordinate system includes:
[0024] An excitation detection function is constructed based on the generalized likelihood ratio test, and the excitation detection function is used to perform excitation detection on the IMU information at the time corresponding to the available ENU position information;
[0025] The available ENU position information corresponding to the value of the excitation detection function being greater than a preset threshold is recorded as the available ENU position information that has passed the detection;
[0026] The available ENU position information and local pose detected are time-aligned, and the least squares problem is constructed using the time-aligned position pairs, and the transfer matrix from the relative coordinate system to the ENU coordinate system is obtained.
[0027] Further, the visual inertial positioning result in the ENU coordinate system is subtracted from the ENU position to obtain a first error state vector, the first error state vector is error filtered using a first extended Kalman filter to obtain a posterior error state, and the posterior error state is compensated to the visual inertial positioning result to obtain a first global pose of the carrier in the ENU coordinate system, including:
[0028] The visual inertial positioning result obtained by rotation is subtracted from the ENU position obtained by GPS observation to obtain the first error state vector ; Wherein, the first error state vector includes the position error , speed error , attitude error , acceleration deviation error and gyro bias error ;
[0029] Performing error filtering on the first error state vector using a first extended Kalman filter to obtain a posterior error state;
[0030] The posterior error state is compensated to the visual inertial positioning result, and the first global pose of the carrier in the ENU coordinate system is obtained by smoothing filtering.
[0031] Further, when the GPS information is unavailable, the first error state vector is locked and filtered using a second extended Kalman filter to obtain a second global pose of the carrier in the ENU coordinate system, including:
[0032] Filtering the first error state vector using a second extended Kalman filter to obtain a second a posteriori error state;
[0033] The second a posteriori error state is compensated to the visual inertial positioning result to obtain the second global pose of the carrier in the ENU coordinate system.
[0034] Further, when the GPS information jumps after recovery, the second global posture and the previous ENU position are processed and fed back to the first extended Kalman filter to obtain the third global posture of the carrier in the ENU coordinate system, including:
[0035] When the GPS information jumps after recovery, the first error state vector before the jump is maintained as the second error state vector;
[0036] Perform negative feedback on the second global pose and the current ENU position to obtain a feedback value;
[0037] Performing error filtering on the second error state vector and the feedback value using the first extended Kalman filter to obtain a third a posteriori error state;
[0038] The third a posteriori error state is compensated to the visual inertial positioning result to obtain the third global pose of the carrier in the ENU coordinate system.
[0039] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0040] In the embodiments of the present disclosure, through the above-mentioned indoor and outdoor seamless switching positioning method based on loose coupling of visual inertia and RTK, on the one hand, by performing excitation detection on the IMU information, GPS information that is less affected by noise is selected to participate in initialization. The first extended Kalman filter is performed by constructing the error state vector, the first posterior error state is compensated, and the first global posture is solved. Taking into account the position mutation that occurs when the GPS information changes, the first extended Kalman filter method with negative feedback is designed to achieve a smooth transition of the positioning results. When GPS information is unavailable, it degenerates into a visual inertial positioning system, locks the first error state vector, adjusts the filtering strategy, and achieves seamless global positioning of the carrier entering and exiting the denied environment. On the other hand, this method reduces the amount of calculation and achieves constant-precision seamless positioning with stable transition of the carrier in and out of the denied environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0042] Figure 1 A step diagram showing a method for seamless indoor and outdoor switching positioning based on loose coupling of visual inertial and RTK in an exemplary embodiment of the present disclosure;
[0043] Figure 2 A specific flow chart of a method for seamless indoor and outdoor switching positioning based on loose coupling of visual inertial and RTK in an exemplary embodiment of the present disclosure is shown;
[0044] Figure 3 A relationship diagram of the ECEF coordinate system, the ENU coordinate system and the Local coordinate system in an exemplary embodiment of the present disclosure is shown;
[0045] Figure 4 A schematic diagram showing the negative feedback compensation positioning result in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0046] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0047] In addition, the accompanying drawings are only schematic illustrations of the embodiments of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0048] This example implementation provides a method for seamless indoor and outdoor positioning based on loose coupling of visual inertial and RTK. Figure 1 As shown in , the indoor and outdoor seamless switching positioning method based on loose coupling of visual inertia and RTK may include: step S101 to step S107.
[0049] Step S101: Processing the image information and IMU information to obtain the local position and posture of the carrier in the relative coordinate system;
[0050] Step S102: using GPS information to obtain the ENU position in the ENU coordinate system, and performing reliability screening on the ENU position to obtain available ENU position information;
[0051] Step S103: Excitation detection is performed on the IMU information at the time corresponding to the available ENU position information, and then the available ENU position information and the local posture detected are time-aligned to obtain a transfer matrix from the relative coordinate system to the ENU coordinate system;
[0052] Step S104: converting the local pose to the ENU coordinate system via the transfer matrix to obtain the visual inertial positioning result in the ENU coordinate system;
[0053] Step S105: subtracting the visual inertial positioning result in the ENU coordinate system from the ENU position to obtain a first error state vector, performing error filtering on the first error state vector using a first extended Kalman filter to obtain a posterior error state, and compensating the posterior error state to the visual inertial positioning result to obtain a first global pose of the carrier in the ENU coordinate system;
[0054] Step S106: when the GPS information is unavailable, the first error state vector is locked and filtered using a second extended Kalman filter to obtain a second global pose of the carrier in the ENU coordinate system;
[0055] Step S107: When the GPS information jumps after recovery, the second global posture is processed with the previous ENU position and fed back to the first extended Kalman filter to obtain the third global posture of the carrier in the ENU coordinate system.
[0056] Through the above-mentioned indoor and outdoor seamless switching positioning method based on loose coupling of visual inertia and RTK, on the one hand, by exciting and detecting the IMU information, GPS information that is less affected by noise is selected to participate in the initialization. The first extended Kalman filter is performed by constructing the error state vector, the first posterior error state is compensated, and the first global pose is solved. Taking into account the position mutation when the GPS information changes, the first extended Kalman filter method with negative feedback is designed to achieve a smooth transition of the positioning results. When GPS information is unavailable, it degenerates into a visual inertial positioning system, locks the first error state vector, adjusts the filtering strategy, and realizes seamless global positioning of the carrier entering and exiting the denied environment. On the other hand, this method reduces the amount of calculation and realizes constant-precision seamless positioning with stable transition of the carrier in and out of the denied environment.
[0057] Next, we will refer to Figures 1 to 4 The various steps of the above-mentioned indoor and outdoor seamless switching positioning method based on loose coupling of visual inertia and RTK in this example implementation are described in more detail.
[0058] In step S101 and step S102, if Figure 2 As shown in the figure, feature points of the image information are extracted and matched, and pure visual motion recovery structure (Structure from Motion, SFM) is performed to obtain the relative motion between frames. At the same time, the IMU information is pre-integrated. Through visual inertial alignment, the gyroscope zero bias is obtained, and the zero bias is introduced into the IMU information after pre-integration processing and the IMU pre-integration is performed again. The speed, gravity vector and scale information of each frame are solved. The visual inertial system is initialized. The IMU pre-integration residual, visual reprojection error and marginalized prior information are calculated as residuals, a tightly coupled optimization model is established, and the sliding window is constructed for the position and posture of the carrier and other states Optimize and solve. It is The IMU state of the frame image, which contains the position in the relative coordinate system ,speed ,direction And acceleration deviation and gyro bias . is the total number of key frames in the sliding window, is the total number of features in the sliding window. It is The inverse depth of feature points. is the camera external parameter. The real-time position and posture of the carrier in the relative coordinate system are obtained through optimization.
[0059] In step S103 and step S104, if Figure 2 As shown, the GPS information is processed; wherein the GPS information includes longitude information, latitude information, altitude information and the covariance matrix of the position error. First, the longitude information, latitude information and altitude information of the GPS information are converted to the ENU coordinate system, and the reliability of the GPS information is analyzed through the error covariance matrix. When the GPS information is available, the excitation detection function is constructed according to the generalized likelihood ratio test ,in is the length of the sliding window, For the sliding window The acceleration measurement of an IMU, g is the gravity vector. When , the carrier is considered to be in active motion and can be used for initialization. is the threshold obtained by the experiment. The target ENU position information that meets the excitation requirements and the relative coordinate position in the IMU information are time-aligned. The least squares problem is constructed using the position that meets the time alignment requirements to obtain the transfer matrix from the relative coordinate to the ENU coordinate to complete the initialization.
[0060] More specifically, the GPS information is processed, including the longitude, latitude, altitude and covariance matrix of the position error. First, the GPS longitude, latitude and altitude information is converted to the ENU coordinate system, from the longitude and latitude coordinate system (LLA coordinate system) to the Earth-centered Earth-fixed coordinate system (ECEF coordinate system):
[0061] (1)
[0062] in, lon For longitude information, lat For latitude information, alt For high information, For the extreme flatness, is the radius of curvature, a is the equatorial radius.
[0063] Conversion from ECEF coordinate system to ENU coordinate system:
[0064] (2)
[0065] in, is the longitude, is the latitude.
[0066] like Figure 3 The figure shows the relationship between the ECEF coordinate system, the ENU coordinate system and the Local coordinate system.
[0067] The reliability of GPS information is analyzed through the error covariance matrix. When GPS information is available, the excitation detection function is constructed based on the generalized likelihood ratio test. ,in is the length of the sliding window, For the sliding window The acceleration observation of an IMU, g is the gravity vector. When , the carrier is considered to be in active motion and can be used for initialization. is the threshold obtained by experiment. is the threshold obtained by the experiment. The available ENU position information and local pose that meet the excitation requirements are time-aligned to obtain a pair of corresponding ENU positions and positions calculated by the visual inertial system in the relative coordinate system. The position pairs that meet the time alignment requirements are used to construct the least squares problem to obtain the transfer matrix from the relative coordinates to the ENU coordinates to complete the initialization.
[0068] According to the first centroid position of the two groups of points and the second centroid position Calculate the centroid coordinates of each point:
[0069] (3)
[0070] Establish an optimization problem to solve the optimal rotation matrix and translation :
[0071] (4)
[0072] in, R is the rotation matrix.
[0073] Solving the optimization problem obtains the transfer matrix from the relative coordinate system to the ENU coordinate system.
[0074] The local pose is transformed to the ENU coordinate system through the transfer matrix to obtain the visual inertial positioning result in the ENU coordinate system.
[0075] In step S105, Figure 2 As shown in the figure, the relative coordinates obtained by the visual inertial system are converted to the Northeastern Sky coordinate system (ENU coordinate system) through the transfer matrix. When GPS is available, the error state vector is obtained by subtracting the rotated relative pose from the ENU coordinates of GPS. , which are position error, velocity error, attitude error, acceleration bias error and gyroscope bias error respectively. The a posteriori error state is obtained through EKF (i.e. the first extended Kalman filter), which is compensated to the relative posture after rotation, and the global posture (i.e. the first global posture) is obtained through smoothing filtering.
[0076] The process of EKF error filtering is as follows:
[0077] The discrete system motion equation is recorded as:
[0078] (5)
[0079] in, for The function of is the noise corresponding to the error state vector, obey The normal distribution of is the system noise.
[0080] After linearization, the prediction part equation is obtained:
[0081] (6)
[0082] in, is the system noise, is the predicted error state vector, is the predicted covariance matrix, is the corrected covariance matrix, is the linearized Jacobian matrix.
[0083] Updated part:
[0084] (7)
[0085] in, K For Karman gain, is the system observation, and the observation equation is:
[0086] (8)
[0087] in, is the observation equation abstracted from the discrete system, is the observation noise, is the covariance matrix of the observation noise, and the Jacobian of the observation equation relative to the error state is :
[0088] (9)
[0089] in, For The partial derivative of For Find the partial derivative of .
[0090] The constructed error state vector (i.e., the first error state vector) is introduced into the above error filtering process, and the GPS measurement is used as the observation for state update. The a posteriori error state (i.e., the first a posteriori error state) obtained after filtering is compensated to the visual inertial solution result after conversion to the ENU coordinate system to obtain the carrier pose in the ENU coordinate system (i.e., the first global pose).
[0091] In step S106, if Figure 2 As shown, when GPS is unavailable, the lock error status (i.e. the first error state vector), adjust the EKF strategy (i.e. the second extended Kalman filter). At this time, it degenerates into a visual inertial system. After the state transfer matrix is processed, the compensation After that, the carrier pose in the ENU system (i.e., the second global pose) can still be output.
[0092] Specifically, the first error state vector is filtered using a second extended Kalman filter to obtain a second a posteriori error state; the second a posteriori error state is compensated to the visual inertial positioning result to obtain a second global pose of the carrier in the ENU coordinate system. The principle of filtering the first error state vector by the second extended Kalman filter is the same as the principle of error filtering of the first error state vector by the first extended Kalman filter.
[0093] In step S107, Figure 2 As shown in the figure, when the GPS data and the current posture jump, (because the system degradation begins to accumulate errors in the GPS denial state, position mutations often occur when GPS is lost and restored), the difference between the two sets of coordinates is not used to obtain , but in the original Compensation on the basis of ,in The direction of the jump is determined by the step size of the GPS position information. At the same time, the vector from the current position to the latest GPS observation is processed and fed back to the filtering process as the observation covariance. This achieves a smooth transition of positioning when the GPS jumps.
[0094] Specifically, when the GPS information jumps after recovery, the first error state vector before the jump is maintained as the second error state vector; the second global posture and the current ENU position are negatively fed back to obtain a feedback value; the second error state vector and the feedback value are error filtered using the first extended Kalman filter to obtain a third a posteriori error state; the third a posteriori error state is compensated to the visual inertial positioning result to obtain the third global posture of the carrier in the ENU coordinate system.
[0095] like Figure 4 As shown, this is a schematic diagram of negative feedback compensation positioning results.
[0096] This application includes three parts: initialization of the transfer matrix between the visual inertial system and RTK, loosely coupled information fusion based on error-based extended Kalman filtering, and negative feedback compensation for jump information. First, the relative posture is obtained through the visual inertial system, and the position in the ENU coordinate system is obtained through GPS information, and the ENU position information is screened for reliability. The available ENU position information and relative position information are screened by excitation detection of the IMU observations and the transfer matrix is initialized. The error state vector is constructed using the difference between the posture solved by the visual inertial system in the ENU coordinate system and the observed position of GPS, and error filtering is performed to compensate the posterior error state to the solution result of the visual inertial system in the ENU system, and a global positioning that eliminates the cumulative error is obtained. At the same time, for the case where GPS is unavailable, the filtering strategy is adjusted, and the GPS observation at this time is not used for updating; for the case where the GPS and the current posture jump, the jump information is fed back to the EKF process, and finally seamless and accurate global positioning indoors and outdoors is obtained.
[0097] Through the above-mentioned indoor and outdoor seamless switching positioning method based on loose coupling of visual inertia and RTK, on the one hand, by exciting and detecting the IMU information, GPS information that is less affected by noise is selected to participate in the initialization. The first extended Kalman filter is performed by constructing the error state vector, the first posterior error state is compensated, and the first global pose is solved. Taking into account the position mutation when the GPS information changes, the first extended Kalman filter method with negative feedback is designed to achieve a smooth transition of the positioning results. When GPS information is unavailable, it degenerates into a visual inertial positioning system, locks the first error state vector, adjusts the filtering strategy, and realizes seamless global positioning of the carrier entering and exiting the denied environment. On the other hand, this method reduces the amount of calculation and realizes constant-precision seamless positioning with stable transition of the carrier in and out of the denied environment.
[0098] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0099] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0100] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A seamless indoor and outdoor switching positioning method based on loose coupling of visual inertial and RTK, characterized in that: The method includes: Process the image information and IMU information to obtain the local position of the carrier in the relative coordinate system; specifically, extract and match the feature points of the image information, and perform pure visual SFM based on the image information to obtain the relative motion between frames. S ; Pre-integrate the IMU information, and perform visual-inertial alignment on the pre-integrated IMU information and the relative motion between frames to obtain the gyroscope zero bias; pre-integrate the IMU information according to the gyroscope zero bias to obtain the velocity, gravity vector and scale information of each frame to complete the initialization of the visual-inertial system; calculate the IMU pre-integration residual, visual reprojection error, and marginalization prior information based on the initialized visual-inertial system, and build a tightly coupled optimization model based on the IMU pre-integration residual, visual reprojection error, and marginalization prior information; build a sliding window based on the key frame to optimize and solve the tightly coupled optimization model to obtain the local position and posture of the carrier in the relative coordinate system; The ENU position in the ENU coordinate system is obtained by using the GPS information, and the reliability of the ENU position is screened to obtain the available ENU position information; specifically, the longitude information, latitude information and altitude information in the GPS information are converted from the longitude and latitude coordinate system to the earth-centered earth-fixed coordinate system; the longitude information, latitude information and altitude information in the GPS information are converted from the earth-centered earth-fixed coordinate system to the ENU coordinate system to obtain the ENU position; the reliability of the GPS information is screened by the error covariance matrix in the GPS information, and when the GPS information is available, the GPS information is converted into the available ENU position information; The IMU information at the time corresponding to the available ENU position information is excited and detected, and then the available ENU position information and the local posture are time-aligned to obtain a transfer matrix from the relative coordinate system to the ENU coordinate system; specifically, the method includes: constructing an excitation detection function according to a generalized likelihood ratio test, and using the excitation detection function to excite the IMU information at the time corresponding to the available ENU position information; recording the available ENU position information corresponding to the value of the excitation detection function greater than a preset threshold as the available ENU position information that has passed the detection; time-aligning the available ENU position information and the local posture that have passed the detection, using the time-aligned position pair to construct a least squares problem, and obtaining the transfer matrix from the relative coordinate system to the ENU coordinate system; The local pose is converted to the ENU coordinate system through the transfer matrix to obtain the visual inertial positioning result in the ENU coordinate system; The visual inertial positioning result in the ENU coordinate system is subtracted from the ENU position to obtain a first error state vector, the first extended Kalman filter is used to perform error filtering on the first error state vector to obtain a first a posteriori error state, and the first a posteriori error state is compensated to the visual inertial positioning result to obtain a first global pose of the carrier in the ENU coordinate system; specifically comprising: subtracting the visual inertial positioning result obtained by rotation from the ENU position obtained by GPS observation to obtain a first error state vector ; Wherein, the first error state vector includes the position error , speed error , attitude error , acceleration deviation error and gyro bias error ; Perform error filtering on the first error state vector using the first extended Kalman filter to obtain a first a posteriori error state; compensate the first a posteriori error state to the visual inertial positioning result, and obtain the first global pose of the carrier in the ENU coordinate system by smoothing filtering; When the GPS information is unavailable, the first error state vector is locked and filtered by a second extended Kalman filter to obtain a second global pose of the carrier in the ENU coordinate system; specifically comprising: filtering the first error state vector by a second extended Kalman filter to obtain a second a posteriori error state; compensating the second a posteriori error state into the visual inertial positioning result to obtain a second global pose of the carrier in the ENU coordinate system; When the GPS information jumps after recovery, the second global pose and the current ENU position are processed and fed back to the first extended Kalman filter to obtain the third global pose of the carrier in the ENU coordinate system; specifically including: when the GPS information jumps after recovery, the first error state vector before the jump is maintained as the second error state vector; the second global pose and the current ENU position are negatively fed back to obtain a feedback value; the second error state vector and the feedback value are error filtered by the first extended Kalman filter to obtain a third a posteriori error state; the third a posteriori error state is compensated to the visual inertial positioning result to obtain the third global pose of the carrier in the ENU coordinate system.
