Repository navigation
Conversation
Sequential elimination compares each pivot with the diagonal that reaches its own step. When a dependency is revealed while eliminating an earlier variable, that diagonal is already round-off, the check passes, and the solve returns an arbitrary step: Gauss-Newton with SEQUENTIAL_QR moves the poses of a pose graph without a prior by hundreds of meters instead of reporting the free gauge (borglab#2903). Add GaussianBayesNet::checkPivots, which compares each pivot with the Hessian diagonal of the eliminated graph's unconstrained factors, and call it in the sequential branches of NonlinearOptimizer::solve and DoglegOptimizer. The tolerances are at round-off level, so only systems without usable digits are reported: the QR safeguard squared, and 2^-40 for Cholesky. The near-indeterminate check during elimination is unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses part 2 of #2903.
Sequential elimination compares each pivot with the diagonal that reaches its own step. When a dependency is revealed while eliminating an earlier variable, that diagonal is already round-off, so the check passes and the solve returns an arbitrary step. Multifrontal elimination reports the same graphs.
This PR adds
GaussianBayesNet::checkPivots. It compares each pivot with the Hessian diagonal of the eliminated graph's unconstrained factors. Hard constraints have no information scale, so they neither count towards that diagonal nor are checked. It is called in the sequential branches ofNonlinearOptimizer::solve(Gauss-Newton and LM) andDoglegOptimizer.The tolerances are at round-off level, so only systems without usable digits are reported:
What does not change: the near-indeterminate check during elimination (2⁻²⁸), multifrontal elimination, and iSAM2.
Effect. Gauss-Newton, one iteration, on 30 Pose2 graphs with loop closures and no prior (default ordering):
SEQUENTIAL_QRSEQUENTIAL_CHOLESKYMULTIFRONTAL_QR,MULTIFRONTAL_CHOLESKYOn the well-posed graphs from #2903 (100 m to 10 km), every solver gives the same iterations and errors as on
develop.Tests.
GaussianBayesNet.CheckPivots: the reference diagonal, both tolerances, the reported key, and zero and NaN pivots.GaussianBayesNet.CheckPivotsIgnoresConstraints: constrained conditionals are skipped, and constrained factors don't inflate the reference.NonlinearOptimizer.SquareLoopWithoutPriorReportsIndeterminateSystem: Gauss-Newton and Dogleg with all four sequential and multifrontal solvers. It fails ondevelopforSEQUENTIAL_QR.I ran
testGaussianBayesNet,testNonlinearOptimizer,testGaussianFactorGraph,testGaussianBayesTree,testJacobianFactorandtestHessianFactor; all pass.