projectionOneFrameTwoCamFactor
Parameters to be optimised:
- : SE(3) pose of body in frame i
- : SE(3) pose of body in frame j
- : Extrinsic parameter between body and camera
- : inverse depth, it is the depth of feature in frame i
- : 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
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] 
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
-
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}
-
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);
-
Jacobian[2]: extrinsic parameter between body and camera
-
Jacobian[3]: about feature
-
Jacobian[4]: about time