1. 程式人生 > >VINS(二)Feature Detection and Tracking

VINS(二)Feature Detection and Tracking

rem lib guarantee closure nbsp 遊走 scope port win

系統入口是feature_tracker_node.cpp文件中的main函數

首先創建feature_tracker節點,從配置文件中讀取信息(parameters.cpp),包括:

  • ROS中發布訂閱的話題名稱;
  • 圖像尺寸;
  • 優化參數(最大求解時間以保證實時性,不卡頓;對大叠代次數,避免冗余計算;視差閾值,用於選取sliding window中的關鍵幀);
  • imu參數,包括加速度計陀螺儀的測量噪聲標準差、零偏隨機遊走噪聲標準差,重力值(imu放火星上需要改變);
  • imu和camera之間的外參R,t;可選(0)已知精確的外參,運行中無需改變,(1)已知外參初值,運行中優化,(2)什麽都不知道,在線初始化中標定
  • 閉環參數,包括brief描述子的pattern文件(前端視覺使用光流跟蹤,不需要計算描述子),針對場景訓練好的DBow二進制字典文件;
imu_topic: "/imu0"
image_topic: "/cam0/image_raw"

image_width: 752
image_height: 480

#optimization parameters
max_solver_time: 0.04  # max solver itration time (ms), to guarantee real time
max_num_iterations: 8   # max solver itrations, to guarantee real time
keyframe_parallax: 
10.0 # keyframe selection threshold (pixel) #imu parameters The more accurate parameters you provide, the better performance acc_n: 0.2 # accelerometer measurement noise standard deviation. #0.2 gyr_n: 0.02 # gyroscope measurement noise standard deviation. #0.05 acc_w: 0.0002 # accelerometer bias random work noise standard deviation. #0.02
gyr_w: 2.0e-5 # gyroscope bias random work noise standard deviation. #4.0e-5 g_norm: 9.81007 # gravity magnitude # Extrinsic parameter between IMU and Camera. estimate_extrinsic: 1 # 0 Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, dont change it. # 1 Have an initial guess about extrinsic parameters. We will optimize around your initial guess. # 2 Dont know anything about extrinsic parameters. You dont need to give R,T. We will try to calibrate it. Do some rotation movement at beginning. #loop closure parameters loop_closure: 1 #if you want to use loop closure to minimize the drift, set loop_closure true and give your brief pattern file path and vocabulary file path accordingly; #also give the camera calibration file same as feature_tracker node pattern_file: "/support_files/brief_pattern.yml" voc_file: "/support_files/brief_k10L6.bin" min_loop_num: 25

VINS(二)Feature Detection and Tracking