Hi Bruno,
In the
main loop of RtabmapThread under your kSavedStatus case, you may do:
case kSavedStatus:
parameters = _rtabmap->getParameters();
_rtabmap->close(true);
_rtabmap->init(parameters, databasePath);
You would have to save databasePath somewhere, or send it again along your event like what is done for kStateInit. I updated the code to get the database url for convenience, so with this
commit, we could do:
case kSavedStatus:
parameters = _rtabmap->getParameters();
str = _rtabmap->getMemory()->getDatabaseUrl();
_rtabmap->close(true);
_rtabmap->init(parameters, str);
cheers,
Mathieu