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

changing robust noise model to Gaussian #675

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

ayushbaid
Copy link
Contributor

The previous code was converting Gaussian noise model on Pose3 to robust noise model on Rot3. This simple PR scraps off the robust wrapping over the Gaussian noise model.

@ayushbaid ayushbaid added bugfix Fixes an issue or bug easy-fix Quick and easy to fix quick-review Quick and easy PR to review labels Jan 18, 2021
Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we can't undo that since that was part of the PR to add robust noise models to Shonan.

Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm the last review. The flow of the code indicates this is correct. Nice job @ayushbaid!

@johnwlambert
Copy link
Contributor

Thanks for the PR @ayushbaid.

@dellaert and @lucacarlone -- do you mind taking a look since you all edited Shonan most recently? It seems like ShonanAveraging3 now automatically forces the robust option. Should there be an if/else statement to switch off between

auto model = noiseModel::Robust::Create(
noiseModel::mEstimator::Huber::Create(1.345),
noiseModel::Gaussian::Covariance(M.block<3, 3>(3, 3)));

vs.

auto model = noiseModel::Gaussian::Covariance(M.block<3, 3>(3, 3), true)

Most recent change is here:
https://github.com/borglab/gtsam/pull/547/files#diff-2681e2ffa3c440f21039b01556f84cf32000a6c0c251989f657835ee69622367L850

@varunagrawal
Copy link
Collaborator

That flag is not necessary since convert is called by extractRot3Measurements which in turn is called by maybeRobust. maybeRobust takes the flag for using Huber loss and does the conversion accordingly.

Of course, a 2nd look is always greatly appreciated.

@ayushbaid
Copy link
Contributor Author

That flag is not necessary since convert is called by extractRot3Measurements which in turn is called by maybeRobust. maybeRobust takes the flag for using Huber loss and does the conversion accordingly.

Of course, a 2nd look is always greatly appreciated.

Yup. I think the conversion will happen in the maybeRobust function depending on the parameters.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems we were double robustifying before?

@ayushbaid
Copy link
Contributor Author

LGTM, seems we were double robustifying before?

Yep! And the first one was without checking the parameters

@ayushbaid ayushbaid merged commit 654995e into develop Jan 19, 2021
@ayushbaid ayushbaid deleted the fix/shonan-noise-model-from-factor branch January 19, 2021 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes an issue or bug easy-fix Quick and easy to fix quick-review Quick and easy PR to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants