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) GTSAM exception caught: Requested the BayesTree clique for a key that is not in the BayesTree #1252

Open
matlabbe opened this issue Mar 28, 2024 · 1 comment
Labels

Comments

@matlabbe
Copy link
Member

matlabbe commented Mar 28, 2024

Issue introduced by #1249, with GTSAM/Incremental=True, we could get:

[DEBUG] (2024-03-28 12:10:09.623) OptimizerGTSAM.cpp:928::optimize() Computing marginals for node 2702...
[ERROR] (2024-03-28 12:10:09.188) OptimizerGTSAM.cpp:975::optimize() GTSAM exception caught: Requested the BayesTree clique for a key that is not in the BayesTree

that would eventually result in:

[DEBUG] (2024-03-28 12:10:10.048) OptimizerGTSAM.cpp:770::optimize() Update iSAM with the new factors
terminate called after throwing an instance of 'gtsam::ValuesKeyDoesNotExist'
  what():  Attempting to at the key "2702", which does not exist in the Values.

Signal 6 caught...
Aborted (core dumped)

From the log, what happens is after triggering a new map, there was a loop closure detected from the new map to old one (e..g, 2659->2702), which eventually get rejected. The robot was not moving, after 2705 got merged (rehearsal) to 2072, another constraint has been added 2659->2702 to input, but not added to factor graph because the nodes already exist. The missing link then caused the first error. For the second error, it happened when a new node not merged to 2072 has been added. I think the errors are related but 2072 should have been already in the values.

full log: log.txt

@matlabbe matlabbe added the bug label Mar 28, 2024
@matlabbe
Copy link
Member Author

Workaround is to set Mem/RehearsalSimilarity=1. That makes memory management not compatible with GTSAM/Incremental. The cleanest way to solve this issue would be to be able to remove links from external call instead of trying to detect which links/poses have been changed internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant