Skip to content

Commit

Permalink
fix a bug in imu jacobian
Browse files Browse the repository at this point in the history
  • Loading branch information
qintonguav committed Jul 12, 2018
1 parent 0d28093 commit 9ff5dfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vins_estimator/src/factor/imu_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ class IMUFactor : public ceres::SizedCostFunction<15, 7, 9, 7, 9>
#if 0
jacobian_speedbias_i.block<3, 3>(O_R, O_BG - O_V) = -dq_dbg;
#else
Eigen::Quaterniond corrected_delta_q = pre_integration->delta_q * Utility::deltaQ(dq_dbg * (Bgi - pre_integration->linearized_bg));
jacobian_speedbias_i.block<3, 3>(O_R, O_BG - O_V) = -Utility::Qleft(Qj.inverse() * Qi * corrected_delta_q).bottomRightCorner<3, 3>() * dq_dbg;
//Eigen::Quaterniond corrected_delta_q = pre_integration->delta_q * Utility::deltaQ(dq_dbg * (Bgi - pre_integration->linearized_bg));
//jacobian_speedbias_i.block<3, 3>(O_R, O_BG - O_V) = -Utility::Qleft(Qj.inverse() * Qi * corrected_delta_q).bottomRightCorner<3, 3>() * dq_dbg;
jacobian_speedbias_i.block<3, 3>(O_R, O_BG - O_V) = -Utility::Qleft(Qj.inverse() * Qi * pre_integration->delta_q).bottomRightCorner<3, 3>() * dq_dbg;
#endif

jacobian_speedbias_i.block<3, 3>(O_V, O_V - O_V) = -Qi.inverse().toRotationMatrix();
Expand Down

0 comments on commit 9ff5dfc

Please sign in to comment.