-
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
Fix initialization in range iSAM example #1131
Conversation
@dellaert I took at look at the issue #1130 and when I built the branch, I'm actually running into the same issue:
I'm still going through the code and haven't found anything in particular. My understanding is that if you're not getting an ill-posed solution on your Mac, there might possibly be OS differences (?) - I'm not sure though. |
What OS are you on? Is it also on L3? |
@dellaert I'm on Ubuntu 20.04 (not sure what you mean by L3). |
The exception refers to a variable. What is it? |
Oh wait, just saw: it's pose 3086, not landmark L3. |
Right, just realized that L3 referred to the landmark symbol. For my error it's actually not occurring with a landmark variable:
|
Thanks!! Can I trouble you to try to set the standard deviation for initializing the landmark to something less than 1000? Try 100, 10. Check several random seeds for each setting, and see whether 10 or 100 reliably succeeds. It could be a numeric issue in computing the determinant - should not be the case but that would be another issue to investigate. |
Okay sure, I'll let you know if I find anything interesting that comes up. |
The Windows CI is failing because the scoop changed its default install process. It annoys the heck out of me that the repo and the build commands are so intertwined. |
Ping @jerredchen ? |
@dellaert Even with changing the loose prior sigma and trying different seeds, it still states that the system is ill-posed. I've only had success with one set of parameters, where
But trying different random seeds with the same parameters will still result in a supposedly underdetermined system so I could only conclude that this worked by coincidence |
Update, after all this, it turned out to be a parsing error :-( The TD file has floats in it, and one of them was parsed as an int, so the data association was all messed up. I figured this out only after adding a python notebook (now also part of this PR) where everything worked nicely as I used Which looks exactly like trajectory in https://www.ri.cmu.edu/pub_files/2009/9/Final_5datasetsRangingRadios.pdf. Note, the range noise has to be made artificially high for iSAM to succeed. To get good uncertainties in line with the UWB standard deviation of 0.5 m (see the paper) a fine-tuning step would be needed. Or, SmartRangeFactor can be used as well. |
@jerredchen check on Linux then approve and merge if it works? |
@dellaert Sounds great, I will build the changes and if everything works and the code looks fine then I will merge. |
@dellaert Tested on Linux - the landmark locations of the C++ and the notebook versions match and look good. Other than the small suggestion I made, it looks good to merge. |
@jerredchen I don't see a suggestion. Did you use the review functionality but forgot to hit approve? If agree with your suggestion I'll edit before merging (but I can't merge without an approve). |
#include <gtsam/nonlinear/ISAM2.h> | ||
|
||
// iSAM2 requires as input a set set of new factors to be added stored in a factor graph, | ||
// and initial guesses for any new variables used in the added factors | ||
// iSAM2 requires as input a set set of new factors to be added stored in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording of this comment confuses me, should it be "iSAM2 requires as input a set of new factors to be added and stored in a factor graph" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit confusing but I'm not gonna restart the CI for this :-) CO2 emissions and all that. I'll slip it into the other PR that I'm working on.
@dellaert You're right, I completely forgot to submit the review. It's a really small thing, so other than that I think it's good to be merged. |
I cleaned up this old example and initialized the landmarks randomly as iSAM proceeds.
Fixes #1130