Do not differentiate the norm at gimbal lock

At gimbal lock, the norm determining the middle Euler angle is exactly
zero. Its kink carries over through atan2, so the angle has no
derivative. Differentiating the norm anyway produces NaN derivatives.

Compute the norm only away from gimbal lock and use its zero subgradient
otherwise. Likewise, compute the norms in the quaternion manifold test
functor only if they are nonzero.

Change-Id: Ic5c4eaaf1b268b7f002c1489296b212fd45f7727
3 files changed
tree: 13c06cf26044d7ae8ae70b0e6ff539e0fb47b78b
  1. .github/
  2. bazel/
  3. cmake/
  4. config/
  5. data/
  6. docs/
  7. examples/
  8. include/
  9. internal/
  10. scripts/
  11. third_party/
  12. .clang-format
  13. .gitignore
  14. .gitmodules
  15. .readthedocs.yaml
  16. BUILD
  17. CITATION.cff
  18. CMakeLists.txt
  19. CONTRIBUTING.md
  20. LICENSE
  21. MODULE.bazel
  22. package.xml
  23. README.md
  24. WORKSPACE
README.md

Android Linux macOS Windows

Ceres Solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see ceres-solver.org for more information.