-
Notifications
You must be signed in to change notification settings - Fork 768
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
Testing performance of SLOW_BUT_CORRECT_BETWEENFACTOR #88
base: develop
Are you sure you want to change the base?
Conversation
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.
Thanks !!! I'm definitely interested in abolishing the flag based on the discussion with Luca and your results, although it would impose derivatives on all retracts :-(, not just Pose2/Pose3. How about adding some comments in the code below? I'm not sure about what you are trying to do in lines 75-83. Are the results not always the same?
@dellaert I'm super sorry for the late reply! |
I think the timing and correctness are two different things. It does not make sense to average the results if they are the same :-) I propose to move timing to a different script in timing folder? See e.g. timeRot3.cpp |
So, this issue/PR has been lingering for a long time, and one big reason is that |
@dellaert: I'm thinking about this issue and 3 solutions come to mind:
|
I have a question about this (since I recently fixed some issues in the Cayley map implementation), no other factor seems to care about the derivatives for the What is the motivation for computing the |
Also, |
@varunagrawal : it has been a while, but I believe the Jacobian in SLOW_BUT_CORRECT_BETWEENFACTOR uses the correct Jacobian for the factor (and in particular for the Logarithm map involved in the between factor) rather than assuming that the Logmap Jacobian is the identity (only true when the error is zero). Using the correct jacobian largely improves convergence. I'm happy to talk more if you have specific questions about that. |
@lucacarlone I see. In that case, it seems like other than fixing the convergence values for the test cases, the only derivatives we need to implement are for |
@varunagrawal : let me know if you need help. Also, make sure @dellaert is ok with adding the missing Jacobians. |
0124bcc45 Merge pull request #97 from borglab/fix/enums-in-classes f818f94d6 Merge pull request #98 from borglab/fix/global-variables ccc84d3bc some cleanup edf141eb7 assign global variable value correctly ad1d6d241 define class instances for enums 963bfdadd prepend full class namespace e9342a43f fix enums defined in classes 35311571b Merge pull request #88 from borglab/doc/git_subtree b9d2ec972 Address review comments 1f7651402 update `update` documentation to not require manual subtree merge command df834d96b capitalization 36dabbef1 git subtree documentation git-subtree-dir: wrap git-subtree-split: 0124bcc45fa83e295750438fbfd11ddface5466f
Hi,
Looking at the performance of BetweenFactors and wrote this extra test. @dellaert @lucacarlone told me to ping you about this. The current default does not define the
SLOW_BUT_CORRECT_BETWEENFACTOR
and for the test example gave an error (compared with the numerical result) with magnitude of around 0.01 with an average runtime on my laptop of around 2e-7 seconds. If we do defineSLOW_BUT_CORRECT_BETWEENFACTOR
and enable the exponential maps, the error magnitude goes down to around 1e-12 and runtime increased to around 3e-7.Perhaps, since the runtime does not increase by much,
SLOW_BUT_CORRECT_BETWEENFACTOR
andGTSAM_ROT3_EXP
should be made default? Or at least documented in readme and allow the user to set it as a cmake option? (Note that if we setSLOW_BUT_CORRECT_BETWEENFACTOR
but notGTSAM_ROT3_EXP
gtsam would crash due to the cayley derivatives being unimplemented currently.This change is