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

Why use OptimizerExt? #44

Open
LauZanMo opened this issue Feb 1, 2025 · 1 comment
Open

Why use OptimizerExt? #44

LauZanMo opened this issue Feb 1, 2025 · 1 comment

Comments

@LauZanMo
Copy link

LauZanMo commented Feb 1, 2025

Thanks for your works! I noticed that you rewrite gtsam optimizers in XXOptimizerExt, and the factors seems to not work with the native gtsam optimizer. Can you tell me the reasons why you rewrite these optimizers, and what are the benefits to use OptimizerExt?

@koide3
Copy link
Owner

koide3 commented Feb 3, 2025

There are two reasons:

  1. The LM optimizer in GTSAM (gtsam::LevenbergMarquardtOptimizer) terminates the optimization iteration when the nonlinear error gets increased. But, data association changes can increase the error in point cloud registration, and the default LM optimizer wrongly terminates the optimization in that case. The LM"Ext" optimizer prevents the wrong termination with slightly modified termination criteria.
  2. The "Ext" optimizers (LM and iSAM2) implements a custom batched linearization routine for GPU-based factors.

Note that you can still use factors in gtsam_points with the optimizers in GTSAM, but you may face the above early termination issue and degraded processing speed of GPU-based factors.

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

2 participants