Automated dictionary recovery/repairing#1669
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This would solve errors like:
when rtabmap has not been properly closed. After mapping, rtabmap has to save the latest state of the visual world dictionary back to the database. However, if this process gets interrupted (e.g., rtabmap is running in a docker container and by default docker would sig-term the process after 10 sec when stopping), it may partially saved the dictionary. On subsequent runs, on initialization we can get a lot of errors like above saying that the word we want to reference doesn't exist in the dictionary.
In this PR, when the above error happens, it will now start a recovery automatically to re-generate the dictionary with the missing words. When rtabmap closes, it should save the latest state and be fine for next initializations. Well, if rtabmap gets always killed before it can save the dictionary safely, it will recover the next time too. There will be some warning messages shown everytime that can make the user aware to increase wait time before killing the process.
To quickly test:
When recovering:

When there is no issue:

Could recover automatically these cases:
#456
#895