HKUST-Aerial-Robotics / VINS-Mono

A Robust and Versatile Monocular Visual-Inertial State Estimator
GNU General Public License v3.0
4.96k stars 2.09k forks source link

Landmark that has been marginalized is keep in the next optimization #351

Open zxawangxiaomu opened 4 years ago

zxawangxiaomu commented 4 years ago

When marginalize an old frame, the landmark witch was seen at this old frame first will be marginalized too: ResidualBlockInfo *residual_block_info = new ResidualBlockInfo(f_td, loss_function, vector<double *>{para_Pose[imu_i], para_Pose[imu_j], para_Ex_Pose[0], para_Feature[feature_index], para_Td[0]}, vector<int>{0, 3}); Howerver, in the function slideWindowOld(),this landmark will not be deleted,it will shift its depth to next frame. Why? In general,when a state is margnalized,it will be deleted from the optimization variable,is that right?