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

Tests fail on i386 #722

Closed
dkogan opened this issue Oct 7, 2023 · 4 comments
Closed

Tests fail on i386 #722

dkogan opened this issue Oct 7, 2023 · 4 comments

Comments

@dkogan
Copy link

dkogan commented Oct 7, 2023

Hello. The Debian g2o package is failing on i386. The build log: https://buildd.debian.org/status/fetch.php?pkg=g2o&arch=i386&ver=0%7E20230806-2&stamp=1696420212&raw=0

It looks like there's a test failure:

./unit_test/slam3d/optimization_slam3d.cpp:94: Failure
Value of: v2AfterOpti->estimate().translation().isApprox(g2o::Vector3::Zero())
  Actual: false
Expected: true

Can we please improve the error message? I suspect that this is simply an issue of numerical fuzz, and increasing the threshold used by isApprox() would fix this. It would be nice if the error message clearly said what threshold it's using, and what value it saw instead.

Thanks

@RainerKuemmerle
Copy link
Owner

Agree, we should use test code that better prints actual and expected value.
Will look at this, in particular, because on https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html#ae8443357b808cd393be1b51974213f9c I found the interesting note that it does not work to check for approximately zero.

RainerKuemmerle added a commit that referenced this issue Oct 21, 2023
@RainerKuemmerle
Copy link
Owner

Pushed a commit with which a failing test would print, e.g.,

/home/goki/workspace/g2o/unit_test/slam3d/optimization_slam3d.cpp:139: Failure
Value of: print_wrap(v2AfterOpti->estimate().rotation().diagonal())
Expected: does differ from { 0, 0, 0 }
more than 0.001
  Actual: { 0.99999999999999989, 0.99999999999999989, 0.99999999999999989 }

@dkogan
Copy link
Author

dkogan commented Oct 30, 2023

Hi. I cherry-picked that patch into the g2o package, and it builds on i386 now. To confirm: that patch adds extra diagnostics AND loosens the acceptance threshold? Yes? Thanks for patching this. I'm closing the bug.

@dkogan dkogan closed this as completed Oct 30, 2023
@RainerKuemmerle
Copy link
Owner

Yes. With the patch we add diagnostics and an adapted acceptance threshold for the test.

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