Underwater slam system with fused visual-inertial pressure sensor and method thereof

By integrating visual sensors, IMUs, and pressure sensors into an underwater SLAM system, and utilizing the pressure sensors to provide depth constraints, the problem of insufficient positioning and mapping accuracy in underwater SLAM is solved, enabling higher-precision underwater environment exploration.

CN117029809BActive Publication Date: 2026-11-20SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311000996.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2026-11-20
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing underwater SLAM technology lacks accuracy in positioning and mapping in underwater environments, especially in dynamically changing underwater environments where landmark detection is difficult, positioning is inaccurate when visual information is missing, and sensors are expensive or bulky.

Method used

By integrating visual sensors, inertial measurement units (IMUs), and pressure sensors, and through data fusion and optimization algorithms, the pressure sensors provide depth constraints, improving the accuracy of localization and mapping, and solving the problems of inaccurate scale estimation and initial tracking loss.

Benefits of technology

It improves the positioning and mapping accuracy of underwater SLAM, overcomes visual degradation in the underwater environment, and ensures stable positioning and map building in dynamically changing environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117029809B_ABST
    Figure CN117029809B_ABST
Patent Text Reader

Abstract

The application relates to an underwater SLAM system and method of fusing visual inertial pressure sensors, the system comprising a visual sensor, an IMU and a pressure sensor connected to a processor respectively, the method comprising: the visual sensor, the IMU and the pressure sensor correspondingly collecting underwater images, acceleration and angular velocity information and pressure data; extracting visual feature points from the underwater images; performing pose estimation according to the acceleration and angular velocity information; performing soft synchronization on the data of the IMU and the pressure sensor with the image collection time as a reference; determining a visual inertial pressure SLAM optimization model through residual construction; performing data fusion initialization; performing scale adjustment; solving the visual inertial pressure SLAM optimization model, calculating visual error terms, IMU error terms and depth error terms, and optimizing the current frame state to output positioning and map construction results. Compared with the prior art, the application can effectively improve the accuracy of underwater positioning and mapping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of real-time localization and mapping technology for underwater robots, and in particular to an underwater SLAM system and method that integrates visual, inertial, and pressure sensors. Background Technology

[0002] With the increasing demand for marine resource development, the requirements for underwater exploration are becoming increasingly prominent. Tasks such as seabed oil exploration, underwater archaeology, and underwater search and rescue all require exploration of the underwater environment, which is difficult to accomplish by manpower alone. Underwater robots, due to their flexibility, have naturally become tools for underwater exploration. Although many positioning solutions exist for underwater robots, most rely on very precise sensors, such as Doppler VelocityLog (DVL) and fiber-optic gyroscopes. These sensors are very expensive and may be too bulky for small ROVs (Remotely Operated Vehicles). In addition, acoustic positioning systems are also commonly used for underwater positioning, but they require complex array deployment.

[0003] In recent years, research has applied Simultaneous Localization and Mapping (SLAM) algorithms to underwater robots. SLAM enables robots to observe their environment or their own motion and position using their sensors, achieving real-time localization and simultaneously building an environmental map, even without a prior map. However, current open-source monocular SLAM algorithms, such as ORB-SLAM3, VINS-Mono, and DSO, are primarily based on terrestrial environments. Due to the highly complex and dynamically changing underwater environment, directly porting existing algorithms to underwater environments presents certain challenges.

[0004] Furthermore, landmark detection is crucial for robot localization in monocular SLAM, as SLAM relies on repeatedly observing the same landmarks for localization. However, underwater environments are unfavorable for landmark detection. This is because underwater scenes are dynamic, with constantly moving objects like fish, seaweed and soft corals changing shape with currents, and constantly shifting underwater light. These factors not only cause landmark positions to change but also make it difficult to match the same landmark observed at different times, increasing the uncertainty of the SLAM system. Secondly, the water may be turbid, blurring the images captured by the camera, which affects the extraction of visual SLAM feature points and hinders landmark detection. Finally, underwater environments may contain low-texture scenes, such as sandy seabeds, making it difficult to extract features that can serve as landmarks from images in such monotonous environments.

[0005] Although improvements to visual SLAM algorithms can overcome visual degradation in underwater environments, pure visual SLAM still has certain limitations when visual information is missing, such as turbid water obscuring the camera's field of view. It can be said that existing underwater SLAM technologies cannot reliably guarantee the accuracy of localization and mapping. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art by providing an underwater SLAM system and method that integrates visual inertial pressure sensors, which can effectively improve the accuracy of underwater positioning and mapping.

[0007] The objective of this invention can be achieved through the following technical solution: an underwater SLAM system integrating visual, inertial, and pressure sensors, comprising a visual sensor, an IMU (Inertial Measurement Unit), and a pressure sensor, wherein the visual sensor, IMU, and pressure sensor are respectively connected to a processor, and the visual sensor is used to acquire underwater images;

[0008] The IMU is used to collect acceleration and angular velocity information;

[0009] The pressure sensor is used to collect pressure data;

[0010] The processor is used to extract visual feature points from underwater images, estimate pose from acceleration and angular velocity information, and combine pressure data to perform residual construction, data fusion initialization, scale adjustment, tracking, and map construction in sequence.

[0011] Furthermore, the IMU includes an accelerometer and a gyroscope for measuring triaxial acceleration and angular velocity.

[0012] An underwater SLAM method integrating visual-inertial pressure sensors includes the following steps:

[0013] S1, the vision sensor, the IMU, and the pressure sensor are respectively used to collect underwater images, acceleration and angular velocity information, and pressure data;

[0014] S2. Extract visual feature points from underwater images;

[0015] Pose estimation is performed based on acceleration and angular velocity information;

[0016] The data from the IMU and pressure sensor are softly synchronized using the image acquisition time as a reference.

[0017] S3. Determine the visual inertial pressure SLAM optimization model through residual construction;

[0018] S4. Perform data fusion initialization;

[0019] S5. Make scale adjustments;

[0020] S6. Solve the visual-inertial pressure SLAM optimization model, calculate the visual error term, IMU error term and depth error term to optimize the current frame state, and output the localization and map construction results.

[0021] Furthermore, the specific process of soft synchronization of IMU data in step S2 is as follows: the frequency of the IMU is higher than that of the visual sensor, and the IMU measurements between the current frame and the previous frame are all corresponding to the current frame, so that each frame of image has a corresponding IMU measurement value during data fusion.

[0022] Furthermore, the specific process of soft synchronization of the pressure sensor data in step S2 is as follows:

[0023] If the pressure sensor's frequency is higher than the vision sensor's, each frame will correspond to multiple depth measurements. The average of these measurements will be taken as the depth of the current frame. At this point, the variance of the depth measurement becomes

[0024] If the frequency of the pressure sensor is lower than that of the vision sensor, some images will lack corresponding pressure measurements. In this case, the underwater robot is approximately considered to be low-dynamic, meaning the depth change is not significant. Therefore, interpolation is used to estimate the depth of this frame, i.e.:

[0025]

[0026] Where, d t t represents the image frame depth, and t represents the corresponding image acquisition time.

[0027] Furthermore, step S3 specifically involves estimating the pose, velocity in the world coordinate system, and acceleration deviation of the gyroscope, then using the IMU to estimate the direction of gravity, and incorporating the information from the pressure sensor into the optimization constraints. By combining visual residuals, inertial residuals, and depth residuals, visual-inertial-pressure SLAM is treated as an optimization problem.

[0028] Furthermore, step S3 specifically includes the following steps:

[0029] S31, Combined with estimated pose T i =[R i ,p i Velocity v in the world coordinate system i Gyroscope deviation and accelerometer deviation The resulting state vector is

[0030] S32. Define the optimization problem as follows:

[0031]

[0032] Among them, E visual E imu E depth These are visual residual, inertial residual, and depth residual, respectively.

[0033] S33. Use the IMU to estimate the direction of gravity, align the z-axis of the world coordinate system with the direction of gravity, and thus incorporate the information from the pressure sensor into the optimization constraints.

[0034] Assuming the z-axis of the world coordinate system is collinear with the depth axis, the depth residual is:

[0035]

[0036] S34. For the IMU, the rotation, velocity, and pose of the IMU pre-integral components between frame i and frame i+1 are expressed as ΔR. i,i+1 Δv i,i+1、 Δp i,i+1 Based on the pre-integral quantity and the state vector S i and S i+1 Constructing inertial residuals:

[0037]

[0038]

[0039]

[0040]

[0041] S35. Combining visual residuals, inertial residuals, and depth residuals, visual-inertial pressure SLAM is treated as an optimization problem, given k+1 keyframes and state vectors. and l 3D points The visual inertial pressure optimization problem can then be expressed as:

[0042]

[0043] in, ρ represents the set of keyframes from which point j can be observed. Hub This represents the Huber kernel function.

[0044] Furthermore, step S4 specifically includes the following steps:

[0045] S41. In the case of visual estimation only, run visual SLAM for a set time, insert keyframes at a set speed, build a map, and use visual residuals to constrain the pose and map points to obtain an initial estimate of the pose. The overline indicates the scaling variable;

[0046] S42. Inertial pressure estimation: Using the initial pose estimate obtained in the previous optimization step as the prior for inertial pressure estimation, the pose is fixed. Optimize the state vector: Where s represents the scale factor, R wg Indicates the direction of gravity, b = (b a ,b g )∈R 6 This indicates the deviation between the gyroscope and the accelerometer. Indicates speed;

[0047] The inertial pressure optimization problem can be expressed as:

[0048]

[0049] After inertia optimization is completed, the map is scaled according to the estimated scale, and the world coordinate system of the map is rotated to align the z-axis with the estimated gravity direction.

[0050] S43. Visual-inertial-pressure joint optimization: After estimating the inertial and visual parameters in the above steps, joint visual-inertial-pressure optimization is then performed to further optimize the state vector. The pose and map points are no longer fixed. After determining the optimization variables and the corresponding optimization errors, the corresponding nodes and edges are added to g2o (General Graphic Optimization) to solve for the variables to be optimized.

[0051] Furthermore, step S5 specifically includes the following steps:

[0052] S51. Scale adjustment is based on all inserted keyframes, adjusting only the scale and gravity direction. The optimization problem for scale adjustment is:

[0053]

[0054] S52. During scale adjustment optimization, the incremental update of the gravity direction uses the parameter (δα). g ,δβ g ) is represented as:

[0055]

[0056] Where Exp represents the transformation from the rotation vector to the rotation matrix, and to ensure the scale is positive, the update of the scale s is expressed as: snew =s old exp(δs);

[0057] S53. For local mapping threads, run scale fine-tuning at set time intervals until the number of key frames in the map exceeds the preset frame threshold, or the initialization has been completed and exceeded the preset initialization time threshold.

[0058] Furthermore, in step S6, different optimization strategies are applied based on whether the map is updated, i.e., whether a new keyframe is generated or a loop closure is detected:

[0059] If there is a map update, only the state vector of the current frame is optimized;

[0060] If the map is not updated, optimize the state vectors of the two adjacent frames, and the corresponding state variables to be optimized become {S}. i ,S i+1 The error becomes:

[0061] E visual (S i )+E visual (S i+1 )+E imu (S i ,S i+1 )+E depth (S i )+E depth (S i+1 )+E prior (S i )

[0062] For the local mapping thread, the local window retains N keyframes and all points of these keyframes, optimizes them, and at the same time, all other keyframes that can observe these points also participate in error calculation and constrain the position of map points.

[0063] Compared with the prior art, the present invention has the following advantages:

[0064] I. This invention combines local sensors (including visual sensors and IMUs) with global sensors (using pressure sensors), and utilizes a processor to extract visual feature points from underwater images, estimate pose from acceleration and angular velocity information, and combine pressure data to sequentially perform residual construction, data fusion initialization, scale adjustment, tracking, and map construction. This allows for the acquisition of more environmental observation data using multiple sensors. By fusing visual, inertial, and pressure sensor data, visual degradation in the underwater environment can be overcome, effectively improving the localization and mapping accuracy of underwater SLAM.

[0065] Second, this invention incorporates pressure sensor information into optimization constraints and combines visual residuals, inertial residuals, and depth residuals to treat visual-inertial pressure SLAM as an optimization problem. In the optimization, new constraints are introduced for the scale factor and the z-axis (gravity direction) position. That is, the pressure data collected by the pressure sensor is used to measure the robot's depth underwater. The addition of underwater-specific depth constraint information can solve the problems of inaccurate scale estimation and easy loss of tracking after initialization in the existing ORB-SLAM3-VI system. By introducing depth constraints, a better estimate of scale information and position can be obtained, ensuring improved localization and mapping accuracy of underwater SLAM. Attached Figure Description

[0066] Figure 1 This is a schematic diagram of the system structure of the present invention;

[0067] Figure 2 This is a schematic diagram of the method flow of the present invention;

[0068] Figure 3 This is a schematic diagram of the application architecture in the embodiment;

[0069] Figure 4 This is a schematic diagram of the application process in the embodiment;

[0070] Figure 5 This is a schematic diagram of the initialization and scaling process in the embodiment;

[0071] The markings in the diagram are as follows: 1. Vision sensor, 2. IMU, 3. Pressure sensor, 4. Processor. Detailed Implementation

[0072] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0073] Example

[0074] An underwater SLAM system integrating visual, inertial and pressure sensors includes a visual sensor 1, an IMU 2 and a pressure sensor 3. The visual sensor 1, IMU 2 and pressure sensor 3 are respectively connected to a processor 4. The visual sensor 1 is used to acquire underwater images.

[0075] The IMU2 is used to collect acceleration and angular velocity information. The IMU2 includes an accelerometer and a gyroscope, which are used to measure triaxial acceleration and angular velocity.

[0076] Pressure sensor 3 is used to collect pressure data;

[0077] Processor 4 is used to extract visual feature points from underwater images, estimate pose from acceleration and angular velocity information, and combine pressure data to perform residual construction, data fusion initialization, scale adjustment, tracking, and map construction in sequence.

[0078] Based on the above system, an underwater SLAM method integrating visual and inertial pressure sensors is implemented, such as... Figure 2 As shown, it includes the following steps:

[0079] S1, the vision sensor, the IMU, and the pressure sensor are respectively used to collect underwater images, acceleration and angular velocity information, and pressure data;

[0080] S2. Extract visual feature points from underwater images;

[0081] Pose estimation is performed based on acceleration and angular velocity information;

[0082] The data from the IMU and pressure sensor are softly synchronized using the image acquisition time as a reference.

[0083] S3. Determine the visual inertial pressure SLAM optimization model through residual construction;

[0084] S4. Perform data fusion initialization;

[0085] S5. Make scale adjustments;

[0086] S6. Solve the visual-inertial pressure SLAM optimization model, calculate the visual error term, IMU error term and depth error term to optimize the current frame state, and output the localization and map construction results.

[0087] This embodiment applies the above technical solution to build such a system. Figure 3 The system framework shown consists of five modules. In visual SLAM, sensor information, i.e., camera images, is preprocessed by this module before being fed into the front end. The SLAM front end, also known as visual odometry (VO), is responsible for predicting inter-frame motion between adjacent frames. The SLAM back end obtains an initial estimate of the camera pose from the front end and, relying on the revisits detected by the loop closure detection module, optimizes the global camera pose using filtering or nonlinear optimization algorithms. Loop closure detection compares the similarity between the current frame and previous keyframes to detect whether the camera has visited a previously visited location. After detecting a loop, the back end performs loop closure fusion. The mapping module stores map information. In the feature point method, the map is a sparse map, i.e., a three-dimensional feature point cloud.

[0088] An IMU contains an accelerometer and a gyroscope, which can measure triaxial acceleration and angular velocity. The accelerometer measures acceleration by measuring the magnitude of inertial forces, while the vibrating gyroscope measures angular velocity by measuring Coriolis forces.

[0089] Based on image acquisition time, soft synchronization is performed on multi-sensor data. The IMU frequency is generally higher than the camera frequency. IMU measurements between the current and previous frames are mapped to the current frame, ensuring that each frame has a corresponding IMU measurement value during fusion. However, the pressure sensor frequency may be higher or lower than the camera frequency; therefore, these two cases need to be discussed separately.

[0090] When the pressure sensor's frequency is higher than the camera's, each frame will correspond to multiple depth measurements, and the average of these measurements will be taken as the depth of the current frame. At this point, the variance of the depth measurement becomes

[0091] When the pressure sensor frequency is lower, such as in the AQUALOC dataset where the camera frequency is 20Hz and the pressure sensor measurement frequency is 5Hz, some images may lack corresponding pressure measurements. In such cases, the underwater robot is approximated as low-dynamic, meaning the depth change is not significant. Interpolation can be used to estimate the depth of this frame, i.e.:

[0092]

[0093] Next, the visual inertial pressure sensor data will be processed according to... Figure 4 The following steps will be performed:

[0094] Step A: Residual Construction. Estimate the pose, velocity in the world coordinate system, and acceleration deviation from the gyroscope. Then, use the IMU to estimate the direction of gravity, incorporate pressure sensor information into the optimization constraints, and combine visual residuals, inertial residuals, and depth residuals to treat visual-inertial-pressure SLAM as an optimization problem.

[0095] Step B: Data Fusion Initialization. To obtain good initial values ​​for velocity, gravity direction, scale, and IMU bias, the data is first initialized.

[0096] Step C: Scale Adjustment. When the robot's motion is insufficient, the initialization cannot converge to an accurate solution, requiring additional scale adjustment.

[0097] Step D: Tracking and Mapping. The visual-inertial pressure sensor tracks state variables such as attitude, velocity, and IMU bias at the frame rate. Visual error terms, IMU error terms, and depth error terms are calculated to optimize the current frame state.

[0098] Specifically, step A includes:

[0099] Step A1: Estimate pose T i =[R i ,p i and velocity v in the world coordinate system i And gyroscope and accelerometer bias The state vector is

[0100] Step A2: Define the optimization problem as:

[0101] Step A3: With only a visual sensor, since the direction of gravity is unknown, the direction of the z-axis in the world coordinate system depends on the first reference frame, making it impossible to guarantee that the z-axis is parallel to the direction of gravity, and thus depth information cannot be directly fused. An IMU is used to estimate the direction of gravity, aligning the z-axis of the world coordinate system with the direction of gravity, thereby incorporating information from the pressure sensor into the optimization constraints. Assuming the z-axis of the world coordinate system is collinear with the depth axis, the depth residual is:

[0102] Step A4: For the IMU, express the IMU pre-integral rotation, velocity, and pose between frame i and frame i+1 as ΔR. i,i+1 Δv i,i+1、 Δp i,i+1 Based on the pre-integral quantity and the state vector S i and S i+1 Constructing inertial residuals:

[0103]

[0104]

[0105]

[0106]

[0107] Step A5: Combining visual residuals, inertial residuals, and depth residuals, visual-inertial stress SLAM is treated as an optimization problem, given k+1 keyframes and state vectors. and l 3D points The visual inertial pressure optimization problem is represented as:

[0108]

[0109] in, ρ represents the set of keyframes from which point j can be observed. Hub This represents the Huber kernel function.

[0110] Step B includes:

[0111] Step B1: Visual estimation only. Run visual SLAM for two seconds, inserting keyframes at a rate of 4Hz to build a map. Use visual residuals to constrain the pose and map points to obtain an initial estimate of the pose. The overline indicates the scaling variable.

[0112] Step B2: Inertial Pressure Estimation. Using the initial pose estimate obtained in the previous step as the prior for inertial pressure estimation, the pose is fixed. Optimize the state vector: Where s represents the scale factor, R wg Indicates the direction of gravity, b = (b a ,b g )∈R 6 This indicates the deviation between the gyroscope and the accelerometer. Indicates speed.

[0113] The inertial pressure optimization problem can be expressed as:

[0114]

[0115] After inertia optimization is completed, the map is scaled according to the estimated scale, and the world coordinate system of the map is rotated to align the z-axis with the estimated gravity direction.

[0116] Step B3: Joint Optimization of Visual-Inertial Stress. After estimating the inertial and visual parameters in the previous steps, joint visual-inertial stress optimization is performed to further optimize the state vector, without fixing the pose and map points. Once the optimization variables and corresponding optimization errors are determined, the corresponding nodes and edges are added to g2o to solve for the variables to be optimized.

[0117] Step C includes:

[0118] Step C1: Scale adjustment is based on all inserted keyframes, adjusting only the scale and gravity direction. The optimization problem for scale adjustment can be expressed as:

[0119]

[0120] Step C2: During optimization, incremental updates of the parameters (δα) in the gravity direction. g ,δβ g ) is represented as: Where Exp represents the transformation from the rotation vector to the rotation matrix, and to ensure the scale is positive, the update of the scale s is expressed as: s nww =s old exp(δs).

[0121] Step C3: In the local mapping thread, perform scale fine-tuning every 10 seconds until the number of keyframes in the map exceeds 200 or initialization has been completed for more than 75 seconds.

[0122] The above initialization and scale fine-tuning process is as follows: Figure 5As shown.

[0123] Step D includes:

[0124] Step D1: Depending on whether the map is updated, i.e. whether new keyframes are generated or loop closures are detected, different optimization strategies are used.

[0125] Step D2: If there is a map update, optimize only the state vector of the current frame; if the map is not updated, optimize the state vectors of the two adjacent frames, and the corresponding state variable to be optimized becomes {S}. i ,S i+1 The error becomes:

[0126] E visual (S i )+E visual (S i+1 )+E imu (S i ,S i+1 )+E depth (S i )+E depth (S i+1 )+E prior (S i )

[0127] Step D3: For the local mapping thread, the local window retains N keyframes and all points of these keyframes, optimizes them, and at the same time, all other keyframes that can observe these points also participate in error calculation and constrain the map point positions.

[0128] In summary, this technical solution considers that both IMU and visual sensors are local sensors, providing only local observations, and estimations based on local sensors inevitably suffer from cumulative drift. Global sensors (such as pressure gauges) can provide global observations, and their output data does not exhibit cumulative drift, but they cannot be directly used for SLAM due to noise and low observation frequency. Therefore, this design combines these two types of sensors, improving positioning accuracy and mitigating issues such as inaccurate scale estimation and easy tracking loss after initialization inherent in the ORB-SLAM3-VI system. This solution also introduces new constraints on the scale factor and z-axis position during optimization (i.e., using a pressure sensor to measure the robot's underwater depth). Testing on seven underwater multi-sensor sequence data segments in the AQUALOC dataset shows that, compared to ORB-SLAM3-VI, this solution, by introducing depth constraints, provides a better estimate of scale information and position, effectively improving the localization and mapping accuracy of underwater SLAM.

Claims

1. An underwater SLAM method integrating visual-inertial pressure sensors, applied to an underwater SLAM system integrating visual-inertial pressure sensors, characterized in that, The underwater SLAM system includes a visual sensor (1), an IMU (2), and a pressure sensor (3), which are respectively connected to a processor. The visual sensor (1) is used to acquire underwater images. The IMU (2) is used to collect acceleration and angular velocity information; The pressure sensor (3) is used to collect pressure data; The processor is used to extract visual feature points from underwater images, estimate pose from acceleration and angular velocity information, and combine pressure data to perform residual construction, data fusion initialization, scale adjustment, tracking, and map construction in sequence. The above-mentioned underwater SLAM method includes the following steps: S1, the vision sensor, the IMU, and the pressure sensor are respectively used to collect underwater images, acceleration and angular velocity information, and pressure data; S2. Extract visual feature points from underwater images; Pose estimation is performed based on acceleration and angular velocity information; The data from the IMU and pressure sensor are softly synchronized using the image acquisition time as a reference. The specific process of soft synchronization of pressure sensor data is as follows: If the pressure sensor's frequency is higher than the vision sensor's, each frame will correspond to multiple depth measurements. The average of these measurements will be taken as the depth of the current frame. At this point, the variance of the depth measurement becomes ; If the frequency of the pressure sensor is lower than that of the vision sensor, some images will lack corresponding pressure measurements. In this case, the underwater robot is approximately considered to be low-dynamic, meaning the depth change is not significant. Therefore, interpolation is used to estimate the depth of this frame, i.e.: in, For image frame depth, t This corresponds to the image acquisition time; S3. Determine the visual inertial pressure SLAM optimization model through residual construction; S4. Perform data fusion initialization; S5. Make scale adjustments; S6. Solve the visual-inertial pressure SLAM optimization model, calculate the visual error term, IMU error term and depth error term to optimize the current frame state, and output the localization and map construction results.

2. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 1, characterized in that, The IMU (2) includes an accelerometer and a gyroscope, which are used to measure triaxial acceleration and angular velocity respectively.

3. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 1, characterized in that, The specific process of soft synchronization of IMU data in step S2 is as follows: the frequency of the IMU is higher than that of the visual sensor, and the IMU measurements between the current frame and the previous frame are all corresponding to the current frame, so that each frame of image has a corresponding IMU measurement value during data fusion.

4. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 3, characterized in that, Specifically, step S3 is based on the estimated pose, velocity in the world coordinate system, gyroscope bias and accelerometer bias, and then uses the IMU to estimate the direction of gravity, and adds the information from the pressure sensor to the optimization constraints. By combining visual residuals, inertial residuals and depth residuals, visual-inertial-pressure SLAM is regarded as an optimization problem.

5. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 4, characterized in that, Step S3 specifically includes the following steps: S31, Combine with estimated pose Velocity in the world coordinate system Gyroscope deviation and accelerometer deviation The resulting state vector is ; S32. Define the optimization problem as follows: in, , , These are visual residual, inertial residual, and depth residual, respectively. S33. Use the IMU to estimate the direction of gravity, align the z-axis of the world coordinate system with the direction of gravity, and thus incorporate the information from the pressure sensor into the optimization constraints. Assuming the z-axis of the world coordinate system is collinear with the depth axis, the depth residual is: S34. For the IMU, the rotation, velocity, and pose of the IMU pre-integral quantities between frame i and frame i+1 are respectively expressed as: Based on the pre-integral quantity and the state vector and Constructing inertial residuals: S35. Combining visual residuals, inertial residuals, and depth residuals, visual-inertial pressure SLAM is treated as an optimization problem, given k+1 keyframes and state vectors. and 3D point The visual inertial pressure optimization problem can then be expressed as: in, This represents the set of keyframes from which point j can be observed. This represents the Huber kernel function.

6. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 5, characterized in that, Step S4 specifically includes the following steps: S41. In the case of visual estimation only, run visual SLAM for a set time, insert keyframes at a set speed, build a map, and use visual residuals to constrain the pose and map points to obtain an initial estimate of the pose. , where the overline indicates the scaling variable; S42. Inertial pressure estimation: Using the initial pose estimate obtained in the previous optimization step as the prior for inertial pressure estimation, the pose is fixed. Optimize the state vector: Where s represents the scale factor, Indicates the direction of gravity. This indicates the deviation between the gyroscope and the accelerometer. Indicates speed; The inertial pressure optimization problem can be expressed as: After inertia optimization is completed, the map is scaled according to the estimated scale, and the world coordinate system of the map is rotated to align the z-axis with the estimated gravity direction. S43. Visual-inertial-pressure joint optimization: After estimating the inertial and visual parameters in the above steps, the visual-inertial-pressure joint optimization is then performed to further optimize the state vector. The pose and map points are no longer fixed. After determining the optimization variables and the corresponding optimization errors, the corresponding nodes and edges are added to g2o to solve for the variables to be optimized.

7. The underwater SLAM method integrating visual-inertial pressure sensors according to claim 6, characterized in that, Step S5 specifically includes the following steps: S51. Scale adjustment is based on all inserted keyframes, adjusting only the scale and gravity direction. The optimization problem for scale adjustment is: S52. During the scale adjustment optimization, the parameters for incremental updates in the gravity direction are... Represented as: Where Exp represents the transformation from the rotation vector to the rotation matrix, and to ensure the scale is positive, the update of the scale s is expressed as: ; S53. For local mapping threads, run scale fine-tuning at set time intervals until the number of key frames in the map exceeds the preset frame threshold, or the initialization has been completed and exceeded the preset initialization time threshold.

8. The underwater SLAM method fusion of visual-inertial pressure sensors according to claim 7, characterized in that, In step S6, different optimization strategies are applied based on whether the map is updated, i.e., whether a new keyframe is generated or a loop closure is detected. If there is a map update, only the state vector of the current frame is optimized; If the map is not updated, optimize the state vectors of two adjacent frames; the corresponding state variables to be optimized become... The error becomes: For the local mapping thread, the local window retains N keyframes and all points of these keyframes, optimizes them, and at the same time, all other keyframes that can observe these points also participate in error calculation and constrain the position of map points.