You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
g2o_viewer cannot load graph files containing high-digit vertex/edge IDs generated by GTSAM's LabeledSymbol. Example IDs: 27303072740933634.
When these high-digit IDs are shortened to just their last few digits (e.g., 3634), g2o_viewer loads the graphs without issues.
Do you have under control which keys are assigned to the LabeledSymbol?
Currently, g2o has ID modeled as int which typically is a 32 bit signed integer value (standard requires it to be 16-bit only).
Quickly googling, GTSAM seems to have a std::uint64_t as key. If you have under control that the key stays in the range of 32bit the files should be working.
In particular the last line sets fail bits of the stream and we fail to parse also the remainder of the line.
Fixing this in g2o would require to introduce some typedef and use this consistently in the code.
Would it be an option for you to investigate controlling the range of Keys assigned to the LabeledSymbol?
Alternatively, if the viewer only serves as a debug tool to visualize a small Python script could re-assign numbers in the supported 32-bit range.
Thank you for your clear and helpful response! I opted to write my own function to generate a 32-bit key, which resolved the issue. Your detailed references to the g2o code were very insightful—much appreciated!
Problem
g2o_viewer cannot load graph files containing high-digit vertex/edge IDs generated by GTSAM's LabeledSymbol. Example IDs: 27303072740933634.
When these high-digit IDs are shortened to just their last few digits (e.g., 3634), g2o_viewer loads the graphs without issues.
Failing vs Working Format:
Does anybody know why this is an issue? And if it can be fixed?
The text was updated successfully, but these errors were encountered: