Method and application of establishing occupancy grid map based on MAP and binocular VIO

By introducing the combination of MAP and binocular VIO into the SLAM algorithm, an occupancy grid map is established, which solves the problems of insufficient positioning accuracy and lack of mapping functions under high-speed motion, and achieves high-precision navigation and robustness in speed changing scenarios. sexual enhancement.

CN114894182BActive Publication Date: 2024-08-27HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210459395.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2024-08-27
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

The existing SLAM algorithm has insufficient positioning accuracy under high-speed motion and lacks effective mapping functions, making it impossible to construct detailed maps for navigation.

Method used

The binocular VIO method based on MAP is used to establish an occupied raster map through vision-IMU joint optimization. The coordinates of key frames and map points are used to construct a feature point cloud map, and the weights are dynamically adjusted according to the movement speed to improve positioning accuracy and robustness. sex.

Benefits of technology

It improves the binocular VIO positioning accuracy in scenarios where speed changes, realizes a true mapping function, is suitable for navigation in most scenarios, and improves the robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114894182B
    Figure CN114894182B
Patent Text Reader

Abstract

The present invention belongs to the technical field related to wheeled robot positioning and mapping, and discloses a method and application for establishing an occupancy grid map based on MAP and binocular VIO, comprising the following steps: (1) calculating the visual reprojection residual and the corresponding covariance matrix; at the same time, calculating the IMU measurement residual and the corresponding covariance matrix; (2) using MAP to construct a least squares optimization model to achieve visual-IMU joint pose optimization; (3) establishing a connection between a key frame and the obtained map point, adding an index to the current map point optimized by the least squares optimization model, and pointing the index to the key frame corresponding to the current camera pose, thereby constructing a feature point cloud map; (4) establishing an occupancy grid map based on the current key frame and the feature point cloud map. The present invention improves robustness and has both positioning and mapping functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to wheeled robot positioning and mapping, and more specifically, to a method and application for establishing an occupancy grid map based on MAP and binocular VIO. Background Art

[0002] In recent years, with the widespread application of technologies such as unmanned driving, drones, and robots in the fields of commerce, science, and military, the navigation algorithm, which is an especially important component, has been constantly updated. The SLAM (simultaneous localization and mapping) method was first proposed by Smith and Cheeseman in 1986 and applied to the field of mobile robots. Its purpose is to build an environmental model during the movement of a carrier equipped with specific sensors when the prior information of the environment is unknown, and to estimate its own state and position information, thereby achieving autonomous positioning and navigation.

[0003] According to the different types of sensors used, SLAM can be further divided into visual SLAM (VSLAM) and laser SLAM. Visual SLAM is a SLAM that uses visual cameras as sensors to perceive the surrounding environment. It is a relatively common technology at present. However, pure visual SLAM has some limitations. It is heavily dependent on the complexity of image information. If the image information is too simple, it is impossible to accurately estimate the motion state of the camera using pure visual technology; and at high speeds, the image will become very blurred and the camera cannot work effectively. Therefore, relevant researchers use visual SLAM in conjunction with other sensors. The most common one is to combine visual information with IMU (Inertial Measurement Unit) information. The acceleration and angular velocity information provided by the IMU can make up for the shortcomings of pure visual SLAM.

[0004] The optimization of VIO state is generally based on nonlinear optimization or filtering algorithms. For optimization-based VIO, a fixed form is generally used for optimization, that is, the weights of each item are fixed when constructing the least squares problem. In actual situations, as the moving speed of the target object changes significantly, the fixed optimization formula is not applicable, and the optimization accuracy cannot achieve the expected effect.

[0005] In addition, most of the current open source SLAM algorithms, such as VINS-Mono, VINS-Fusion, MSCKF, etc., only retain the target's position and motion trajectory, and do not have a mapping link. Algorithms such as ORBSLAM2 and ORBSLAM3 add a mapping link based on positioning, but ORBSLAM2, ORBSLAM3 and other algorithms only store and display the coordinates of map points. This is not a true mapping. They can only be used as sparse point cloud maps that reflect the general characteristics of the environment and cannot be used for navigation. Summary of the invention

[0006] In view of the above defects or improvement needs of the prior art, the present invention provides a method and application for establishing an occupancy grid map based on MAP and binocular VIO, which realizes a true mapping function on the basis of improving positioning accuracy. Specifically, an occupancy grid map is established by utilizing the pose of key frames and the coordinates of map points. The established occupancy grid map is suitable for navigation in most scenarios, improves the accuracy of binocular VIO positioning in scenarios with speed changes, reduces the impact of speed changes on positioning accuracy, improves robustness, and has both positioning and mapping functions.

[0007] To achieve the above object, according to one aspect of the present invention, a method for establishing an occupancy grid map based on MAP and binocular VIO is provided, the method comprising the following steps:

[0008] (1) Extract and match feature points of the images acquired by the binocular camera, calculate the relative pose between two adjacent frames and select key frames, and then calculate the visual reprojection residual and the corresponding covariance matrix; at the same time, process the data collected by the IMU to obtain the IMU measurement residual and the corresponding covariance matrix;

[0009] (2) Based on the calculated visual reprojection residual and its covariance matrix, IMU measurement residual and its covariance matrix, MAP is used to construct a least squares optimization model to achieve visual-IMU joint pose optimization; the expression of the least squares optimization model is:

[0010]

[0011] in α is the weight of the IMU residual term, β is the weight of the visual residual term, H(e) is the Huber kernel function, and v0 is the set speed threshold;

[0012] (3) Establish the connection between the key frame and the obtained map point, add an index to the current map point optimized by the least squares optimization model, and point the index to the key frame corresponding to the current camera pose, thereby constructing a feature point cloud map;

[0013] (4) Establish an occupancy grid map based on the current key frame and feature point cloud map.

[0014] Furthermore, the target's running speed is obtained through IMU pre-integration. If the speed is greater than the threshold set by the system, the weight of the IMU pre-integration residual term is increased when the maximum a posteriori estimation is used for visual-IMU joint pose optimization; if the speed is less than the threshold set by the system, the weight of the visual reprojection residual term is increased when the maximum a posteriori estimation is used for visual-IMU joint pose optimization.

[0015] Furthermore, the speed threshold v0 depends on the maximum limit speed and minimum limit speed of the target in the current environment, which can be expressed as:

[0016] v0=f(v max ,v min )

[0017] where v max is the maximum speed limit of the target under the current environment, v min is the minimum speed limit of the target in the current environment; the threshold can be taken as the average of the set maximum speed and minimum speed, that is,

[0018]

[0019] Furthermore, the weight α of the IMU residual term and the weight β of the visual residual term are related to the sampling frequency of the camera and IMU, and the speed of the current object movement, and can be expressed as:

[0020] (α,β)=g(F SC ,F SI ,v)

[0021] Among them, F SC is the camera sampling frequency, F SI is the IMU sampling frequency, and v is the current target movement speed.

[0022] Furthermore, the processing of IMU data includes the following steps:

[0023] 3.1. Establish the IMU mathematical model. The expression of the IMU mathematical model is:

[0024]

[0025]

[0026] Among them, the marked represents the measured value of the sensor, ω and a without superscript represent the true value of the moving object, and b g , ba represents the random walk error of the sensor, η g , η a represents the measurement noise of the sensor, R IW It is the relative pose from the world coordinate system to the IMU coordinate system;

[0027] 3.2. Calculate the IMU measurement residual using the following formula:

[0028]

[0029]

[0030]

[0031]

[0032] in, represents the set of pre-integrated measurement residuals of the IMU from the i-th keyframe to the j-th keyframe, They represent the pre-integrated measurement residuals of the attitude, velocity, and position of the IMU from the i-th key frame to the j-th key frame, respectively.

[0033] Furthermore, the processing of the image obtained by the binocular camera includes the following steps:

[0034] 2.1 Use the ORB algorithm to extract and match feature points from the current left and right frames of the image acquired by the binocular camera, use the parallax of the left and right frames observing the same feature point and the internal parameters of the binocular camera to calculate the depth value of the feature point, and mark the feature point as a 3D map point;

[0035] 2.2 Calculate the relative pose T between two adjacent images based on a set of matched 3D map points;

[0036] 2.3 Select key frames;

[0037] 2.4 Calculate the visual reprojection residual and its corresponding covariance matrix.

[0038] Furthermore, the visual reprojection error r i,j for

[0039]

[0040] Among them, u i,j is the pixel coordinate value corresponding to the jth 3D map point in the i-th key frame, h(R i p j ) is the conversion of the 3D coordinate value in the camera coordinate system to the 2D coordinate value in the pixel plane, R i is the pose of the i-th key frame, P jis the coordinate of the jth 3D map point in the world coordinate system.

[0041] Furthermore, the principle of selecting key frames is: first, the number of feature points successfully matched between the current frame and the previous frame is greater than or equal to 1.2 times the threshold set by the system, that is,

[0042] n≥1.2n0

[0043] Where n is the number of feature points successfully matched between the current frame and the previous frame, and n0 is the threshold set by the system, which depends on the specific movement scenario of the robot;

[0044] Secondly, the number of image frames between the current frame and the previous key frame is at least 1.2 times the camera frame rate, that is,

[0045] NN lastKF ≥ 1.2F

[0046] Where N is the sequence number of the current frame, N lastKF is the sequence number of the previous key frame, and F is the frame rate of the camera in fps.

[0047] Furthermore, the least squares optimization model is solved using the g2o solver, and the final result obtained through g2o optimization is the optimized camera pose, IMU pose, and map point position.

[0048] According to another aspect of the present invention, there is provided an application of an occupancy grid map established by the method for establishing an occupancy grid map based on MAP and binocular VIO as described above in robot navigation.

[0049] In general, compared with the prior art, the method and application of establishing an occupancy grid map based on MAP and binocular VIO provided by the present invention mainly have the following beneficial effects:

[0050] 1. Taking advantage of the fact that the camera collects data at a low frequency and the IMU collects data at a high frequency, when using the maximum a posteriori estimation to build the least squares model, different weights are assigned to the visual reprojection error term and the IMU pre-integration error term in response to the situation where the speed changes significantly. The specific design is to increase the weight of the visual reprojection residual term when moving at low speeds; and increase the weight of the IMU pre-integration residual term when moving at high speeds. This greatly improves the accuracy of the system and can be applied to scenes with a large range of speed changes, improving the robustness of the system.

[0051] 2. The present invention realizes a true mapping function on the basis of improving positioning accuracy. The specific design is to use the coordinates of the binocular center and the coordinates of the map points to establish an occupancy grid map. The established occupancy grid map is suitable for navigation in most scenarios.

[0052] 3. The present invention can be used as a general algorithm in a binocular inertial odometer system based on nonlinear optimization, which can significantly improve the accuracy and robustness of the system, and has a mapping function, which can fully realize positioning and mapping. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a flow chart of a method for establishing an occupancy grid map based on MAP and binocular VIO provided by the present invention;

[0054] Figure 2 It is a schematic diagram of the relative relationship of the coordinate system and the projection of the binocular camera center and map points in the present invention;

[0055] Figure 3 It is a schematic diagram of processing the occupancy counter and the access counter in the mapping step of the present invention. DETAILED DESCRIPTION

[0056] 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.

[0057] See also Figure 1 , Figure 2 and Figure 3 The present invention provides a method for establishing an occupancy grid map based on MAP and binocular VIO, and the method mainly comprises the following steps:

[0058] Step 1: Establish the world coordinate system, camera coordinate system and IMU coordinate system.

[0059] Specifically, the system coordinate system is established. There are three coordinate systems in total, namely the world coordinate system (W system), the camera coordinate system (C system), and the IMU coordinate system (I system). The world coordinate system is the camera coordinate system corresponding to the first frame image when the system is initialized. The relative relationship between the coordinate systems is as follows: Figure 2 As shown, O W is the origin of the world coordinate system, O C is the origin of the camera coordinate system, O I is the origin of the IMU coordinate system, and the position of the C system relative to the W system is is a 4×4 matrix, where R WC is a 3×3 rotation matrix, t WC is a 3×1 translation vector. The position of the I system relative to the W system is is a 4×4 matrix, where RWI is a 3×3 rotation matrix, t WI is a 3×1 translation vector.

[0060] Step 2: Extract and match feature points of the image acquired by the binocular camera, calculate the relative pose between two adjacent frames and select key frames, and then calculate the visual reprojection residual and the corresponding covariance matrix; at the same time, process the data collected by the IMU to obtain the IMU measurement residual and the corresponding covariance matrix.

[0061] The processing of the image obtained by the binocular camera includes the following steps:

[0062] 2.1 Use the ORB (Oriented FAST and Rotated BRIEF) algorithm to extract and match feature points of the current left and right frames of the image acquired by the binocular camera, use the parallax of the left and right frames observing the same feature point and the intrinsic parameters of the binocular camera to calculate the depth value of the feature point, and mark the feature point as a 3D map point.

[0063] 2.2 Calculate the relative pose T between two adjacent frames based on a set of matched 3D map points. Assume that the relative pose between two adjacent frames Where R is a 3×3 rotation matrix and t is a 3×1 translation vector. The error term is defined as:

[0064] e=Rp2+t-p1 (1)

[0065] Among them, p1 and p2 are the 3D points corresponding to the previous and next frames respectively, R is the rotation matrix of the pose to be determined, and t is the translation vector of the pose to be determined.

[0066] Based on this, a least squares model for vision is constructed and solved using an iterative numerical optimization algorithm.

[0067] 2.3 Select key frames for use in backend optimization. The key frame selection principles are as follows:

[0068] 1. The number of feature points successfully matched between the current frame and the previous frame is greater than or equal to 1.2 times the threshold set by the system, that is,

[0069] n≥1.2n0 (2)

[0070] Among them, n is the number of feature points successfully matched between the current frame and the previous frame, and n0 is the threshold set by the system, which depends on the specific movement scenario of the robot.

[0071] 2. The number of image frames that the current frame has passed from the previous key frame is at least 1.2 times the camera frame rate, that is,

[0072] NN lastKF≥1.2F (3)

[0073] Among them, N is the sequence number of the current frame, N lastKF is the sequence number of the previous key frame, and F is the frame rate of the camera in fps.

[0074] 2.4 Calculate the visual reprojection residual and its corresponding covariance matrix. Taking the calculation of the i-th key frame and the j-th 3D map point as an example, the visual reprojection error r i,j for

[0075]

[0076] Among them, u i,j is the pixel coordinate value corresponding to the jth 3D map point in the i-th key frame, h(R i p j ) is the conversion of the 3D coordinate value in the camera coordinate system to the 2D coordinate value in the pixel plane, R i is the pose of the i-th key frame, P j is the coordinate of the jth 3D map point in the world coordinate system.

[0077] The processing of IMU data includes the following steps:

[0078] 3.1. Establish IMU mathematical model:

[0079]

[0080]

[0081] Among them, the marked represents the measured value of the sensor, ω and a without superscript represent the true value of the moving object, and b g , b a represents the random walk error of the sensor, η g , η a represents the measurement noise of the sensor, R IW It is the relative pose from the world coordinate system to the IMU coordinate system.

[0082] 3.2. Calculate IMU measurement residual:

[0083]

[0084]

[0085]

[0086]

[0087] in, represents the set of pre-integrated measurement residuals of the IMU from the i-th keyframe to the j-th keyframe, They represent the pre-integrated measurement residuals of the attitude, velocity, and position of the IMU from the i-th key frame to the j-th key frame, respectively.

[0088] Step 3: Based on the calculated visual reprojection residuals and their covariance matrix, IMU measurement residuals and their covariance matrix, MAP is used to construct a least squares optimization model to achieve visual-IMU joint pose optimization.

[0089] According to the calculated visual reprojection residual and its covariance matrix, IMU measurement residual and its covariance matrix, and use MAP to build a least squares optimization model:

[0090]

[0091] in α is the weight of the IMU residual term, β is the weight of the visual residual term, H(e) is the Huber kernel function, and v0 is the threshold set by the system. The threshold needs to be determined according to different application scenarios. Specifically, the threshold is not high or low speed in an absolute sense, but depends on the maximum and minimum speed limits of the target in the current environment, which can be expressed as:

[0092] v0=f(v max ,v min ) (8)

[0093] Among them, v max is the maximum speed limit of the target under the current environment, v min is the minimum speed limit of the target under the current environment. For example, the threshold can be the average of the set maximum speed and minimum speed, that is,

[0094]

[0095] The weight α of the IMU residual term and the weight β of the visual residual term are related to the sampling frequency of the camera, the sampling frequency of the IMU, and the movement speed of the current target, which can be expressed as:

[0096] (α,β)=g(F SC ,F SI ,v) (10)

[0097] Among them, F SC is the camera sampling frequency, F SIis the IMU sampling frequency, and v is the current target's moving speed. The target's running speed is obtained through IMU pre-integration. If the speed is greater than the threshold set by the system, the maximum a posteriori estimation is used to perform visual-IMU joint pose optimization, and the weight of the IMU pre-integration residual term is increased; if the speed is less than the threshold set by the system, the maximum a posteriori estimation is used to perform visual-IMU joint pose optimization, and the weight of the visual reprojection residual term is increased.

[0098] The least squares optimization model is solved using the g2o solver. When using g2o for optimization, you need to set vertices and edges. For vision-IMU joint optimization, there are four edges: vision residual edge, IMU residual edge, gyroscope random walk constraint edge, and acceleration random walk constraint edge.

[0099] The first edge is the visual residual edge, the vertex is the pose of the current frame, which includes rotation and translation and is a 6-dimensional vector; the edge is a unary edge, which only connects the current frame pose vertex. Specifically, when constructing the visual reprojection error, the world coordinates of the map point are projected into the camera coordinate system using the pose of the current frame (the variable to be optimized), and then projected onto the pixel plane using the camera intrinsic parameters to obtain its pixel coordinates. The information of the current frame image can be used to obtain the observation of the map point in the current frame, that is, the pixel coordinates. The observation minus the projection is the error, as shown in formula (3).

[0100] The second edge is the IMU pre-integration residual edge, which has six vertices, namely the pose, velocity, gyroscope bias, acceleration bias of the previous key frame and the pose and velocity of the current frame. The pose, velocity, gyroscope bias, and acceleration bias of the previous key frame are fixed and not optimized. For the edge, six vertices are the six-element edge. Unlike vision, the IMU pre-integration residual has three items, namely the residuals of rotation, velocity, and position. Generally, the residual is defined as the measured value minus the ideal value, but for rotation, it is necessary to define the residual as the measured value divided by the ideal value according to the operation rules between the rotation matrices. The rotation residual, velocity residual, and position residual are shown in formula (6).

[0101] The third edge is the gyroscope random walk constraint. Its vertices are the gyroscope bias of the previous keyframe and the gyroscope bias of the current frame. It is a binary edge. The gyroscope bias of the previous keyframe is also fixed and not optimized. The error term of the edge is the difference between the gyroscope bias of the two frames:

[0102] r gb =b g2 -b g1 (11)

[0103] Here, the gyroscope bias of the current keyframe minus the gyroscope bias of the previous keyframe. The function of the gyroscope random walk constraint is to prevent the gyroscope random walk value bg The gap between adjacent frames is too large, which affects the calculation results of IMU pre-integration.

[0104] The fourth edge is the accelerometer random walk constraint. Similar to the gyroscope random walk constraint, the vertices are the accelerometer bias of the previous key frame and the accelerometer bias of the current frame. It is a binary edge. The accelerometer bias of the previous key frame is also fixed and not optimized. The error term of the edge is the difference between the accelerometer biases of the two frames:

[0105] r ab =b a2 -b a1 (12)

[0106] Here, the accelerometer bias of the current keyframe minus the accelerometer bias of the previous keyframe. The accelerometer random walk constraint is used to prevent the accelerometer random walk value b a The gap between adjacent frames is too large, which affects the calculation results of IMU pre-integration.

[0107] In g2o, the weights of each edge are generally assigned by changing the information matrix of each edge. The information matrix is ​​the inverse matrix of the covariance matrix. Since the covariance matrix represents the uncertainty of the measurement value, the information matrix also represents the uncertainty of the measurement value. The smaller the value, the greater the measurement error, and the worse the credibility of the data. As mentioned earlier, the edge (i.e., the error term) is equal to the observed value minus the ideal value, and the ideal value is directly related to the variable to be optimized, so the credibility of the observed value determines the credibility of this edge. This implementation method is mainly aimed at the weight allocation of visual edges and IMU edges.

[0108] The information matrix of the visual edge is a 3D matrix. This is because the observation data is 3D, including the x-coordinate and y-coordinate of the left pixel and the x-coordinate of the right pixel. Each data is independent of each other (the variance of each data is assumed to be the same here). Therefore, the covariance matrix of the observation data is a 3D diagonal matrix, and the information matrix is ​​the inverse matrix of the covariance matrix. The initial value of the information matrix is ​​set as:

[0109]

[0110] in, It is the inverse of the variance of the observed data. The larger its value is, the higher the credibility of the observed data is.

[0111] According to the principle of weight distribution, it is necessary to multiply the covariance matrix by a weight coefficient, namely α in formula (6), so the final value of the visual edge information matrix is:

[0112]

[0113] The information matrix of the IMU side is a 9-dimensional matrix, which is because the observation data of the IMU pre-integration is 9-dimensional, including rotation (3-dimensional), velocity (3-dimensional), and position (3-dimensional). Similarly, a weight coefficient is multiplied by the covariance matrix, that is, β in formula (7).

[0114] The final result obtained through g2o optimization is the optimized camera pose, IMU pose, and map point position.

[0115] Step 4: Establish the connection between the key frame and the obtained map point, add an index to the current map point optimized by the least squares optimization model, and point the index to the key frame corresponding to the current camera pose, so as to construct a feature point cloud map.

[0116] Step 5: Create an occupancy grid map based on the current keyframe and feature point cloud map.

[0117] The creation of an occupancy grid map consists of the following steps:

[0118] 5.1 Project keyframes and map points onto a 2D plane. Specifically, Figure 2 As shown in the figure, the position of the binocular center (coordinate in the world coordinate system) and the corresponding map point position (coordinate in the world coordinate system) in the joint optimization of vision and IMU are extracted, and the position of the binocular center and the position of the map point are projected onto the XY plane. The Z coordinate of the map point is used as the height of the map point. The height is less than the minimum height threshold H min The map points are considered as feature points on the ground, which are usually textures or traffic signs on the ground. Such points do not affect the driving process, so they are removed. In addition, the height is greater than the maximum height threshold H max The map points do not affect the driving process and are also removed. The maximum height threshold H max It must be greater than the maximum height of the wheeled robot and a certain safety distance must be reserved.

[0119] 5.2 Set two counters for each grid, namely, the occupancy counter and the access counter.

[0120] 5.3 Update the occupancy counter and access counter. Specifically, Figure 3 As shown in the figure, the Bresenham algorithm is used to draw a straight line starting from the projection of the binocular center and ending at the projection of the target map point. All the grids that the straight line passes through are traversed. First, the access counter of the grid (i.e. Figure 3 n vi ) plus one, if the grid contains a map point (whether it is a target map point or a non-target map point), it will occupy the counter (i.e. Figure 3 n oc ) plus one.

[0121] 5.4 Calculate the occupancy rate of all grids. Specifically, calculate the occupancy rate of each grid at present, and the calculation formula is:

[0122]

[0123] Among them, n oc is the value of the occupied counter, n vi Is the value of the access counter.

[0124] 5.5 Determine whether the grid is occupied according to the set threshold. First, determine the access counter value n of the grid. vi Is it greater than the access count threshold N0 set by the system? Only grids with access counts greater than the access count threshold N0 set by the system will be judged as occupied: if the grid occupancy rate is greater than P0, it is considered occupied; if the grid occupancy rate is less than 1-P0, it is considered unoccupied; if the grid occupancy rate is greater than 1-P0 and less than P0, it is considered to be an unknown space, that is, it is uncertain whether it is occupied, and P0 is an empirical value. In addition, the access counter value n vi Grids with a number of accesses less than the access count threshold N0 are also determined to be unknown spaces.

[0125] 5.6 Update the entire grid map according to the determined grid occupancy results.

[0126] 5.7 When the next key frame comes, repeat steps 5.1 to 5.2, and continue to update the grid map until the global grid map is established.

[0127] The present invention also provides an application of an occupancy grid map established by the method for establishing an occupancy grid map based on MAP and binocular VIO as described above in robot navigation.

[0128] The established global occupancy grid map and the established feature point cloud map need to be used together for robot navigation: the occupancy grid map is used for path planning of robot navigation, which can be combined with path planning algorithms such as A* (A-star) and RRT (Rapidly-exploring Random Trees); the feature point cloud map is used for robot relocation, and the current frame of the camera to be relocated is matched with the key frame saved when the feature point cloud map was previously established using the bag of words model. After the match is successful, the location information of the corresponding map point can be obtained, which can be combined with the ICP algorithm (Iterative Closest Point) to use the location information of the map point for relocation.

[0129] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for establishing an occupancy grid map based on MAP and binocular VIO, characterized in that: The method comprises the following steps: (1) Extract and match feature points of the images acquired by the binocular camera, calculate the relative pose between two adjacent frames and select key frames, and then calculate the visual reprojection residual and the corresponding covariance matrix; at the same time, process the data collected by the IMU to obtain the IMU measurement residual and the corresponding covariance matrix; (2) Based on the calculated visual reprojection residual and its covariance matrix, IMU measurement residual and its covariance matrix, MAP is used to construct a least squares optimization model to achieve visual-IMU joint pose optimization; the expression of the least squares optimization model is: in α is the weight of the IMU residual term, β is the weight of the visual residual term, H(e) is the Huber kernel function, and v0 is the set speed threshold; (3) Establish the connection between the key frame and the obtained map point, add an index to the current map point optimized by the least squares optimization model, and point the index to the key frame corresponding to the current camera pose, thereby constructing a feature point cloud map; (4) Establish an occupancy grid map based on the current key frame and feature point cloud map.

2. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 1, characterized in that: The target's running speed is obtained through IMU pre-integration. If the speed is greater than the threshold set by the system, the weight of the IMU pre-integration residual term is increased when the maximum a posteriori estimation is used for vision-IMU joint pose optimization; If the speed is less than the threshold set by the system, the weight of the visual reprojection residual term is increased when the maximum a posteriori estimation is used for visual-IMU joint pose optimization.

3. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 1, characterized in that: The size of the speed threshold v0 depends on the maximum and minimum speed limits of the target in the current environment, which can be expressed as: v0=f(v max ,v min ) where v max is the maximum speed limit of the target under the current environment, v min is the minimum speed limit of the target in the current environment; the threshold can be taken as the average of the set maximum speed and minimum speed, that is, 4. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 1, characterized in that: The weight α of the IMU residual term and the weight β of the visual residual term are related to the sampling frequency of the camera and IMU, and the speed of the current object movement, and can be expressed as: (a,b)=g(F SC ,F SI ,v) Among them, F SC is the camera sampling frequency, F SI is the IMU sampling frequency, and v is the current target movement speed.

5. The method for establishing an occupancy grid map based on MAP and binocular VIO according to any one of claims 1 to 4, characterized in that: The processing of IMU data includes the following steps: 3.

1. Establish the IMU mathematical model. The expression of the IMU mathematical model is: Among them, the marked represents the measured value of the sensor, ω and a without superscript represent the true value of the moving object, and b g 、b a represents the random walk error of the sensor, η g , η a represents the measurement noise of the sensor, R IW It is the relative pose from the world coordinate system to the IMU coordinate system; 3.

2. Calculate the IMU measurement residual using the following formula: in, represents the set of pre-integrated measurement residuals of the IMU from the i-th keyframe to the j-th keyframe, They represent the pre-integrated measurement residuals of the attitude, velocity, and position of the IMU from the i-th key frame to the j-th key frame, respectively.

6. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 5, characterized in that: The processing of the image obtained by the binocular camera includes the following steps: 2.1 Use the ORB algorithm to extract and match feature points from the current left and right frames of the image acquired by the binocular camera, use the parallax of the left and right frames observing the same feature point and the internal parameters of the binocular camera to calculate the depth value of the feature point, and mark the feature point as a 3D map point; 2.2 Calculate the relative pose T between two adjacent images based on a set of matched 3D map points; 2.3 Select key frames; 2.4 Calculate the visual reprojection residual and its corresponding covariance matrix.

7. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 6, characterized in that: Visual reprojection error r i,j for Among them, u i,j is the pixel coordinate value corresponding to the jth 3D map point in the i-th key frame, h(R i p j ) is the conversion of the 3D coordinate value in the camera coordinate system to the 2D coordinate value in the pixel plane, R i is the pose of the i-th key frame, P j is the coordinate of the jth 3D map point in the world coordinate system.

8. The method for establishing an occupancy grid map based on MAP and binocular VIO as claimed in claim 6, characterized in that: The principle of selecting key frames is: first, the number of feature points successfully matched between the current frame and the previous frame is greater than or equal to 1.2 times the threshold set by the system, that is, n≥1.2n0 Where n is the number of feature points successfully matched between the current frame and the previous frame, and n0 is the threshold set by the system, which depends on the specific movement scenario of the robot; Secondly, the number of image frames between the current frame and the previous key frame is at least 1.2 times the camera frame rate, that is, <h2 style=";text-align:left;direction:ltr">NN<h2 style=";text-align:left;direction:ltr"> lastKF <h2 style=";text-align:left;direction:ltr"> ≥1.2F Where N is the sequence number of the current frame, N lastKF is the sequence number of the previous key frame, and F is the frame rate of the camera in fps.

9. The method for establishing an occupancy grid map based on MAP and binocular VIO according to any one of claims 1 to 4, characterized in that: The least squares optimization model is solved using the g2o solver. The final result obtained through g2o optimization is the optimized camera pose, IMU pose, and map point position.

10. An application of an occupancy grid map established by the method for establishing an occupancy grid map based on MAP and binocular VIO as described in any one of claims 1 to 9 in robot navigation.