vectr-ucla / direct_lidar_odometry

[IEEE RA-L & ICRA'22] A lightweight and computationally-efficient frontend LiDAR odometry solution with consistent and accurate localization.
MIT License
880 stars 186 forks source link

jacobian #10

Closed narutojxl closed 2 years ago

narutojxl commented 2 years ago

Hello author, I want to derive the jacobian in the code. I see we use global perturbation to update. When i try this, i meet this problem to look for your help. image When using Woodbury matrix identity it seems to make the formula more complicated, so i'm stuck to look for your help. Thanks for your help in advance!

Best regards Xiaoliang jiao

kennyjchen commented 2 years ago

Hi @narutojxl --

Thanks for the interest. Unfortunately we're only here to help with the code, but there are some wonderful resources you can find online to help you with the derivation. Also, since we use a modified version of the fast_gicp solver, we also recommend referring back to a similar issue you opened on their repository a few years ago. Best of luck.

narutojxl commented 2 years ago

Thanks author for remainding me that issue, i have forgot it :) . As the author told calculating the jacobian of $M^{-1}$ wrt R is very complicated, slow and impractical., so we approximate it as a constant matrix during each optimization iteration step. When i carefully expand my derivation as the following, it seems not equal in the code mathematically, hessian Hi and bi, LM llt solver ? image

kennyjchen commented 2 years ago

I would recommend asking the fast_gicp authors, as we inherited that part of the code from them.

narutojxl commented 2 years ago

Hello doctor Koide, @koide3 If you are interested in this issue and have some time, could you please give some advice about why not calculate hessian like the above mentioned form? Thanks for your help and time in advance!

koide3 commented 2 years ago

The GICP cost is given by . To use the Gauss-Newton method, we need (not ) and weighting it by . So, , and H is given as .

Eqs. 4 and 10 in the following paper would help to understand how the information matrix (the matrix in our case) is computed and used for the Gauss-Newton method: http://www2.informatik.uni-freiburg.de/~stachnis/pdf/grisetti10titsmag.pdf

narutojxl commented 2 years ago

Thanks Dr @koide3 and @kennyjchen for your kind and patient reply.