Investigate the behavior difference in the more-thuente line search
Description
More-thuente line search implementation got rewritten/refactored recently from the implementation in !262 (merged) to !417 (merged).
However it seems that there has been a behavior change that breaks the existing demos for the ndt localization/mapping. Additionally, running the current unit tests with the previous implementation causes failures.
I see two possibilities:
- We introduced a subtle bug in !417 (merged)
- There's a simple issue like the optimization problem being maximization problem and the optimizer thinking otherwise.
- The optimization problem and the previous line search implementations are both based on the original implementation from autoware.ai. There's a chance there are multiple bugs that cancel each other.
See relevant discussion: !364 (comment 364609124)
How to Reproduce
- checkout: !364 (merged)
- run ndt_mapper_node launch file
- run the simulator
Alternatively:
- Replace the line search implementation with the one in !262 (merged)
- Run the current unit tests (they will fail)
Current Behavior
- Optimizing the NDT optimization problem with the simulator causes exceptions:
Derivative should be negative for a minimization problem. Flip the step.
- Current unit tests do not work with the previous implementation
Expected behavior
We should figure out which of the two implementations is correct and correct the faulty part.
Edited by Yunus Emre Çalışkan