fixed delete database action when memory is not yet initialized, enabled gpu SURF option when available

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1055 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2013-12-14 02:43:26 +00:00
parent a3c0158650
commit 4a150e3215
7 changed files with 73 additions and 64 deletions
+3
View File
@@ -610,6 +610,7 @@ void Rtabmap::resetMemory(bool dbOverwritten)
{
// FIXME May be not work with other database type.
// May be memory should be already created here, and use init above...
UINFO("Erasing file : \"%s\"", getDatabasePath().c_str());
UFile::erase(getDatabasePath());
}
this->setupLogFiles(dbOverwritten);
@@ -1614,9 +1615,11 @@ void Rtabmap::setDatabasePath(const std::string & path)
ULOGGER_DEBUG("Comparing new database path \"%s\" with \"%s\"", path.c_str(), _databasePath.c_str());
if(path.compare(_databasePath) != 0)
{
UDEBUG("Set new database path to \"%s\"", _databasePath.c_str());
_databasePath = path;
if(_memory)
{
UDEBUG("Reset memory!");
this->resetMemory();
}
}