KumarRobotics / msckf_vio

Robust Stereo Visual Inertial Odometry for Fast Autonomous Flight
Other
1.66k stars 592 forks source link

Why is the jacobian_row_size += 4*feature.observations.size() - 3? #112

Closed leegence closed 3 years ago

leegence commented 3 years ago

https://github.com/KumarRobotics/msckf_vio/blob/12105549ad9194289827e063e9465589a43eef19/src/msckf_vio.cpp#L1077

I think it should be jacobian_row_size += 4*feature.observations.size(), because each stereo pair images provide one pair of matched points and this provides four rows of the Jacobian matrix. Is there any reason that jacobian_row_size += 4*feature.observations.size() - 3? Can you help explain?

ke-sun commented 3 years ago

If I remember correctly, the number of rows is reduced by 3 after projecting the jacobian matrix of the state to the null space of the jacobian matrix of the feature position.

https://github.com/KumarRobotics/msckf_vio/blob/12105549ad9194289827e063e9465589a43eef19/src/msckf_vio.cpp#L906-L913