projectionOneFrameTwoCamFactor

Parameters to be optimised:

  1. : SE(3) pose of body in frame i
  2. : SE(3) pose of body in frame j
  3. : Extrinsic parameter between body and camera
  4. : inverse depth, it is the depth of feature in frame i
  5. : time difference between camera & imu

residual = (pts_camera_j / dep_j).head<2>() - pts_j_td.head<2>();
residual = sqrt_info * residual;

There are 4 Jacobian in Evaluate function.

  • For feature point that is first observed in camera at frame i and project it into camera at frame j

    Since and using the projection function, let’s further modify Equation(1)

    Expand the Equation(2) by ,

    What is our target? To find out the derivative of residual, which is the Jacobian of Lie Group

    img

    By using Chain Rule: $$ \frac{\delta r_c}{\delta P} = \frac{\delta r_c}{\delta f_{c_j}}*\frac{\delta f_{c_j}}{\delta P} \tag{4}

    P consists of all the parameters that we want to optimise: [note: $t_d$ is missing in the picture] ![在这里插入图片描述](https://img-blog.csdnimg.cn/2b8635392eef49f69c42288795008f49.png)

​ For the first term in Equation(4), in code it is declare as reduce

​ For the second term in Equation(4), let’s take the derivative for each parameters

  1. Jacobian[0] $$ \frac{\delta f_{c_j}} {\delta \begin{bmatrix} \delta p_{b_i}^w \ \delta \theta_{b_i^w} \end{bmatrix} }

    \begin{bmatrix} \frac{\delta f_{c_j}}{\delta p_{b_i}^w} , \frac{\delta f_{c_j}}{\delta \theta_{b_i}^w} , \end{bmatrix}

    \frac{\delta f_{c_j}}{\delta p_{b_i}^w} = R_b^cR_w^{b_j}

  2. Jacobian[1]

    Eigen::Matrix<double, 3, 6> jaco_j;
    jaco_j.leftCols<3>() = ric.transpose() * -Rj.transpose();
    jaco_j.rightCols<3>() = ric.transpose() * Utility::skewSymmetric(pts_imu_j);
  3. Jacobian[2]: extrinsic parameter between body and camera

  4. Jacobian[3]: about feature

  5. Jacobian[4]: about time

Reference

  1. VINS-MONO理论学习---紧耦合后端非线性优化
  2. VINS 系统中的视觉重投影因子
  3. VINS_FUSION入门系列-优化optimization