A navigation and positioning method for unmanned ships based on tight coupling of monocular camera / IMU / DVL
By adopting a tightly coupled navigation method of monocular camera, IMU and DVL on unmanned ships, and combining visual and inertial data for joint initialization and nonlinear optimization, the problem of insufficient navigation accuracy of unmanned ships when operating near shore is solved and achieved. Higher precision and more accurate pose estimation.
Patent Information
- Application Number
- CN202210230594.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-03-10
AI Technical Summary
Existing unmanned ships have insufficient navigation and positioning accuracy when operating near shore. In particular, the accuracy of monocular visual navigation and inertial navigation decreases in high speed or weak texture environments, and the inertial navigation system has accumulated errors, making it difficult to achieve long-term accurate navigation.
Using a tightly coupled navigation and positioning method of monocular camera, IMU and DVL, through joint initialization of multi-sensor information and sliding window nonlinear optimization, high-precision pose estimation is performed based on visual and inertial data to reduce navigation errors.
It improves the navigation and positioning accuracy of unmanned ships for near-shore operations, effectively reduces navigation errors through multi-sensor fusion, and achieves more accurate pose estimation and long-term precise navigation.
Smart Images

Figure CN115344033B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of navigation and positioning of unmanned ships during nearshore operations, and in particular to an unmanned ship navigation and positioning method based on tight coupling of a monocular camera / IMU / DVL. Background Art
[0002] An unmanned ship is an intelligent surface platform that integrates multiple technologies such as automated control, navigation and positioning, and multi-sensor fusion. It can complete relevant operations in the target waters under remote control or autonomous navigation. Autonomous operations on the water surface often require high positioning accuracy, so a complete set of high-precision navigation and positioning systems is indispensable. The navigation and positioning system can provide accurate navigation information, ensure positioning accuracy, and achieve precise control, thereby increasing the reliability of surface operations. In order to meet the needs of unmanned ships to successfully complete surface operations, improving the accuracy of navigation and positioning systems has become a hot topic for scholars from various countries. At present, research on improving positioning accuracy at home and abroad mainly focuses on visual navigation and inertial navigation, both of which are core technologies for achieving autonomous navigation.
[0003] Visual navigation uses the camera as the core sensor to obtain environmental information, which is usually composed of camera information reading, visual odometer, backend optimization, loop detection and construction. Figure 5 modules. Depending on the type of camera, visual navigation is divided into monocular visual navigation, binocular visual navigation and depth visual navigation. Visual navigation uses cameras to observe the surrounding environment, and has the advantages of no drift, good stability, high resolution, low price, and easy installation. However, different cameras also bring different problems. Monocular cameras have no depth information, the synchronization of binocular cameras is difficult to ensure and requires a huge amount of calculation, and depth cameras are easily affected by lighting and have a small field of view. These problems will reduce the positioning accuracy of the visual navigation system in scenarios with fast camera movement or weak texture.
[0004] The inertial navigation system is an autonomous navigation system with an inertial measurement unit (IMU) as the core sensor, which is not dependent on external information and is not subject to external interference. The IMU consists of a three-axis accelerometer and a three-axis gyroscope, and measures the linear velocity and angular velocity and integrates them to obtain the attitude of the carrier. However, the attitude will diverge over time, causing cumulative errors in the system. This reflects the characteristics of the inertial navigation system, which has high-precision estimates in a short period of time but cannot be used for long-term navigation. The accuracy of IMU varies. Navigation equipment with high accuracy is generally expensive and suitable for the military; low-precision inertial devices often appear in the public's field of vision due to their low cost, small size, low power consumption and other advantages, and can be found in the electronics industry, aerospace and other fields. It can be seen that it is difficult to achieve long-term accurate navigation and positioning by relying solely on the inertial navigation system, and other sensors need to be integrated to complete it.
[0005] Doppler Velocity Log (DVL) is a navigation device based on acoustic measurement of carrier speed. Its working principle is the Doppler effect. It is mainly composed of a transducer, a transmitting unit and a receiving unit. The Doppler effect means that when the transmitting source and the receiver have relative motion, the sound wave is reflected from the bottom of the water to the receiver, and the receiving frequency will be offset from the transmitting frequency. This frequency offset is called Doppler frequency shift. The speed of the carrier relative to the bottom of the water can be obtained by solving the Doppler frequency shift. DVL has the characteristics of high speed measurement accuracy, strong real-time performance, good stability, fast data output, etc., and is widely used in underwater navigation. Summary of the invention
[0006] Technical issues to be solved
[0007] In order to improve the navigation and positioning accuracy of unmanned ships during near-shore operations, the present invention proposes a navigation and positioning method based on the tight coupling of monocular camera / IMU / DVL. The method combines the monocular camera, IMU and DVL in a tight coupling manner, and obtains more accurate pose estimation by joint initialization of multi-sensor information and a nonlinear optimization method based on a sliding window. The navigation and positioning accuracy is improved on the basis of effectively reducing the navigation error of the unmanned ship for smooth and autonomous operation near the shore.
[0008] Technical Solution
[0009] A method for unmanned ship navigation and positioning based on tight coupling of monocular camera / IMU / DVL, characterized by the following steps:
[0010] Step 1: When the unmanned boat is operating on the shore, the monocular camera, IMU and DVL installed on the unmanned boat are started; the monocular camera is responsible for collecting monocular visual images, the IMU is responsible for obtaining information from the gyroscope and accelerometer, and the DVL is responsible for collecting speed information; the original information of the three sensors is measured and pre-processed, that is, feature extraction and matching are performed on the visual part, and IMU / DVL pre-integration is performed on the inertial part to better perform joint initialization;
[0011] Step 2: After the preprocessing of the monocular camera, IMU and DVL raw information, perform joint initialization between sensors; align the IMU / DVL pre-integrated data with the visual information initialization results obtained through the pure visual SFM process, and perform monocular vision / inertial / DVL joint initialization to restore the initial values of the optimization variables of the first few frames, including scale, gyroscope bias, velocity, and gravity vector, and provide these initial values for subsequent nonlinear optimization;
[0012] Step 3: After completing the joint initialization, enter the tightly coupled nonlinear optimization process, which uses a sliding window to save space. During the window sliding process, the IMU / DVL measurement values and visual feature observation values are tightly integrated to build a joint optimization model, perform high-precision pose estimation on a fixed number of state variables, and use a marginalization scheme to reduce the optimization calculation complexity. Next, loop detection is used to establish the feature connection between the current frame and the loop candidate frame and take it into account in the nonlinear optimization, so as to complete the correction and update of the landmark point pose with the minimum amount of calculation, realize repositioning, and obtain more accurate pose information.
[0013] Step 4: After relocalization, the global pose graph is optimized using four degrees of freedom, including relative displacement and yaw angle on the x, y, and z axes. The pose information of all key frames in the database is updated using sequential edges and loop edges to eliminate the cumulative errors introduced by nonlinear optimization, loop detection, and relocalization, and obtain pose information of landmark points that is closer to the actual pose.
[0014] A further technical solution of the present invention is as follows: in step 1, for the visual part, feature points are extracted from the continuous frame images acquired by the monocular camera, and the feature points are tracked by calculating the instantaneous speed of the pixels of two adjacent frames of the image through the sparse optical flow method to obtain successfully matched feature point pairs.
[0015] A further technical solution of the present invention is as follows: In step 1, for the inertial part, a pre-integration operation is performed on the IMU and DVL measurement values between two adjacent frames, and the inertial information and the DVL information are aligned in time to obtain data input within the same time.
[0016] A further technical solution of the present invention: in step 2, the sampling frequency of the monocular camera is 10 Hz, the sampling frequency of the IMU is 100 Hz, and the sampling frequency of the DVL is 10 Hz; after the measurement preprocessing is completed, the sampling frequency of the monocular camera is used as the standard, and the information of the three is aligned using the linear interpolation method to obtain data input of the same time.
[0017] A further technical solution of the present invention: In step 2, the pure vision SFM process can obtain the relative pose between each frame image obtained by the camera according to all the visual information collected by the camera according to the PnP principle, and use triangulation to restore the three-dimensional spatial position of the feature points between the two frames, and define the reference coordinate system based on this.
[0018] A further technical solution of the present invention is as follows: in step 2, the visual inertial alignment process aligns the pure visual information with the IMU / DVL pre-integration to perform data alignment, and the initial values of the gyro bias, velocity, and gravity vector parameters can be estimated to solve the scale problem of the monocular camera; the specific steps are: first, the gyro bias is calibrated, and all IMU / DVL pre-integration items are updated again according to the obtained bias; secondly, the speed, gravity vector, and scale of the monocular camera are initialized and restored, and the gravity vector is optimized twice; then, the feature point depth is calculated, and the position, velocity, and feature point depth are scaled according to the scale; finally, the world coordinate system is determined according to the gravity vector after the second optimization, and all variables are converted to the world coordinate system.
[0019] Further technical solution of the present invention: The specific process in step 3 is:
[0020] Step 3.1: Set state variables in a sliding window, including camera pose, IMU state corresponding to the image: position, attitude, velocity, zero bias of accelerometer and gyroscope in IMU, position and velocity zero bias of DVL, inverse depth of feature points, camera-IMU external parameters, IMU-DVL external parameters;
[0021] Step 3.2: Determine whether the penultimate frame in the sliding window is a key frame, select a specific marginalization strategy, and derive the marginalization residual term based on the relevant information in the state variable;
[0022] Step 3.3: Obtain the measurement residuals of IMU and DVL based on the IMU state, the zero bias of IMU accelerometer and gyroscope, the DVL position and velocity zero bias, and the external parameters of IMU-DVL in the state variables;
[0023] Step 3.4: Obtain the visual reprojection residual term based on the pose of the IMU corresponding to all images in the state variable, the external parameters of the camera-IMU, and the inverse depth of all feature points in the sliding window;
[0024] Step 3.5: Under the condition of known state variables, construct the cost function of tightly coupled nonlinear optimization according to the three residual terms obtained in steps 3.2 to 3.4;
[0025] Step 3.6: Iteratively optimize the cost function obtained in step 3.5. When a new frame arrives, the current frame becomes the previous frame, the sliding window moves forward, the relevant parameters are passed, and all invalid feature points in the latest sliding window are removed, and the feature point information is updated;
[0026] Step 3.7: Whenever a key frame comes, it is first necessary to extract the corner points of the frame image and calculate the descriptor to establish a key frame database; when loop detection occurs, the bag-of-words model is used to measure the similarity between the current key frame and all historical key frames in the database to determine whether the carrier has passed through the same environment before. If the similarity reaches a pre-set threshold, it is considered that a loop has occurred; however, it is very likely that the two images are too similar. In order to prevent the occurrence of mismatching, certain test conditions need to be set; when the test conditions are met, that is, it is confirmed that the correct loop has occurred, the position and posture of the landmark point can be corrected and updated to complete the repositioning and obtain more accurate position and posture information.
[0027] Beneficial Effects
[0028] The present invention proposes a navigation and positioning method for an unmanned ship based on tight coupling of monocular camera / IMU / DVL. The method organically integrates the monocular camera, IMU and DVL in a tight coupling manner. First, the data input of the two is effectively unified through IMU / DVL pre-integration; secondly, the scale problem of the monocular camera is effectively solved through joint initialization, and the initial value of the state variable is restored; then, the space is saved and the optimization calculation amount is reduced through tight coupling nonlinear optimization based on sliding windows, so as to obtain a more accurate pose estimation; finally, the accumulated error generated in the previous process is corrected through loop detection and pose graph optimization process, and the pose information of the landmark point is corrected and updated to obtain a pose closer to the actual pose, thereby improving the navigation and positioning accuracy of the unmanned ship.
[0029] The beneficial effect of the present invention is that, due to the introduction of DVL suitable for underwater navigation and the use of a tightly coupled method for nonlinear optimization, the present invention has the following advantages:
[0030] 1) The IMU pre-integration is extended to IMU / DVL pre-integration. The information input of the IMU with high sampling frequency and the DVL with low sampling frequency is obtained in the same time through pre-integration. The pre-integration operation ensures the uniformity of information between sensors.
[0031] 2) Compared with the single sensor navigation algorithm and vision / IMU navigation algorithm, this algorithm makes full use of the coupling between multi-sensor information and uses DVL constraints to better restore the scale of the monocular camera, which suppresses the velocity divergence of the IMU accelerometer to a certain extent. On the basis of effectively correcting the navigation error, a more accurate posture result is obtained, thereby improving the navigation positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0033] Figure 1It is a navigation and positioning method framework with tight coupling of monocular / IMU / DVL.
[0034] Figure 2 Schematic diagram of IMU pre-integration.
[0035] Figure 3 Schematic diagram of the visual-inertial alignment process.
[0036] Figure 4 This is a diagram of the marginalization strategy.
[0037] Figure 5 Schematic diagram of sequential edges and loop edges. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0039] like Figure 1 As shown, the specific steps of the present invention are as follows:
[0040] Step 1: When the unmanned boat is operating on the shore, the monocular camera, IMU and DVL are started at the same time. The monocular camera is responsible for collecting monocular visual images, and the data sampling frequency is 10Hz; the IMU is responsible for obtaining gyroscope information, and the data sampling frequency is 100Hz; the DVL is responsible for collecting speed information, and the data sampling frequency is 10Hz. The original information of the three sensors is measured and pre-processed, and the visual part is feature extracted and matched, and the inertial part is pre-integrated by IMU / DVL to obtain information input within the same time.
[0041] Step 2: After the preprocessing of the original information of the monocular camera, IMU and DVL, the sampling frequency of the monocular camera is used as the standard, and the three information is aligned using the linear interpolation method to obtain data input of the same time, followed by joint initialization, including the pure visual SFM process and the visual inertial alignment process. The IMU / DVL pre-integrated data is aligned with the visual information initialization result obtained through the pure visual SFM process, and the monocular vision / inertial / DVL joint initialization is performed to restore the initial values of the optimization variables of the first few frames, including scale, gyroscope bias, velocity, gravity vector, etc., and these initial values are provided to the subsequent nonlinear optimization.
[0042] Step 2.1: The pure vision SFM process can obtain the relative pose between each frame image obtained by the camera based on all the visual information collected by the camera according to the PnP principle, use triangulation to restore the three-dimensional spatial position of the feature points between two frames, and use this to define the reference coordinate system.
[0043] Step 2.2: The visual-inertial alignment process aligns the pure visual information with the IMU / DVL pre-integration. First, the gyroscope zero bias is calibrated, and all IMU / DVL pre-integration items are updated according to the obtained zero bias. Secondly, the recovery speed, gravity vector and scale of the monocular camera are initialized, and the gravity vector is optimized twice. Then, the feature point depth is calculated, and the position, velocity and feature point depth are scaled according to the scale. Finally, the world coordinate system is determined according to the gravity vector after the second optimization, and all variables are converted to the world coordinate system.
[0044] Step 3: After completing the joint initialization, enter the tightly coupled nonlinear optimization process, which uses a sliding window to save space. During the window sliding process, the IMU / DVL measurements and visual feature observations are tightly integrated to build a joint optimization model, perform high-precision pose estimation on a fixed number of state variables, and use a marginalization scheme to reduce the optimization calculation complexity. Next, loop detection is used to establish the feature connection between the current frame and the loop candidate frame and take it into account in the nonlinear optimization, so as to complete the correction and update of the landmark point pose with the minimum amount of calculation, realize repositioning, and obtain more accurate pose information.
[0045] Step 3.1: Set state variables in a sliding window, including camera pose, IMU state (position, attitude, velocity) corresponding to the image, accelerometer and gyroscope biases in the IMU, position and velocity biases of the DVL, inverse depth of feature points, camera-IMU extrinsic parameters, and IMU-DVL extrinsic parameters.
[0046] Step 3.2: Determine whether the penultimate frame in the sliding window is a key frame, select a specific marginalization strategy, and derive the marginalization residual term based on the relevant information in the state variable.
[0047] Step 3.3: Obtain the measurement residuals of the IMU and DVL based on the IMU state in the state variables, the zero bias of the IMU accelerometer and gyroscope, the DVL position and velocity zero bias, and the external parameters of the IMU-DVL.
[0048] Step 3.4: The visual reprojection residual term is obtained based on the pose of the IMU corresponding to all images in the state variable, the external parameters of the camera-IMU, and the inverse depth of all feature points in the sliding window.
[0049] Step 3.5: Under the condition of known state variables, construct the cost function of tightly coupled nonlinear optimization based on the three residual terms obtained in steps 3.2 to 3.4.
[0050] Step 3.6: Iteratively optimize the cost function obtained in step 3.5. When a new frame arrives, the current frame becomes the previous frame, the sliding window moves forward, the relevant parameters are passed, and all invalid feature points in the latest sliding window are removed, and the feature point information is updated.
[0051] Step 3.7: Loop detection is only for key frames, but the first 50 key frames after the system starts running are not looped, and are only added to the key frame database. Whenever a key frame comes, the FAST corner points of the frame need to be extracted and the BRIEF descriptor needs to be calculated; when loop detection occurs, the bag-of-words model is used to measure the similarity between the current frame and all historical key frames. If the similarity reaches the preset threshold, a certain number of loop candidate frames can be screened out, and it can be considered that a loop is generated; ORB feature matching is performed on the current frame and the loop candidate frame, and the mismatched points are eliminated through the random consistency principle (RANSAC), and the relative pose of the loop candidate key frame and the current frame is solved according to the PnP method. If the heading angle between the loop candidate key frame and the current frame is less than 30° and the relative displacement is less than 20 meters, the loop candidate key frame is a loop key frame. When a loop key frame is detected, the current frame is relocated according to the pose of the loop key frame and the relative pose of the loop key frame and the current frame.
[0052] Step 4: After relocalization, the global pose graph is optimized using four degrees of freedom (relative displacement and yaw angle on the x, y, and z axes). The pose information of all key frames in the database is updated using sequential edges and loop edges. The accumulated errors introduced by nonlinear optimization, loop detection, and relocalization are corrected to obtain pose information of landmark points that is closer to the actual one.
[0053] The relevant model is given below:
[0054] 1. IMU / DVL pre-integration related models
[0055] Considering the error model of DVL, only the velocity offset error is considered here, and there is the measurement model of IMU / DVL:
[0056]
[0057] In the formula, the subscripts a and ω represent the accelerometer and gyroscope respectively, and the subscripts w and b represent the world coordinate system and the IMU body coordinate system respectively; Represent the measured value and true value of the accelerometer, respectively. Represent the measured value and true value of the gyroscope respectively; b a ,b ω Respectively represent the zero bias of the accelerometer and gyroscope; n a ,n ωThey represent the white noise of the accelerometer and gyroscope respectively, which are usually assumed to be Gaussian white noise; g w is the gravity vector in the world coordinate system; It is the rotation matrix from the world coordinate system to the IMU body coordinate system.
[0058] Therefore, the kinematic model of IMU / DVL fusion of the k+1th frame can be obtained as follows:
[0059]
[0060]
[0061]
[0062]
[0063] In the formula, They respectively represent the position, velocity and rotation of the IMU system in the reference frame, where the rotation is in the form of quaternion; is the rotation of the IMU in the world system at time t, is the rotation change of the IMU in the system at the kth frame at time t; Δt represents the time difference between k and k+1 frames; represents the position of the DVL system in the reference system, Represents the rotation extrinsic parameter between IMU-DVL.
[0064] Separate the optimization variables from the kinematic model of IMU / DVL fusion and multiply both ends The world coordinate system in the model is converted into the kth frame of the carrier coordinate system. After arranging and simplifying, it is assumed that the random walk zero bias of IMU and DVL is linearly related to the pre-integration term. The first-order Taylor expansion of the pre-integration term is performed in the kth frame to obtain the IMU / DVL pre-integration formula:
[0065]
[0066]
[0067]
[0068]
[0069] In the formula, Represents the calculated value of IMU position, velocity, and rotation pre-integration items, is the calculated value of the DVL pre-integral term; δb a ,δb ω Represent the zero bias error values of the accelerometer and gyroscope, δb dRepresents the speed zero bias error value of DVL; They represent the partial derivatives of the position pre-integration term at the kth frame with respect to the IMU accelerometer bias and gyroscope bias, respectively. They represent the partial derivatives of the velocity pre-integration term for the IMU accelerometer bias and gyroscope bias at the kth frame, respectively. Indicates the partial derivative of the rotation pre-integration term with respect to the IMU gyroscope zero bias at the kth frame, They represent the partial derivatives of the DVL position pre-integration term to the DVL velocity bias and the IMU gyro bias at the kth frame, respectively. are all Jacobian matrices with errors.
[0070] 2. Joint initialization
[0071] The purpose of joint initialization is to restore the initial values of the optimization variables of the system in the first few frames, including scale, gyroscope bias, velocity, gravity vector, etc., and provide these initial values to the subsequent nonlinear optimization.
[0072] 1) Gyroscope bias b ω :
[0073] The IMU rotation pre-integration term is used to construct a rotation least squares model, and the following cost function is obtained:
[0074]
[0075] Where B is the set of all frame images, is the camera's posture at the kth and k+1th frames, is the rotation pre-integration term of the IMU, and its expression is:
[0076]
[0077] Rewrite the above formula, keeping only the imaginary part and Transformed into a positive definite matrix, we have:
[0078]
[0079] The least squares solution obtained by Cholesky decomposition of the above equation is the estimated gyro bias b ω After obtaining the zero bias, all IMU pre-integration items need to be retransmitted.
[0080] 2) Speed, gravity and scale parameters
[0081] Taking the first frame c0 of the camera as the reference coordinate system, we can obtain the transformation relationship between the IMU body coordinate system and the DVL body coordinate system relative to the c0 coordinate system and the definition of the scale s of the monocular camera, which is:
[0082]
[0083]
[0084]
[0085] In the formula, is the camera-IMU extrinsic translation, It is the camera-DVL external parameter translation. After successfully restoring the gyro zero bias, it is necessary to calculate the system velocity and the gravity vector in the c0 coordinate system. The scale s is initialized and these optimization variables are represented by κ0:
[0086]
[0087] Substitute the definition into the IMU position and velocity pre-integration term converted from the world coordinate system w to the c0 coordinate system and the position pre-integration term of DVL We get a new expression and express it in matrix:
[0088]
[0089] To simplify the above formula, write it as:
[0090]
[0091] Will Transformed into a positive definite matrix, we have:
[0092]
[0093] The least squares solution obtained by Cholesky decomposition of the above equation is the estimated optimization variable κ0.
[0094] Solving for the 3D Gravity Vector When , since the magnitude of gravity is known, There are only two degrees of freedom. Performing a secondary optimization on the gravity vector, we get the parameterized expression of gravity:
[0095]
[0096] In the formula, are two unit tangent vectors in the gravity tangent plane, w1 and w2 are the variables to be estimated in the optimized gravity vector expression.
[0097] Substitute the above formula into the definition in matrix form to estimate w, ignoring the DVL position pre-integration term The impacts include:
[0098]
[0099] According to the above formula, the gravity vector can be re-solved Repeat the above steps. Convergence completes the secondary optimization of the gravity vector. By transforming the gravity vector from the c0 coordinate system to the z-axis of the world coordinate system, the rotation matrix from the camera coordinate system to the world coordinate system can be determined. At this point, all initialization steps are completed, and all optimization variables are converted to the world coordinate system and passed to the tightly coupled nonlinear optimization.
[0100] 3. Nonlinear Optimization
[0101] The sliding window contains the camera state, IMU zero bias, inverse depth of feature points, camera-IMU external parameters, and IMU-DVL external parameters, so these state variables are expressed as:
[0102]
[0103]
[0104]
[0105]
[0106] In the formula, the number of images is n+1, the number of feature points is m+1, and the external parameters include the camera-IMU external parameters and IMU-DVL external reference x k is the IMU state corresponding to the k-th frame image acquired by the camera, including the position speed attitude And the accelerometer bias b of the IMU in this system a and gyro bias b g .
[0107] Under the condition of known state variables, the cost function of nonlinear optimization of the algorithm can be constructed as:
[0108]
[0109] Among them, the cost function contains three residual terms. The first term corresponds to the residual term of marginalized prior information; the second term corresponds to the measurement residual term of IMU and DVL. is the noise covariance corresponding to the IMU / DVL pre-integration term, BD is the set of all IMU and DVL measurements; the third term corresponds to the visual reprojection residual term, is the noise covariance corresponding to the visual observation, and C is the set of all frame images in the sliding window. The minimum value of the cost function is solved, that is, the sum of the Mahalanobis distances of the three residual terms is minimized.
[0110] 1) Measurement residuals of IMU and DVL
[0111] Assume there are two consecutive frames b k and b k+1 frame, then the residual corresponding to the measurement values of IMU and DVL can be expressed as follows:
[0112]
[0113] In the formula, They refer to the position, velocity, and rotation pre-integration residuals corresponding to the IMU in this system, the position pre-integration residuals corresponding to the DVL in this system, the IMU accelerometer and gyroscope zero bias residuals, and the DVL velocity zero bias residuals. Here, the IMU rotation pre-integration residuals are still expressed in quaternions. [g] xyz Indicates that only the imaginary part of the quaternion is retained. Represents the value of each pre-integration term between two adjacent frames.
[0114] The measurement residuals of IMU and DVL come from the pose, velocity and zero bias of two consecutive frames. There are 7 variables corresponding to each frame, and the two frames contain a total of 14 variables, which can be expressed as;
[0115]
[0116] 2) Visual Reprojection Residual
[0117] Assuming that there is an lth feature point, which is initially observed in the i-th frame and converted to pixel coordinates in the j-th frame, the visual reprojection residual is defined as follows:
[0118]
[0119] In the formula, is the coordinate of the lth feature point in the normalized plane coordinate system in the jth frame, is the estimated coordinate of the lth feature point in the normalized plane coordinate system in the jth frame, which is:
[0120]
[0121]
[0122] In the formula, π C -1 It is the back-projection matrix that transforms the camera intrinsic parameters from pixel coordinates to the unit sphere corresponding to the normalized camera coordinate system. is the coordinate of the lth feature point in the i-th frame when it was initially observed.
[0123] The visual reprojection residual term comes from the pose of the IMU of the two frames of camera i and j, the external parameters between the camera and IMU, and the inverse depth of the feature point l. The two frames contain a total of 7 variables, which can be expressed as;
[0124]
[0125] 3) Marginalization
[0126] The matrix form of the normal equations of the Gauss-Newton method is:
[0127]
[0128] Among them, Δx1 and Δx2 represent the old frame state quantity that needs to be marginalized and retained and the key frame state quantity to be determined in the sliding window. The above formula is eliminated using the Schur complement method, and we have:
[0129]
[0130] In the above formula, H4-H3H1 -1 H2 is the Schur term of H1 in H2, and after sorting, we get:
[0131] (H4-H3H1 -1 H2)Δx2=g2-H3H1 -1 g1
[0132] Δx1 does not appear in the above formula, but its corresponding constraint still exists here, so we only need to solve the above formula to avoid solving Δx1 while retaining the constraints.
[0133] 4. 4-DOF pose graph optimization
[0134] Assuming that the sequential edge in the above is established between the i-th frame and the j-th frame, the relative displacement and yaw angle are defined as follows:
[0135]
[0136] In the formula, is the rotation value of the key frame in the reference system at time i, is the translation value of the key frame at time i, j in the reference system, is the yaw angle of the key frame at time i, j in the reference frame.
[0137] Then the residual r between the i-th frame and the j-th frame is i,j It can be expressed as:
[0138]
[0139] In the formula, represents the estimated values of the roll angle and pitch angle of the key frame at time i. The overall cost function taking into account all sequential edges and loop edges is:
[0140]
[0141] Among them, S is a set of all sequential edges, and L is a set of all loop edges. The state variables considered when saving the posture graph are the relative displacement between the i-th frame and the j-th frame and the corresponding yaw angle, which are:
[0142]
[0143] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A navigation and positioning method for unmanned ships based on tight coupling of monocular camera / IMU / DVL, Features Here are the steps: Step 1: When the unmanned boat is operating on the shore, the monocular camera, IMU and DVL installed on the unmanned boat are started; the monocular camera is responsible for collecting monocular visual images, the IMU is responsible for obtaining information from the gyroscope and accelerometer, and the DVL is responsible for collecting speed information; Perform measurement preprocessing operations on the raw information of the three sensors, namely, feature extraction and matching for the visual part and IMU / DVL pre-integration for the inertial part, so as to better perform joint initialization; Step 2: After the preprocessing of the monocular camera, IMU and DVL raw information, perform joint initialization between sensors; align the IMU / DVL pre-integrated data with the visual information initialization results obtained through the pure visual SFM process, and perform monocular vision / inertial / DVL joint initialization to restore the initial values of the optimization variables of the first few frames, including scale, gyroscope bias, velocity, and gravity vector, and provide these initial values for subsequent nonlinear optimization; Step 3: After completing the joint initialization, enter the tightly coupled nonlinear optimization process, which uses a sliding window to save space. During the window sliding process, the IMU / DVL measurement values and visual feature observation values are tightly integrated to build a joint optimization model, perform high-precision pose estimation on a fixed number of state variables, and use a marginalization scheme to reduce the optimization calculation complexity. Next, loop detection is used to establish the feature connection between the current frame and the loop candidate frame and take it into account in the nonlinear optimization, so as to complete the correction and update of the landmark point pose with the minimum amount of calculation, realize repositioning, and obtain more accurate pose information. Step 4: After relocalization, the global pose graph is optimized using four degrees of freedom, including relative displacement and yaw angle on the x, y, and z axes. The pose information of all key frames in the database is updated using sequential edges and loop edges to eliminate the cumulative errors introduced by nonlinear optimization, loop detection, and relocalization, and obtain pose information of landmark points that is closer to the actual pose.
2. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: In step 1, for the visual part, feature points are extracted from the continuous frame images obtained by the monocular camera, and the instantaneous velocity of the pixels of two adjacent frames of images is calculated by the sparse optical flow method to track the feature points and obtain successfully matched feature point pairs.
3. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: In step 1, for the inertial part, the IMU and DVL measurement values between two adjacent frames are pre-integrated to align the inertial information with the DVL information in time and obtain data input within the same time.
4. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: In step 2, the sampling frequency of the monocular camera is 10 Hz, the sampling frequency of the IMU is 100 Hz, and the sampling frequency of the DVL is 10 Hz. After the measurement preprocessing is completed, the sampling frequency of the monocular camera is used as the standard, and the linear interpolation method is used to align the information of the three to obtain data input of the same time.
5. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: In step 2, the pure vision SFM process can obtain the relative pose between each frame image obtained by the camera according to all the visual information collected by the camera according to the PnP principle, use triangulation to restore the three-dimensional spatial position of the feature points between two frames, and define the reference coordinate system based on this.
6. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: In step 2, the visual-inertial alignment process aligns the pure visual information with the IMU / DVL pre-integration to estimate the initial values of the gyro bias, velocity, and gravity vector parameters, solving the scale problem of the monocular camera. The specific steps are: first, calibrate the gyroscope zero bias, and re-update all IMU / DVL pre-integration items according to the obtained zero bias; second, initialize the recovery speed, gravity vector and the scale of the monocular camera, and perform secondary optimization on the gravity vector; Then, the depth of the feature points is calculated, and the position, velocity, and depth of the feature points are scaled; finally, the world coordinate system is determined based on the gravity vector after secondary optimization, and all variables are converted to the world coordinate system.
7. The unmanned ship navigation and positioning method based on tight coupling of monocular camera / IMU / DVL according to claim 1, Features: The specific process in step 3 is: Step 3.1: Set state variables in a sliding window, including camera pose, IMU state corresponding to the image: position, attitude, velocity, zero bias of accelerometer and gyroscope in IMU, position and velocity zero bias of DVL, inverse depth of feature points, camera-IMU external parameters, IMU-DVL external parameters; Step 3.2: Determine whether the penultimate frame in the sliding window is a key frame, select a specific marginalization strategy, and derive the marginalization residual term based on the relevant information in the state variable; Step 3.3: Obtain the measurement residuals of IMU and DVL based on the IMU state, the zero bias of IMU accelerometer and gyroscope, the DVL position and velocity zero bias, and the external parameters of IMU-DVL in the state variables; Step 3.4: Obtain the visual reprojection residual term based on the pose of the IMU corresponding to all images in the state variable, the external parameters of the camera-IMU, and the inverse depth of all feature points in the sliding window; Step 3.5: Under the condition of known state variables, construct the cost function of tightly coupled nonlinear optimization according to the three residual terms obtained in steps 3.2 to 3.4; Step 3.6: Iteratively optimize the cost function obtained in step 3.
5. When a new frame arrives, the current frame becomes the previous frame, the sliding window moves forward, the relevant parameters are passed, and all invalid feature points in the latest sliding window are removed, and the feature point information is updated; Step 3.7: Whenever a key frame comes, it is first necessary to extract the corner points of the frame image and calculate the descriptor to establish a key frame database; when loop detection occurs, the bag-of-words model is used to measure the similarity between the current key frame and all historical key frames in the database to determine whether the carrier has passed through the same environment before. If the similarity reaches a pre-set threshold, it is considered that a loop has occurred; however, it is very likely that the two images are too similar. In order to prevent the occurrence of mismatching, certain test conditions need to be set; when the test conditions are met, that is, it is confirmed that the correct loop has occurred, the position and posture of the landmark point can be corrected and updated to complete the repositioning and obtain more accurate position and posture information.
