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

Remove unnecessary functions in ImuFactorsExample.cpp #1324

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

Taeyoung96
Copy link
Contributor

@varunagrawal
This is a simple PR to improve code readability.

In ImuFactorsExample.cpp, when optimizing using isam2, the isam2->update(); function does not affect the results.
I think it's better to remove this function to avoid confusion.

If this PR helps, I'd appreciate it if you merge. 😄
Thanks,

@varunagrawal varunagrawal self-requested a review November 13, 2022 08:23
@varunagrawal
Copy link
Collaborator

@Taeyoung96 thanks for the PR! We always appreciate help from wonderful community members like yourself. 🙂

So just a quick clarifying question: the second isam->update method runs another optimization step, so you can think of it as running gradient descent for 2 timesteps instead of 1. Does removing the 2nd update call significantly affect the final results?

I would love to see some plots of the before and after and ensure they both look the same (along with the numerical values) since we don't have unit tests for this thing. If they are indeed the same, I will gladly approve and merge this PR.

@Taeyoung96
Copy link
Contributor Author

@varunagrawal Thanks for your quick reply!

After checking the results, the update() function did not affect the overall results.
The result of the .csv file has the same numerical values. 😃
(I performed it about 5 times, and I was able to get the same result.)

Here are my result .csv files below.
imuFactorExampleResults(withUpdate).csv
imuFactorExampleResults(withoutUpdate).csv

And the result of the plotting is as follows.

@varunagrawal
Copy link
Collaborator

Amazing! Thanks @Taeyoung96

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.

LGTM

@varunagrawal varunagrawal merged commit ad9c1a7 into borglab:develop Nov 14, 2022
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

Successfully merging this pull request may close these issues.

2 participants