-
Notifications
You must be signed in to change notification settings - Fork 779
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
Similarity(3) estimation returns a negative scale for some poorly aligned pose graphs #995
Comments
Good find.! Do you have an idea how to fix it? |
@johnwlambert , when I run
|
@dellaert interesting. I'll take another look on my local machine. Was passing that test on all CI configurations yesterday:
|
@dellaert I built locally and all the tests pass for me. I did have to uninstall 4 previous versions of gtsam first, though. Can you jlambert:~/gtsam$ cd build
jlambert:~/gtsam/build$ pip uninstall gtsam
Found existing installation: gtsam 4.1.1
Uninstalling gtsam-4.1.1:
Would remove:
/home/jlambert/python/lib/python3.8/site-packages/gtsam-4.1.1.dist-info/*
/home/jlambert/python/lib/python3.8/site-packages/gtsam/*
/home/jlambert/python/lib/python3.8/site-packages/gtsam_unstable/*
Proceed (y/n)? y
Successfully uninstalled gtsam-4.1.1
jlambert:~/gtsam/build$ pip uninstall gtsam
Found existing installation: gtsam 4.2a0
Uninstalling gtsam-4.2a0:
Would remove:
/home/jlambert/python/lib/python3.8/site-packages/gtsam-4.2a0-py3.8.egg
Proceed (y/n)? y
Successfully uninstalled gtsam-4.2a0
jlambert:~/gtsam/build$ pip uninstall gtsam
Found existing installation: gtsam 4.1.0
Uninstalling gtsam-4.1.0:
Would remove:
/home/jlambert/python/lib/python3.8/site-packages/gtsam-4.1.0-py3.8.egg
Proceed (y/n)? y
Successfully uninstalled gtsam-4.1.0
jlambert:~/gtsam/build$ pip uninstall gtsam
WARNING: Skipping gtsam as it is not installed.
jlambert:~/gtsam/build$ make python-install Then, when I run jlambert: make python-test
----------------------------------------------------------------------
Ran 148 tests in 0.125s
OK (skipped=3)
[100%] Built target python-test |
Thanks for checking! I get the same now |
@varunagrawal I looked at this, and think this might be a cmake issue with CMAKE_BUILD_TYPE_POSTFIXES. Specifically, when I enable Timing, I think it builds a |
That's interesting. I will need to take a look at this with a much fresher mind though but I will get to it asap. |
For some badly aligned pose graphs,
Similarity3.Align(
returns an object with negative scale, e.g.This wreaks havoc on reprojection errors, as cheirality exceptions begin to occur everywhere when using camera poses that have been transformed by the Sim(3) object with negative scale.
When the scale is clamped to a positive number, then reprojection errors are unmodified by applying SIm(3) to points and cameras.
According to Ethan Eade (see Section 10.1 of this doc), Sim(3) scale must be non-negative, so the GTSAM code is currently buggy.
How can I reproduce it?
Call:
on the following 2 pose graphs (using 17 out of 32 cameras for correspondences):
The text was updated successfully, but these errors were encountered: