JakobEngel / dso

Direct Sparse Odometry
GNU General Public License v3.0
2.27k stars 906 forks source link

mode 1 of AccumulatedTopHessianSSE::addPoint not computing anything due to the isLinearized flag #226

Open amberwood31 opened 3 years ago

amberwood31 commented 3 years ago

Hi, dear Maintainer

I noticed that since all the points that are marginalized will be removed from the points container of EFFrame, and only the active residuals of these specific points will have the isLinearized flag set to true, there is always 0 linearized residuals. I've observed this being printed from the optimize function when setting_debugout_runquiet is disabled. This basically disabled the mode 1 of AccumulatedTopHessianSSE::addPoint function. And the only nonzero parts of the HL_top matrix are from the hessian prior settings.

Can you kindly let me know what's the intention here? The computation code in addPoint function seems to suggest mode 1 should also accumulate something.

Thanks a lot in advance!

tanjunyao7 commented 3 years ago

yes, if you put assert(mode!=1) before RawResidualJacobian* rJ = r->J;, you will not encounter core dumped. I don't know on what occasion a linearization-fixed point is still active in the sliding window. PS. there are a lot of other codes in DSO that have never been called. I think the author keeps them for the sake of theory completeness and gentleness.