Basalt VIO Tuning & Configs
The running of the algorithm through roslaunch, please refer to the two example files ./launch/tis_23_with_gui.launch and ./launch/tis_23.launch
It has three important parameters:
show_guito determine if the live 3D tracking is presented through GUIcalib_fileto locate the basalt-specific camera-imu calibration fileconfig_pathto locate basalt vio configurations
Update Camera Calibration#
calib_file should be a .json file, typicaly located in ./data folder. It is different from Kalibr format. Therefore, a convenient python script is provided in the source code. (To run, it has scipy and sophus as dependencies)
Convert the Kalibr's yaml file to json file like this
./ds_kalibr_camimu.py camchain-imucam-2021-01-27-14-52-36.yaml tis_23
IMU-Camera Time offset
"cam_time_offset_ns": -1897133 in the json file indicate the time offset in nanosecond. Meaning: imu time = camera time + cam_time_offset_ns. A negative value means image is head of imu data.
Tuning Basalt Configrations#
Front End Optical Flow:#
optical_flow_epipolar_errorcould be smaller if the calibration is good, author's default is 0.01, can be as large as 0.05 if calibration is offoptical_flow_skip_frameswill control how frequent the flow tracking results to be send to backend optimisation. For example, a number 2 means only have of the frames are sent to optimisation: If the camera are capturing at 20Hz, the pose output will be at 10Hz.
Front End Debugging
config.feature_match_show could be set to true to evaluate optical flow matching performance. Connected lines means successful left-right matching
Back End Optimisation:#
vio_max_statesnumber of latest imu-pose states (shown in red in gui)vio_max_kfsnumber of keyframes (shown as blue in gui)vio_min_frames_after_kfthe minimum frames apart, where two keyframes are taken. This is to avoid taking keyframes too frequentlyvio_new_kf_keypoints_threshthe higher the threshold, the more frequent the keyframe is taken.
Three more important parameters:
vio_obs_std_devthe lower the standard deviation, the higher weight the back end will trust the optical flow results (hence less trust on imu prior). Typical value: 0.1 - 0.5vio_obs_huber_threshto bound the optical flow loss, huber loss is used. The higher the value, the more weights is put on the optical results overall. Typical value 5.0 - 1.0vio_min_triangulation_distthis should be set just slightly smaller than the baseline of the cameras. This avoid triangulation of two frames that are physically too close in space. (Too close gives more error)