KumarRobotics/msckf_vio

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

leegence opened this issue · 1 comments

jacobian_row_size += 4*feature.observations.size() - 3;

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?

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.

msckf_vio/src/msckf_vio.cpp

Lines 906 to 913 in 1210554

// Project the residual and Jacobians onto the nullspace
// of H_fj.
JacobiSVD<MatrixXd> svd_helper(H_fj, ComputeFullU | ComputeThinV);
MatrixXd A = svd_helper.matrixU().rightCols(
jacobian_row_size - 3);
H_x = A.transpose() * H_xj;
r = A.transpose() * r_j;