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

Found possible bug when normalizing quaternion #22

Open
voyage19941119 opened this issue Oct 15, 2020 · 0 comments
Open

Found possible bug when normalizing quaternion #22

voyage19941119 opened this issue Oct 15, 2020 · 0 comments

Comments

@voyage19941119
Copy link

Thanks for this amazing work leading the trend for monocular SLAM!

I found two possible bugs in the part that normalizing the quaternion after EKF. Please check and correct me if I was wrong.

  • the Jacobian for dq_norm_by_dq. Specifically, in the function dqi_by_dqi() and dqi_by_dqj() in motion_model.cpp, the "qq" should all be "sqrt(qq)", according to my derivation

Monoslam_四元数归一化Jacobian

  • the quaternion is not successfully normalized in function func_xvnorm_and_dxvnorm_by_dxv in motion_model.cpp. After this function , the quaternion in state vector is still not an unit quaternion. In function "func_xvnorm_and_dxvnorm_by_dxv",
    Tempqb should be divided by its norm before passing its value to "xvnorm"

xvnormRES_(3) = Tempqb.w();
xvnormRES_(4) = Tempqb.x();
xvnormRES_(5) = Tempqb.y();
xvnormRES_(6) = Tempqb.z();
image

When I run the Scenlib2, the quaternion norm is increasing by the time, this value is close to 1 during a short time, so the performance is not infected significantly. But when running in a long period, this could be a serious problem.

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

1 participant