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

writeG2o will eliminate symbols #1279

Closed
hiyyg opened this issue Aug 24, 2022 · 3 comments
Closed

writeG2o will eliminate symbols #1279

hiyyg opened this issue Aug 24, 2022 · 3 comments

Comments

@hiyyg
Copy link

hiyyg commented Aug 24, 2022

If more than one symbols are in the factor graph, the vertex indices in the results will only contain the keys without the symbols.

So there will be duplicated indices which is not the expected behavior.

@xqyuan060728
Copy link

I have come across the same problem!
Besides, I have tested the code with different version of gtsam, I found that in gtsam4.0.2(the version lvi-sam recommented), the symbols and keys can be stored as long sequences of figures in a g2o file, however, in gtsam4.2.0, the symbol is missing, there are only keys of vertex in the g2o file. So, when load the g2o file, it throwing an instance of 'gtsam::ValuesKeyAlreadyExists'.
There is a note to this function(writeG2o):
'Note:behavior change in PR #471: to be consistent with load2D and load3D, we write the indices to file and not the full Keys. This change really only affects landmarks, which get read as indices but stored in values with the symbol L(index).'
(https://gtsam.org/doxygen/a01596.html#a68bc584d72da3747666ac134a9490f92).
But I cannot find the effective way to solve this question in gtsam4.2.0.

@varunagrawal
Copy link
Collaborator

@hiyyg @xqyuan060728 can you please provide with an example that fails? We can use that to reproduce and understand the issue better.

@varunagrawal
Copy link
Collaborator

Closing due to lack of a response. Please reopen if the problem still persists.

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

No branches or pull requests

3 participants