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

ISAM2 Evaluate Nonlinear Error #518

Merged
merged 2 commits into from
Sep 29, 2020
Merged

ISAM2 Evaluate Nonlinear Error #518

merged 2 commits into from
Sep 29, 2020

Conversation

varunagrawal
Copy link
Collaborator

This PR adds two helper methods to ISAM2Result which allows wrapper access to the errorBefore and errorAfter nonlinear errors of ISAM2.

The helper methods are setup to leverage the boost optional capabilities, such that if evaluateNonlinearError is False, they will return nan. This works great with the python wrapper i.e. the result is printed out as nan.

Example use case:

isam2_parameters = gtsam.ISAM2Params()
isam2_parameters.setEvaluateNonlinearError(True)
#
#
#
result = self.isam.update(graph, initial_estimate)
print("Before Error {0}".format(result.getErrorBefore()))
print("After Error  {0}".format(result.getErrorAfter()))

This method has proven super useful in helping to debug various setup issues in ISAM2 by evaluating the error.

Any feedback involving location of tests for these methods?

@varunagrawal varunagrawal added feature New proposed feature python Related to python wrapper labels Sep 11, 2020
@varunagrawal varunagrawal self-assigned this Sep 11, 2020
@varunagrawal
Copy link
Collaborator Author

Reminder 🙂

@dellaert dellaert merged commit 182dfbd into develop Sep 29, 2020
@dellaert dellaert deleted the feature/isam2-error branch September 29, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New proposed feature python Related to python wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants