Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typos in df_dx ? #19

Closed
narutojxl opened this issue Aug 23, 2024 · 7 comments
Closed

typos in df_dx ? #19

narutojxl opened this issue Aug 23, 2024 · 7 comments

Comments

@narutojxl
Copy link

Hello @Joanna-HE
Thanks for your excellent work to share this toolkit. I have some foolish questions to look for your help, thanks in advance!

  • I notice when calculating $$F_{\tilde{x}}$$, in pape some items have $\Delta t$, but in the code, it disapper.
    Did we when calculating propagated covariance consider consective imu time diff $\Delta t$ in somewhere?

  • $$\frac{\partial{\dot{R}}}{ \partial{b_g} } $$ item in paper should not have transpose symbol, right? In code we approximate this right jacobin $$J_r$$ into identity matrix, the transpose symbol have very small effect.
    image

  • Similar question about lidar measurement wrt true state $$x_k$$ jacobin $$J^k$$, evaluated at current estimated value $$\hat{\mathbf{x}}^k_k$$, it should also not have transpose symbol, right ?
    image

  • $$\frac{\partial{\dot{R}}}{{\partial{R}}} $$ in paper it is $$E_{XP}(-\hat{\omega_i} \Delta t)$$, but in code it disapper, cov(3, 3) = d(\dot{R}) / dR = Exp(-omega * dt)

Eigen::Matrix<double, 24, 23> df_dx(state_ikfom &s, const input_ikfom &in)
{
Eigen::Matrix<double, 24, 23> cov = Eigen::Matrix<double, 24, 23>::Zero();
cov.template block<3, 3>(0, 12) = Eigen::Matrix3d::Identity();
vect3 acc_;
in.acc.boxminus(acc_, s.ba);
vect3 omega;
in.gyro.boxminus(omega, s.bg);
cov.template block<3, 3>(12, 3) = -s.rot.toRotationMatrix()*MTK::hat(acc_);
cov.template block<3, 3>(12, 18) = -s.rot.toRotationMatrix();
Eigen::Matrix<state_ikfom::scalar, 2, 1> vec = Eigen::Matrix<state_ikfom::scalar, 2, 1>::Zero();
Eigen::Matrix<state_ikfom::scalar, 3, 2> grav_matrix;
s.S2_Mx(grav_matrix, vec, 21);
cov.template block<3, 2>(12, 21) = grav_matrix;
cov.template block<3, 3>(3, 15) = -Eigen::Matrix3d::Identity();
return cov;
}

@zhh2005757
Copy link

Exp(-omega * dt) is almost near to identity matrix

@narutojxl
Copy link
Author

narutojxl commented Aug 30, 2024

yes, agree with you. BTW, @zhh2005757 , about Q2 and Q3, is there a typo in paper?

@Joanna-HE
Copy link
Member

Joanna-HE commented Aug 30, 2024 via email

@narutojxl
Copy link
Author

@Joanna-HE, I'm really really thanks Dr. He kindly and detaily to solve my problem. Close it now!

@narutojxl
Copy link
Author

narutojxl commented Sep 10, 2024

@Joanna-HE , Dr. He, I'm so sorry to bother you again, i try to when fixing aboving typo get some troubles. Thanks for your kind help in advance!
2024-09-10_15-57

  • The items circled in blue in the picture all have a coefficient dt, in df_dx() function we don't have dt. As you mentioned above "1. we calculate multiply delta t after calculating F_x, at the bottom line of the predict function."

  • The items circled in red in the picture do not have a coefficient dt in paper.

  • For example, $$\dot(P)/P$$ is Identity, this item has no dt in paper, $$dot(P)/V$$ is identity* dt in paper.

  • According to above, the red circled items in the picture should all be divided by dt in df_dx() function. But when i test with bag, for example, dot(Q)/Q = Exp(-omega_i * dt) / dt, lio will immediately diverge. But when i do not divided by dt to implement the red items, the lio's state is normal.

  • Q1:The predict function is very complicated for me to carefully get the details. So i am here to seek your verification, when we implement the red items in df_dx() function, we must not divided by dt, as you have alreadly considered this in prediction function, right?

  • Q2: I notice in paper, these items: dot(P) / P = I, dot(V) / V = I, dot(bg) / bg = I, dot(ba) / ba = I, dot(g^w) / (g^w) = I, are all zero in df_dx() function. Should these items be I, or I /dt, or zero in df_dx() func?

@narutojxl narutojxl reopened this Sep 10, 2024
@narutojxl
Copy link
Author

In predict func,

F_x1 = cov::Identity();
F_x1 += f_x_final * dt;
P_ = (F_x1)*P_ * (F_x1).transpose() + (dt * f_w_final) * Q * (dt * f_w_final).transpose();

So the red items should be zeros in df_dx() function.

@narutojxl
Copy link
Author

date: 20241025.
I privately consulted Dr. He, she told me Fx in the fast-lio paper is the derivative of x_k+1 wrt x_k, while the df_dx() in the code is the derivative of the perturbation with respect to x_k. They are two different things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants