Map construction method and system based on GPS, IMU and binocular vision

By combining GPS, IMU and binocular vision technology, autonomous vehicles can achieve autonomous positioning and map construction in environments without GPS signals, solving the problems of low positioning accuracy and insufficient multi-sensor data fusion in traditional driverless technology. Provides a stable autonomous navigation solution.

CN109991636BActive Publication Date: 2024-09-13QIMING INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910225839.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-25
Publication Date
2024-09-13
Estimated Expiration
2039-03-25

AI Technical Summary

Technical Problem

It is difficult for existing autonomous vehicles to perform effective positioning and map construction in unknown areas or harsh environments, especially when the GPS signal is weak or no signal, and the data fusion capabilities of multiple sensors are insufficient, resulting in low positioning accuracy and unachievable Stable autonomous navigation.

Method used

Using a map construction method based on GPS, IMU and binocular vision, through the correction and fusion of IMU and binocular vision data, ORB feature tracking, flow IMU pre-integration, visual inertia joint initialization, tight coupling optimization model and bag of words model Carry out closed-loop detection and build a stable autonomous positioning and map construction system.

Benefits of technology

It improves the positioning accuracy and map construction robustness of driverless vehicles in environments without GPS signals, achieves effective fusion of multi-sensor data, and provides stable autonomous navigation capabilities. It is suitable for large-scale autonomous vehicles and robot systems. Scale application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109991636B
    Figure CN109991636B
Patent Text Reader

Abstract

The present invention discloses a map construction method and system based on GPS, IMU and binocular vision, which uses IMU and binocular vision to calibrate and use visual navigation in places such as tunnels where there is no GPS signal or the signal is weak. It can solve the problems in visual SLAM and improve the robustness of the SLAM system. The method of fusing visual information and IMU information is adopted to fuse multiple sensor data, provide a new algorithm structure, build a stable and effective framework, perform stable and effective autonomous positioning and map construction on unmanned vehicles or robots, realize the correction and supplement of GPS positioning information, and apply it to unmanned vehicles and robot systems for large-scale application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention discloses a map construction method and system based on GPS, IMU and binocular vision, relates to an autonomous positioning and map construction system based on visual features and IMU information, and belongs to the field of robot and control technology. Background technology:

[0002] In recent years, the rapid development of Internet technology has brought revolutionary changes to the automobile manufacturing industry. At the same time, automobile intelligent technology is gradually being widely used. This technology simplifies the driving operation of the car and improves driving safety. The most typical and popular future application is the driverless car. With the support of artificial intelligence technology, the rapid development of driverless cars is changing the way people travel, which will in turn change the relevant industry landscape on a large scale.

[0003] For driverless cars driving in unknown areas, due to reasons such as buildings and trees, the cars are often in a state of no signal or weak signal, and cannot provide effective positioning; in places with harsh environments, due to weather and other reasons, the GPS or Beidou navigation system signals are weak, and the driverless car cannot be effectively positioned. For this reason, driverless cars must have the ability to autonomously locate and build maps. Through real-time autonomous positioning and map building, the surrounding environment information is obtained, the location of the driverless car is determined, and an important basis for path planning is provided.

[0004] Simultaneous localization an mapping (SLAM) technology is an important issue in the field of robotics. The SLAM problem can be described as: a robot equipped with sensors moves freely in space, uses the collected sensor information to locate its own position, and incrementally builds a map based on its own positioning to achieve simultaneous positioning and mapping of the robot. The two important factors that affect the solution of the SLAM problem are the data characteristics of the sensor and the correlation of the observed data. If the sensor data can be used efficiently and the accuracy and robustness of the data association can be improved, it will be able to affect the positioning of the robot and the construction of the map.

[0005] However, most of today's driverless technologies are still in the assisted driving stage, lacking the ability to autonomously locate and build maps. At the same time, relatively few driverless cars use a single sensor for autonomous positioning and map building, with low positioning and map building accuracy, and cannot effectively fuse multiple sensors, or can fuse multiple sensor data but cannot perform stable and effective autonomous positioning and map building for driverless cars, and cannot be widely popularized. Summary of the invention:

[0006] The present invention provides a map construction method and system based on GPS, IMU and binocular vision, which uses IMU and binocular vision to calibrate and use visual navigation in places with no GPS signal or weak signal such as tunnels. It can solve the problems in visual SLAM and improve the robustness of the SLAM system.

[0007] The present invention discloses a method and system for building a map based on GPS, IMU and binocular vision, and the technical solution adopted is:

[0008] The map construction method based on GPS, IMU and binocular vision described in the present invention is characterized by comprising the following steps:

[0009] Step 1: Initialize the position and posture of the unmanned vehicle or robot, determine the trajectory of the unmanned vehicle or robot, and calibrate the IMU inertial measurement unit, binocular camera and other data to maintain time consistency;

[0010] Step 2: Collect and extract information from the IMU inertial measurement unit, binocular camera, and GNSS receiver based on RTK solution to perform visual feature tracking;

[0011] Step 3: IMU pre-integration based on flow type, including: IMU pre-integration calculation, calculation of pre-integration Jacobian and covariance matrix, and calculation of residual Jacobian;

[0012] Step 4: IMU initialization (visual-inertial joint initialization), which is the first step in the fusion of visual and inertial data. It is a loosely coupled process that combines visual data with fast IMU data, including: gyroscope bias calibration (zero bias), scale recovery and gravity acceleration estimation, accelerometer bias calibration and scale gravity acceleration optimization;

[0013] Step 5: Use the tightly coupled optimization model for optimization, including: tightly coupled optimization of visual-inertial adjacent frames and tightly coupled optimization of visual-inertial local maps;

[0014] Step 6: Estimate the similarity between the trajectory of the unmanned vehicle or robot and the three-dimensional map of the surrounding environment to obtain the real-time pose;

[0015] Step 7: Build a map and use the bag-of-words model to perform closed-loop detection, correct the existing map, and further improve the accuracy of the three-dimensional map.

[0016] 1. In step 2) information collection and extraction:

[0017] After each binocular camera captures an image, the image is subjected to ORB feature extraction, and after the ORB feature is extracted, the extracted result is stored;

[0018] The IMU data inside the driverless car or robot is collected in real time and sent to the manifold-based IMU pre-integration for processing.

[0019] 2. In step 3) IMU pre-integration based on flow pattern:

[0020] In the IMU pre-integration calculation, the world coordinate system, IMU coordinate system and camera coordinate system are usually represented by W, B, and C. The IMU acceleration a is measured by sampling at a certain time interval Δt. B and angular velocity ω B . IMU measurement model:

[0021]

[0022]

[0023] in, Represents the angular velocity and acceleration of the IMU measurement model in coordinate system B, B ω WB (t)∈R 3 Represents the instantaneous angular velocity of the IMU center B relative to the world coordinate system W in coordinate system B, R WB Represents the rotation matrix of the IMU center B relative to the world coordinate system W, For R WB The transpose of W a(t)∈R 3 represents the instantaneous acceleration of the IMU in the W coordinate, W g represents the gravity vector in the W coordinate system, b represents the zero bias, η represents Gaussian random noise, and b a , b g They represent acceleration and gravity vector zero bias, η a , η g represent the acceleration and gravity vector Gaussian random noise respectively;

[0024] The derivatives of rotation R, translation p, and velocity v can be expressed as:

[0025]

[0026] in, W v represents the instantaneous velocity of the IMU in the W coordinate system, represents the instantaneous angular velocity of B relative to W, R WB Represents the rotation matrix of the IMU center B relative to the world coordinate system W, W p represents the instantaneous translation in the W coordinate system, is its derivative;

[0027] The rotation R, translation p and velocity v in the world coordinate system can be obtained by the general integral formula. The continuous time integral can be rewritten and combined using Euler integral in discrete time to obtain:

[0028]

[0029]

[0030]

[0031] Δt is a certain time interval, η gd (t), η ad (t) represents the Gaussian random noise of acceleration and gravity vector in discrete time, b a , b g They represent acceleration and gravity vector zero bias, η ad , η gd denote the acceleration and gravity vector Gaussian random noise respectively, The angular velocity and acceleration of the IMU measurement model are measured in the world coordinate system.

[0032] Assume that there are two adjacent key frames i and j. It is necessary to know the IMU state corresponding to time i and solve the IMU pre-integrated value corresponding to the key frame at time j in discrete time:

[0033]

[0034]

[0035]

[0036] Δt is a certain time interval, Δt ij is the time difference between time i and time j, g is the gravity vector, They represent the gravity vector and acceleration bias that change with time, represents the angular velocity of the IMU measurement model that changes with time, represents the IMU measurement model velocity that changes with time, R j , R i 、v j 、v i 、p j 、p i are the rotation, velocity and translation at time j and time i respectively, R k is the time-varying rotation matrix, are the discrete acceleration and gravity vector Gaussian random noises that vary with time;

[0037] In order to avoid repeated integration, the IMU pre-integration method is used to calculate the relative change of the state quantity at time i and j, that is, the reference coordinate system is converted from the world coordinate system to the IMU coordinate system at time i, and the relative amount of the IMU state quantity between time i and j is calculated:

[0038]

[0039]

[0040]

[0041] R j , R i 、v j 、v i 、p j 、p i are the rotation, velocity and translation at time j and time i respectively, point

[0042] are the time-varying acceleration and gravity vector zero bias, represents the angular velocity of the IMU measurement model that changes with time, represents the IMU measurement model velocity over time, is the discrete acceleration and gravity vector Gaussian random noise that varies with time, ΔR ij , Δv ij , Δp ij is the difference in rotation, velocity and translation between i and j, ΔR i The transpose of Δt ij is the time difference between moments i and j, Δt is a certain time interval, ΔR ik , Δv ik is the rotation and speed difference between moments i and k;

[0043] From the above formula, we can see that the whole pre-integration formula is related to bias and noise. We need to analyze the influence of bias and noise on the system separately. Noise obeys Gaussian normal distribution, and bias obeys random walk model.

[0044] The IMU pre-integration used in initialization is a first-order term without bias. The Jacobian matrix is ​​calculated after initialization and before optimization to obtain the accurate pre-integration value (true value) of the IMU and the estimated value to obtain the residual of the IMU.

[0045] The system obeys Gaussian distribution, and the covariance matrix is ​​calculated according to Gaussian distribution, which is a 9*9 matrix;

[0046] The computed residual Jacobian is:

[0047] Residuals:

[0048]

[0049]

[0050]

[0051] Parameters to be estimated:

[0052]

[0053]

[0054]

[0055]

[0056] ΔR ij , Δv ij , Δpi j is the difference of rotation, velocity and translation at time i and j, is the average value of the device, is the acceleration and gravity vector zero bias at time i, is its average value, δba and δbg are its update values, φ is the rotation, Δt ij Inter-frame time difference, R i , R j 、v i 、v j 、p i 、p j Represents the rotation matrix, velocity and translation at time i and j, Transpose it;

[0057] The Jacobian corresponding to the displacement residual is as above, and the corresponding Jacobian at time j can also be derived in the same way. The Jacobian formulas for velocity residual and rotation are similar to those for translation. At this point, the IMU pre-integration is completed.

[0058] 3. In step 4) IMU initialization (visual-inertial joint initialization):

[0059] The gyroscope bias is estimated using the rotation of two linked keyframes, with a constant b g Add a tiny The gyroscope bias update is calculated by minimizing the rotation error:

[0060]

[0061] Where N is the number of key frames, ΔR i,i+1 is the pre-integrated rotation measurement of two consecutive key frames, J is the covariance matrix, They are the rotation matrices of the B coordinate system relative to the W coordinate system at time i+1 and the W coordinate system relative to the B coordinate system at time i; given a zero initial value, the above function is optimized by G2O to solve the minimum objective function corresponding to This is the initial bias of the gyroscope;

[0062] When the zero bias is obtained and substituted into the pre-integration formula, the pre-integration value will be recalculated to make the pre-integration value more accurate;

[0063] To perform scale recovery and gravity acceleration estimation, we first need to establish the estimated state vector X = [s, g W ], where s is the scale, g W is the gravitational acceleration in the world coordinate system;

[0064] Here, three key frames (indicated by 1, 2, and 3) are used to construct a least squares overdetermined equation of AX=B by combining vision and IMU pre-integration data. At least four key frames are required, and singular value decomposition is used to solve the least squares problem, which is slow but accurate.

[0065]

[0066]

[0067]

[0068] I is the identity matrix, W P C is the displacement of the camera center C in the W coordinate system, R WB , R WC is the rotation matrix of the W coordinate system relative to the B coordinate system and the C coordinate system, Δt nm is the time difference between two frames (n,m=1,2,3);

[0069] Since the calculation process of scale recovery and gravity acceleration estimation does not take into account the influence of accelerometer bias, it is difficult to distinguish gravity acceleration from accelerometer bias, which may lead to system pathological problems. Therefore, accelerometer bias calibration and scale gravity acceleration optimization are performed.

[0070] Assume that the direction of gravity acceleration of inertial coordinate system I is g W The normalized unit vector θ is the angle. Then calculate the rotation matrix between the world coordinate system W and the inertial coordinate system I:

[0071]

[0072]

[0073] Then the gravitational acceleration is expressed as:

[0074]

[0075] Due to R WI It is a rotation around the Z axis, so it is only affected by the X and Y directions:

[0076]

[0077] Include the bias for acceleration:

[0078]

[0079] Use three consecutive keyframes to remove the velocity amount:

[0080]

[0081]

[0082]

[0083]

[0084] in[] (:,1:2) The first two columns of the matrix represent the acceleration bias update amount. δθ is a small angle variable, W P C is the displacement of the camera center C in the W coordinate system, C P B is the translation of the IMU center B in the C coordinate system, s is the scale, Δt nm , Δp nm , Δv nm are the time, displacement and speed difference between two frames (n,m=1,2,3), R WB , R WC , R WI is the rotation matrix of the W coordinate system relative to the B coordinate system, the C coordinate system, and the I coordinate system, is g in I coordinate system I The normalized unit vector of gravitational acceleration is , and J is the covariance matrix. Only the direction of gravitational acceleration is optimized, and the data obtained from each optimization will be re-substituted to calculate the latest g W Continue optimizing until the variables converge.

[0085] In step 5), the optimization is performed using a tightly coupled optimization model:

[0086] There are two optimization methods for tight coupling optimization of adjacent visual-inertial frames: (1) Map update occurs:

[0087] First, construct the overall optimization state vector, which contains the rotation of the current moment j Pan speed Displacement Accelerometer bias and gyro bias The overall error equation includes the visual reprojection error E proj and IMU measurement error E IMU ;

[0088]

[0089]

[0090] The visual reprojection equation is a simple pinhole camera reprojection equation, and there is nothing special about its residual, Jacobian calculation and information matrix.

[0091] The IMU measurement error equation consists of two parts: P, V, R and b a ,b g Bias; its residual, residual Jacobian matrix and information matrix have been settled in the IMU pre-integration process and can be directly brought in:

[0092]

[0093]

[0094]

[0095]

[0096] e b =b j -b j (40)

[0098] e R 、e p 、e v 、e b are rotation, translation, velocity and bias errors, R WB , R WC , R WI is the rotation matrix of the W coordinate system relative to the B coordinate system, the C coordinate system, and the I coordinate system, and b is the bias;

[0099] (2) No map update occurs:

[0100] As mentioned above, we first construct the overall optimized state vector, including the rotation of the current time j+1 and the previous time j Pan speed Displacement Accelerometer bias and gyro bias The overall error equation includes the visual reprojection error E proj , IMU measurement error E IMU and the prior error E prior :

[0101]

[0102]

[0103] The error equations of vision and IMU are the same as before, and the prior error is the state quantity at time j;

[0104]

[0105]

[0106]

[0107] e R 、e p 、e v 、e b are rotation, translation, velocity and bias errors, Transpose it, R WB is the rotation matrix of the W coordinate system relative to the B coordinate system, R BW is the rotation matrix of the B coordinate system relative to the W coordinate system, b is the bias, ρ is the coefficient, W p B , W v B is the translation and velocity of the IMU center B in the W coordinate system;

[0108] When the visual-inertial local map is tightly coupled and optimized, the key frames that need to be optimized include the visual reprojection error and the IMU measurement error.

[0109] In the closed loop detection of step 7), a map is constructed and a bag-of-words model is used for closed loop detection to correct the existing map and further improve the accuracy of the three-dimensional map:

[0110] The map construction system based on GPS, IMU and binocular vision described in the present invention comprises a vehicle-mounted computing center, a binocular camera, an IMU inertial measurement unit, and a GNSS receiver based on RTK solution, which are electrically connected;

[0111] The vehicle-mounted computing center stores and processes the data collected by the binocular camera, the IMU inertial measurement unit and the GNSS receiver based on RTK solution in the ROS framework;

[0112] The GNSS receiver based on RTK solution receives GPS positioning information;

[0113] The binocular camera collects surrounding image information for point cloud modeling;

[0114] The IMU inertial measurement unit collects and measures the three-axis attitude angle and acceleration of the vehicle;

[0115] First, the position and posture of the unmanned vehicle or robot are initialized, the trajectory of the unmanned vehicle or the robot is determined, and the data of the IMU inertial measurement unit, binocular camera, etc. are calibrated to maintain time consistency; then the information of the IMU inertial measurement unit, binocular camera and GNSS receiver based on RTK solution is collected and extracted, and sent to the on-board computing center; secondly, the on-board computing center performs IMU pre-integration based on flow type, IMU initialization (visual-inertial joint initialization), and optimization calculation using a tightly coupled optimization model; the similarity between the trajectory of the unmanned vehicle or robot and the three-dimensional map of the surrounding environment is estimated to obtain the real-time position and posture; the map is constructed and the bag-of-words model is used for closed-loop detection, the existing map is corrected, and the accuracy of the three-dimensional map is further improved.

[0116] The positive effects of the present invention are:

[0117] It adopts the method of fusing visual information and IMU information, fuses multiple sensor data, provides a new algorithm structure, builds a stable and effective framework, performs stable and effective autonomous positioning and map construction for unmanned vehicles or robots, and realizes the correction and supplement of GPS positioning information, which can be applied to unmanned vehicles and robot systems for large-scale application. Description of the drawings:

[0118] Figure 1 It is a diagram of the system structure of the present invention;

[0119] Figure 2 , Figure 3 These are pictures taken by the binocular camera during the test of Example 2 on the campus of University of Electronic Science and Technology of Chengdu. Specific implementation method:

[0120] The preferred implementation of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be understood that the preferred implementation is only for illustrating the present invention, rather than for limiting the protection scope of the present invention.

[0121] Example 1

[0122] The present invention provides an autonomous positioning and map construction method and system based on GPS, IMU and binocular vision, comprising the following steps:

[0123] 1. Initialize the position and posture of the unmanned vehicle or robot, determine the trajectory of the unmanned vehicle or robot movement, calibrate the IMU inertial measurement unit and binocular camera data to maintain time consistency, and ensure that they are in the same local area network;

[0124] 2. Collect and extract information from the IMU inertial measurement unit, binocular camera, and GNSS receiver based on RTK solution to track visual features;

[0125] 3. IMU pre-integration based on flow type, including: IMU pre-integration calculation, calculation of pre-integration Jacobian and covariance matrix, calculation of residual Jacobian;

[0126] 4. IMU initialization (visual-inertial joint initialization), which is the first step in the fusion of visual and inertial data.

[0127] The loose coupling process combines visual data with fast IMU data, including: gyroscope bias calibration (zero

[0128] bias), scale recovery and gravity acceleration estimation, accelerometer bias calibration and scale gravity acceleration optimization;

[0129]

[0130] 5. Use the tightly coupled optimization model for optimization, including: tight coupling optimization of visual-inertial adjacent frames and tight coupling optimization of visual-inertial local maps;

[0131]

[0132] Tight coupling requires adding image features to the feature vector to obtain the final pose information. Finally, the image captured by the binocular camera and the IMU, time and GPS coordinates are output.

[0133] 6. Estimate the similarity between the trajectory of the unmanned vehicle or robot and the 3D map of the surrounding environment to obtain the real-time pose;

[0134] 7. Build a map and use the bag-of-words model to perform closed-loop detection, correct the existing map, and further improve the accuracy of the three-dimensional map.

[0135] First, by aligning the pose sequence estimated by the IMU with the pose sequence estimated by the camera, the true scale of the camera trajectory can be estimated. In addition, the IMU can well predict the pose of the image frame and the position of the feature point in the next frame image at the previous moment, thereby improving the matching speed of the feature tracking algorithm and the robustness of the algorithm to cope with rapid rotation. Finally, the gravity vector provided by the accelerometer in the IMU can convert the estimated position into the world coordinate system required for actual navigation. At the same time, the large demand for cameras in mobile terminals such as smartphones has greatly reduced the price cost of sensors. In summary, it is a low-cost and high-performance navigation solution.

[0136] Example 2

[0137] like Figure 1 As shown in the figure, the map building system based on GPS, IMU and binocular vision includes an on-board computing center, a binocular camera, an IMU inertial measurement unit, a GNSS receiver based on RTK solution, etc.

[0138] Hardware-level fusion can integrate the binocular camera and IMU on the entire circuit board. All signal transmission is completed within the circuit board. Data is exchanged directly between the microprocessor that controls the visual system and the microprocessor that controls the IMU. After the more detailed information of the environment or target is provided to the relevant algorithm through visual processing, the performance of the entire system can be improved. Pure data interaction and fusion can also be used to exchange data between sensors through the data bus. The data output ports of the binocular camera, IMU inertial measurement unit, and GNSS receiver based on RTK solution input the collected data into the vehicle-mounted computing center through the data bus, and the data is stored in the vehicle-mounted computing center, and the binocular camera and IMU inertial measurement unit data are fused through algorithms, and the GPS signal obtained by the GNSS receiver based on RTK solution is corrected.

[0139] The vehicle-mounted computing center is the core component of the entire system, and uses the ROS framework to store and process the data collected by the binocular camera, IMU inertial measurement unit and GNSS receiver based on RTK solution. The GNSS receiver based on RTK solution receives GPS positioning information; the binocular camera collects surrounding image information for point cloud modeling; the IMU inertial measurement unit collects and measures the three-axis attitude angle and acceleration of the car.

[0140] First, the position and posture of the unmanned vehicle or robot are initialized, the trajectory of the unmanned vehicle or the robot is determined, and the data of the IMU inertial measurement unit, binocular camera, etc. are calibrated to maintain time consistency; then the information of the IMU inertial measurement unit, binocular camera and GNSS receiver based on RTK solution is collected and extracted, and sent to the on-board computing center; secondly, the on-board computing center performs IMU pre-integration based on flow type, IMU initialization (visual-inertial joint initialization), and optimization calculation using a tightly coupled optimization model; the similarity between the trajectory of the unmanned vehicle or robot and the three-dimensional map of the surrounding environment is estimated to obtain the real-time position and posture; the map is constructed and the bag-of-words model is used for closed-loop detection, the existing map is corrected, and the accuracy of the three-dimensional map is further improved.

[0141] Figure 2 , Figure 3 This is a picture taken by a binocular camera during a test on the campus of Chengdu University of Electronic Science and Technology. We can see that due to the use of a binocular camera, since we know the focal length of the binocular camera and the distance and angle between the two, by taking a fixed marker in the picture, we can more accurately judge the distance between the marker and the observation point through calculation, thereby improving the detection accuracy.

[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A map construction method based on GPS, IMU and binocular vision, characterized in that: The following steps are involved: Step 1: Initialize the position and posture of the unmanned vehicle or robot, determine the trajectory of the unmanned vehicle or robot, and calibrate the IMU inertial measurement unit and binocular camera data to maintain time consistency; Step 2: Collect and extract information from the IMU inertial measurement unit, binocular camera, and GNSS receiver based on RTK solution to perform visual feature tracking; Step 3: IMU pre-integration based on flow type, including: IMU pre-integration calculation, calculation of pre-integration Jacobian and covariance matrix, and calculation of residual Jacobian; Step 4: IMU initialization. This is the first step in the fusion of visual and inertial data. It is a loosely coupled process that combines visual data with fast IMU data, including: gyroscope bias calibration to zero bias, scale recovery and gravity acceleration estimation, accelerometer bias calibration and scale gravity acceleration optimization. Step 5: Use the tightly coupled optimization model for optimization, including: tightly coupled optimization of visual-inertial adjacent frames and tightly coupled optimization of visual-inertial local maps; Step 6: Estimate the similarity between the trajectory of the unmanned vehicle or robot and the three-dimensional map of the surrounding environment to obtain the real-time pose; Step 7: Build a map and use the bag-of-words model to perform closed-loop detection, correct the existing map, and further improve the accuracy of the three-dimensional map.

2. The map construction method based on GPS, IMU and binocular vision according to claim 1, characterized in that: In step 2) information collection and extraction: After each binocular camera captures an image, the image is subjected to ORB feature extraction, and after the ORB feature is extracted, the extracted result is stored; The IMU data inside the driverless car or robot is collected in real time and sent to the manifold-based IMU pre-integration for processing.

3. The map construction method based on GPS, IMU and binocular vision according to claim 1, characterized in that: In step 3) IMU pre-integration based on flow type: In the IMU pre-integration calculation, the world coordinate system, IMU coordinate system and camera coordinate system are usually represented by W, B, and C. The IMU acceleration a is measured by sampling at a certain time interval Δt. B and angular velocity ω B ;IMU measurement model: in, Represents the angular velocity and acceleration of the IMU measurement model in coordinate system B, B ω WB (t)∈R 3 Represents the instantaneous angular velocity of the IMU center B relative to the world coordinate system W in coordinate system B, R WB Represents the rotation matrix of the IMU center B relative to the world coordinate system W, For R WB The transpose of W a(t)∈R 3 represents the instantaneous acceleration of the IMU in the W coordinate, W g represents the gravity vector in the W coordinate system, b represents the zero bias, η represents Gaussian random noise, and b a , b g They represent acceleration and gravity vector zero bias, η a , η g represent the acceleration and gravity vector Gaussian random noise respectively; The derivatives of rotation R, translation p, and velocity v can be expressed as: in, W v represents the instantaneous velocity of the IMU in the W coordinate system, represents the instantaneous angular velocity of B relative to W, R WB Represents the rotation matrix of the IMU center B relative to the world coordinate system W, W p represents the instantaneous translation in the W coordinate system, is its derivative; The rotation R, translation p and velocity v in the world coordinate system can be obtained by the general integral formula. The continuous time integral can be rewritten and combined using Euler integral in discrete time to obtain: Δt is a certain time interval, η gd (t), η ad (t) represents the Gaussian random noise of acceleration and gravity vector in discrete time, b a , b g They represent acceleration and gravity vector zero bias, η ad , η gd denote the acceleration and gravity vector Gaussian random noise respectively, The angular velocity and acceleration of the IMU measurement model are measured in the world coordinate system. Assume that there are two adjacent key frames i and j. It is necessary to know the IMU state corresponding to time i and solve the IMU pre-integrated value corresponding to the key frame at time j in discrete time: Δt is a certain time interval, Δt ij is the time difference between time i and time j, g is the gravity vector, They represent the gravity vector and acceleration bias that change with time, represents the angular velocity of the IMU measurement model that changes with time, represents the IMU measurement model velocity that changes with time, R j , R i 、v j 、v i 、p j 、p i are the rotation, velocity and translation at time j and time i respectively, R k is the time-varying rotation matrix, are the discrete acceleration and gravity vector Gaussian random noises that vary with time; In order to avoid repeated integration, the IMU pre-integration method is used to calculate the relative change of the state quantity at time i and j, that is, the reference coordinate system is converted from the world coordinate system to the IMU coordinate system at time i, and the relative amount of the IMU state quantity between time i and j is calculated: R j , R i 、v j 、v i 、p j 、p i are the rotation, velocity and translation at time j and time i respectively, are the time-varying acceleration and gravity vector zero bias, represents the angular velocity of the IMU measurement model that changes with time, represents the IMU measurement model velocity over time, is the discrete acceleration and gravity vector Gaussian random noise that varies with time, ΔR ij , Δv ij , Δp ij is the difference in rotation, velocity and translation between i and j, ΔR i The transpose of Δt ij is the time difference between moments i and j, Δt is a certain time interval, ΔR ik , Δv ik is the rotation and speed difference between moments i and k; From the above formula, we can see that the whole pre-integration formula is related to bias and noise. We need to analyze the influence of bias and noise on the system separately. Noise obeys Gaussian normal distribution, and bias obeys random walk model. The IMU pre-integration used in initialization is a first-order term without bias. The Jacobian matrix is ​​calculated after initialization and before optimization to obtain the accurate pre-integration value of the IMU and the estimated value to obtain the residual of the IMU. The system obeys Gaussian distribution, and the covariance matrix is ​​calculated according to Gaussian distribution, which is a 9*9 matrix; The computed residual Jacobian is: Residuals: Parameters to be estimated: ΔR ij , Δv ij , Δp ij is the difference of rotation, velocity and translation at time i and j, is the average value of the device, is the acceleration and gravity vector zero bias at time i, Its average value, δb a ,δb g is its update amount, φ is the rotation, Δt ij Inter-frame time difference, R i , R j 、v i 、v j 、p i 、p j Represents the rotation matrix, velocity and translation at time i and j, Transpose it; The Jacobian corresponding to the displacement residual is as above. The corresponding Jacobian at time j can also be derived in this way. The Jacobian formula for velocity residual and rotation is similar to that for translation. At this point, the IMU pre-integration is completed.

4. The map construction method based on GPS, IMU and binocular vision according to claim 1, characterized in that: In step 4) IMU initialization: The gyroscope bias is estimated using the rotation of two linked keyframes, with a constant b g Add a tiny The gyroscope bias update is calculated by minimizing the rotation error: Where N is the number of key frames, ΔR i,i+1 is the pre-integrated rotation measurement of two consecutive keyframes, J is the covariance matrix, They are the rotation matrices of the B coordinate system relative to the W coordinate system at time i+1 and the W coordinate system relative to the B coordinate system at time i; given a zero initial value, the above function is optimized by G2O to solve the minimum objective function corresponding to This is the initial bias of the gyroscope; After the zero bias is obtained, substituting it into the pre-integration formula will recalculate the pre-integration value, making the pre-integration value more accurate; To perform scale recovery and gravity acceleration estimation, we first need to establish the estimated state vector X = [s, g W ], where s is the scale, g W is the gravitational acceleration in the world coordinate system; Three key frames are used here: 1, 2, and 3 represent them. The combined vision and IMU pre-integrated data construct a least squares overdetermined equation of AX=B. At least four key frames are required. The singular value decomposition is used to solve the least squares problem, which is slow but accurate. I is the identity matrix, W P C is the displacement of the camera center C in the W coordinate system, R WB , R WC is the rotation matrix of the W coordinate system relative to the B coordinate system and the C coordinate system, Δt nm is the time difference between two frames n, m = 1, 2, 3; Since the calculation process of scale recovery and gravity acceleration estimation does not take into account the influence of accelerometer bias, it is difficult to distinguish gravity acceleration from accelerometer bias, which may lead to system pathological problems. Therefore, accelerometer bias calibration and scale gravity acceleration optimization are performed. Assume that the direction of gravity acceleration of inertial coordinate system I is g W The normalized unit vector θ is the angle; then calculate the rotation matrix between the world coordinate system W and the inertial coordinate system I: Then the gravitational acceleration is expressed as: Due to R WI It is a rotation around the Z axis, so it is only affected by the X and Y directions: Include the bias for acceleration: Use three consecutive keyframes to remove the velocity amount: in[] (:,1:2) The first two columns of the matrix represent the acceleration bias update amount. δθ is a small angle variable, W P C is the displacement of the camera center C in the W coordinate system, C P B is the translation of the IMU center B in the C coordinate system, s is the scale, Δt nm , Δp nm , Δv nm are the time, displacement and speed differences between two frames n, m = 1, 2, 3, R WB , R WC , R WI is the rotation matrix of the W coordinate system relative to the B coordinate system, the C coordinate system, and the I coordinate system, is g in I coordinate system I The normalized unit vector of gravitational acceleration is , and J is the covariance matrix. Only the direction of gravitational acceleration is optimized, and the data obtained from each optimization will be re-substituted to calculate the latest g W Continue optimizing until the variables converge.

5. The map construction method based on GPS, IMU and binocular vision according to claim 1, characterized in that: In step 5), the optimization is performed using a tightly coupled optimization model: There are two optimization methods for tight coupling optimization of adjacent visual-inertial frames: (1) Map update occurs: First, construct the overall optimization state vector, which contains the rotation of the current moment j Pan speed Displacement Accelerometer bias and gyro bias The overall error equation includes the visual reprojection error E proj and IMU measurement error E IMU ; The visual reprojection equation is a simple pinhole camera reprojection equation, and there is nothing special about its residual, Jacobian calculation and information matrix. The IMU measurement error equation consists of two parts: P, V, R and b a ,b g Bias; its residual, residual Jacobian matrix and information matrix have been settled in the IMU pre-integration process and can be directly brought in: e b =b j -b j (40) e R 、e p 、e v 、e b are rotation, translation, velocity and bias errors, R WB , R WC , R WI is the rotation matrix of the W coordinate system relative to the B coordinate system, the C coordinate system, and the I coordinate system, and b is the bias; (2) No map update occurs: First, construct the overall optimized state vector, including the rotation of the current moment j+1 and the previous moment j Pan speed Displacement Accelerometer bias and gyro bias The overall error equation includes the visual reprojection error E proj , IMU measurement error E IMU and the prior error E prior : The error equations of vision and IMU are the same as before, and the prior error is the state quantity at time j; e R 、e p 、e v 、e b are rotation, translation, velocity and bias errors, Transpose it, R WB is the rotation matrix of the W coordinate system relative to the B coordinate system, R BW is the rotation matrix of the B coordinate system relative to the W coordinate system, b is the bias, ρ is the coefficient, W p B , W v B is the translation and velocity of the IMU center B in the W coordinate system; When the visual-inertial local map is tightly coupled and optimized, the key frames that need to be optimized include the visual reprojection error and the IMU measurement error.

6. The map construction method based on GPS, IMU and binocular vision according to claim 1, characterized in that: In the closed loop detection of step 7), a map is constructed and a bag-of-words model is used to perform closed loop detection, and the existing map is corrected to further improve the accuracy of the three-dimensional map.