From 93ee8f9b302277e081f427952ba639686aa8ea81 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Fri, 24 Dec 2021 18:24:44 -0500 Subject: [PATCH] Working dir path: convert ~ to Home for convenience. Localization: don't show "cannot optimize" warning when RGBD/MaxOdomCacheSize=0 --- corelib/src/Rtabmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corelib/src/Rtabmap.cpp b/corelib/src/Rtabmap.cpp index e091df19..438bcd00 100644 --- a/corelib/src/Rtabmap.cpp +++ b/corelib/src/Rtabmap.cpp @@ -2948,7 +2948,7 @@ bool Rtabmap::process( maxAngularError, &maxLinearLink, &maxAngularLink); - if(maxLinearLink == 0 && maxAngularLink==0) + if(maxLinearLink == 0 && maxAngularLink==0 && _maxOdomCacheSize>0) { UWARN("Could not compute graph errors! Wrong loop closures could be accepted!"); optPoses = posesOut; @@ -4085,6 +4085,7 @@ void Rtabmap::setTimeThreshold(float maxTimeAllowed) void Rtabmap::setWorkingDirectory(std::string path) { + path = uReplaceChar(path, '~', UDirectory::homeDir()); if(!path.empty() && UDirectory::exists(path)) { ULOGGER_DEBUG("Comparing new working directory path \"%s\" with \"%s\"", path.c_str(), _wDir.c_str());