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

Add analytical Jacobian for EdgeSE2PointXYBearing type #818

Merged
merged 9 commits into from
Jul 18, 2024

Conversation

matthew-t-watson
Copy link
Contributor

@matthew-t-watson matthew-t-watson commented Jul 13, 2024

  • Add analytical Jacobian for EdgeSE2PointXYBearing type
  • Add a tolerance parameter to the evaluateJacobian helper method to allow tests to specify a different Jacobian tolerance value

@matthew-t-watson matthew-t-watson marked this pull request as ready for review July 13, 2024 09:57
matthew-t-watson and others added 3 commits July 15, 2024 10:00
…larity in EdgeSE2PointXYBearing error function
…ts, increase tolerance in EdgeSE2PointXYBearing Jacobian unit test.
@matthew-t-watson
Copy link
Contributor Author

matthew-t-watson commented Jul 15, 2024

@RainerKuemmerle it looks like the Jacobian unit test was just failing due to a small difference between the numeric and analytical Jacobians. I think this error is actually being introduced by the numeric approach, as increasing the delta used when computing this from 1e-9 to 1e-8 at

constexpr double delta = cst(1e-9);
makes the unit test pass. I suspect this delta is too small to generate an accurate difference for certain values of the error function, likely either due to precision issues in (1/(x^2 + y^2) or atan2.

I obviously don't want to globally change the numerical difference delta size to make this pass, but given the closeness of the results and workaround I'm confident my new code is correct, so don't really want to complicate the test to work around what appears to be an existing issue. I think the best route forward is to parametrise the tolerance in

void evaluateJacobian(EdgeType& e, JacobianWorkspace& jacobianWorkspace,
and use a larger value for this specific test. Thoughts?

@RainerKuemmerle RainerKuemmerle merged commit 3125660 into RainerKuemmerle:master Jul 18, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants