[VSLAM] VINS-Fusion principle and source code analysis (1) - First introduction to VINS-Fusion

Preface

I recently read VINS-Fusionthe source code and various analysis posts, and thought about writing a VINS-Fusionseries of source code analysis blogs to record my experiences while reading. This series of blogs is VINS-Fusionoriented to the source code process, explaining the front-end and back-end step by step from the entry function, and finally completing the simulation and real machine experimental deployment. I hope to give VINS-Fusiona complete and comprehensive explanation in detail.

1. How to read this series of blogs elegantly

First, download the learning materials of this blog, which include annotated source code and program flow chart;

# 相关论文和思维导图(用xmind软件打开)在下载的源码的学习资料文件夹中
git clone https://github.com/dongdong-cai/VINS_FUSION.git

Second, don’t be constrained by this series of blogs, because the methods in this series of blogs are my own understanding, which may not be correct or suitable for you. You can read more reference posts, they are all excellent;

Third, try to look at the code with questions in mind. If you blindly follow the order of the code, it is easy to sink in and fail to understand why the author designed it this way. Let me raise some questions here:

(1) What are the similarities and differences between VINS-FUSION and ORB2 in feature point identification and feature point matching?

(2) How does VINS-FUSION tightly couple IMU data and camera data? What constraints does it consider?

(3) How to further improve VINS-FUSION (how to improve a paper)?

2. First introduction to VINS-Fusion

VINS-FUSIONOn the basis of , sensors that can obtain global observation information VINS-Monoare added , so that global information can be used to eliminate cumulative errors, thereby reducing closed-loop dependence. If you don't care about global sensors and only care about the processing of camera sensors, then the code is almost the same, and this blog only introduces the front-end and back-end processing.GPSVINS-FUSIONGPSIMUVINS-FUSIONVINS-MonoVINS-FUSION

Let’s take a look at VINS-FUSIONthe overall framework first:

[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-1zbhBBd2-1692172168065)(/home/caiqidong/snap/typora/82/.config/Typora/typora-user -images/image-20230816154206572.png)]

VINSThe functional module can include five parts: front-end data preprocessing, initialization, back-end nonlinear optimization, closed-loop detection, and closed-loop optimization. If readers have seen it before, ORB2they will find that the two frameworks are very similar, and it is also a very typical VSLAMframework process: (1) When the system first starts, we need to initialize the first few frames to obtain high-quality map points for subsequent PnPsolution of location. pose; (2) For each frame of image, we need to perform front-end data preprocessing on the image, identify feature points, match feature points, and solve the relative pose based on matching feature points; (3) The back-end uses visual reprojection to PnPcontinuously Optimize the key frames and map points filtered out by the front end to make the results more accurate; (4) Closed-loop check to determine whether there is a closed loop to reduce global errors;

3. First introduction to VINS-Fusion source code

After downloading VINS-Fusionthe source code, let’s first take a look at the folder composition of the source code:

  • camera_models: Define an abstract camera class, and subsequent monocular cameras and binocular cameras can be unified into one camera class instance;
  • config: It stores the configuration files needed for the program to run. When we run our own camera, we only need to write our own configuration file according to the configuration files inside to run it;
  • docker:Use dockerrun VINS-Fusion;
  • global_fusion: VINS-FusionNewly added GPSglobal sensor processing;
  • loop_fusion: The code for the local loopback detection part. When we run VINS, by default it only runs the front-end and backend. If loopback detection is needed, the loopback detection code needs to be run separately;
  • support_files: The author introduces some information about his code, such as running pictures, papers, etc.;
  • vins_estimator: Front-end and back-end code, this part is where we focus;

After trimming it, we will start the formal explanation in the next lecture VINS-Fusion.

reference

https://blog.csdn.net/BeeGreen/article/details/128514160
https://blog.csdn.net/yhy_yhy13053117/article/details/127874690
https://www.guyuehome.com/15066
https://zhuanlan.zhihu.com/p/407892357
https://mp.weixin.qq.com/s/hoPDnZhT7ltkKib6mqSTcA
https://github.com/kuankuan-yue/VINS-FUSION-leanrning
https://blog.csdn.net/weixin_39926594/article/details/103408620
https://blog.csdn.net/weixin_40084095/article/details/124647161
https://blog.csdn.net/xiaojinger_123/article/details/127403364
https://www.zhihu.com/column/c_1543603130763534336?utm_id=0
https://github.com/ShuyueLin/VINS-Fusion-NotedByLSY
https://zhuanlan.zhihu.com/p/534577566
https://mp.weixin.qq.com/s/opInITC_BDWz12j1_nUseA
https://blog.csdn.net/qq_41904635/article/details/106092472
https://blog.csdn.net/qqGHJ/article/details/127440699
https://blog.csdn.net/LDST_CSDN/article/details/130310175

Guess you like

Origin blog.csdn.net/caiqidong321/article/details/132320618