-Updated File menu with new actions "New database...", "Open database", "Close database" and "Edit database". Each new session will be automatically saved when closing the database. The "play" action cannot be activated until a new database is created or a previous session database is opened.

-  Memory usage reviewed for the GUI: we don't uncompress data for downloaded nodes from "Download all clouds" action.
- Odometry: added optional argument "initialPose" to reset() method

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1930 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-10-28 01:20:57 +00:00
parent 457c068e0f
commit b56e03b463
30 changed files with 632 additions and 424 deletions

View File

@@ -66,7 +66,7 @@ bool DataRecorder::init(const QString & path, bool recordInRAM)
customParameters.insert(ParametersPair(Parameters::kDbSqlite3InMemory(), "false")); // to keep images
}
memory_ = new Memory();
if(!memory_->init(path.toStdString(), true, customParameters, false))
if(!memory_->init(path.toStdString(), true, customParameters))
{
delete memory_;
memory_ = 0;

View File

@@ -268,6 +268,15 @@ void DatabaseViewer::closeEvent(QCloseEvent* event)
{
event->accept();
}
if(event->isAccepted())
{
if(memory_)
{
delete memory_;
memory_ = 0;
}
}
}
void DatabaseViewer::resizeEvent(QResizeEvent* anEvent)

View File

@@ -80,7 +80,7 @@ void LoopClosureViewer::updateView(const Transform & transform)
samples = samples_;
}
UDEBUG("decimation = %d", decimation);
UDEBUG("decimation = %d", decimation);
UDEBUG("maxDepth = %f", maxDepth);
UDEBUG("samples = %d", samples);
@@ -194,6 +194,7 @@ void LoopClosureViewer::updateView(const Transform & transform)
}
}
else
{
UERROR("loop transform is null !?!?");
ui_->cloudViewerTransform->removeAllClouds();
}

View File

@@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "rtabmap/gui/ImageView.h"
#include "rtabmap/gui/KeypointItem.h"
#include "rtabmap/gui/DataRecorder.h"
#include "rtabmap/gui/DatabaseViewer.h"
#include <rtabmap/utilite/UStl.h>
#include <rtabmap/utilite/ULogger.h>
@@ -114,6 +115,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
_lastId(0),
_processingStatistics(false),
_odometryReceived(false),
_openedDatabasePath(""),
_odometryCorrection(Transform::getIdentity()),
_lastOdometryProcessed(true),
_oneSecondTimer(0),
@@ -241,6 +243,10 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
connect(a, SIGNAL(triggered(bool)), _initProgressDialog, SLOT(show()));
// connect actions with custom slots
connect(_ui->actionNew_database, SIGNAL(triggered()), this, SLOT(newDatabase()));
connect(_ui->actionOpen_database, SIGNAL(triggered()), this, SLOT(openDatabase()));
connect(_ui->actionClose_database, SIGNAL(triggered()), this, SLOT(closeDatabase()));
connect(_ui->actionEdit_database, SIGNAL(triggered()), this, SLOT(editDatabase()));
connect(_ui->actionStart, SIGNAL(triggered()), this, SLOT(startDetection()));
connect(_ui->actionPause, SIGNAL(triggered()), this, SLOT(pauseDetection()));
connect(_ui->actionStop, SIGNAL(triggered()), this, SLOT(stopDetection()));
@@ -329,7 +335,6 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
connect(_preferencesDialog, SIGNAL(settingsChanged(PreferencesDialog::PANEL_FLAGS)), this, SLOT(applyPrefSettings(PreferencesDialog::PANEL_FLAGS)));
qRegisterMetaType<rtabmap::ParametersMap>("rtabmap::ParametersMap");
connect(_preferencesDialog, SIGNAL(settingsChanged(rtabmap::ParametersMap)), this, SLOT(applyPrefSettings(rtabmap::ParametersMap)));
connect(_ui->actionApply_settings_to_the_detector, SIGNAL(triggered()), this, SLOT(applyAllPrefSettings()));
// more connects...
connect(_ui->doubleSpinBox_stats_imgRate, SIGNAL(editingFinished()), this, SLOT(changeImgRateSetting()));
@@ -356,6 +361,26 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
_ui->graphicsView_graphView->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
_ui->widget_cloudViewer->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
if(_ui->statsToolBox->findChildren<StatItem*>().size() == 0)
{
const std::map<std::string, float> & statistics = Statistics::defaultData();
for(std::map<std::string, float>::const_iterator iter = statistics.begin(); iter != statistics.end(); ++iter)
{
_ui->statsToolBox->updateStat(QString((*iter).first.c_str()).replace('_', ' '), 0, (*iter).second);
}
}
// update loop closure viewer parameters
ParametersMap parameters = _preferencesDialog->getAllParameters();
_ui->widget_loopClosureViewer->setDecimation(atoi(parameters.at(Parameters::kLccIcp3Decimation()).c_str()));
_ui->widget_loopClosureViewer->setMaxDepth(atof(parameters.at(Parameters::kLccIcp3MaxDepth()).c_str()));
_ui->widget_loopClosureViewer->setSamples(atoi(parameters.at(Parameters::kLccIcp3Samples()).c_str()));
//update ui
_ui->doubleSpinBox_stats_detectionRate->setValue(_preferencesDialog->getDetectionRate());
_ui->doubleSpinBox_stats_timeLimit->setValue(_preferencesDialog->getTimeLimit());
_ui->actionSLAM_mode->setChecked(_preferencesDialog->isSLAMMode());
splash.close();
this->setFocus();
@@ -364,10 +389,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
MainWindow::~MainWindow()
{
UDEBUG("");
if(_state != kIdle)
{
this->stopDetection();
}
this->stopDetection();
delete _ui;
delete _elapsedTime;
}
@@ -399,6 +421,11 @@ void MainWindow::closeEvent(QCloseEvent* event)
if(_state != kIdle && _state != kMonitoring && _state != kMonitoringPaused)
{
this->stopDetection();
if(_state == kInitialized)
{
this->closeDatabase();
this->changeState(kApplicationClosing);
}
if(_state != kIdle)
{
processStopped = false;
@@ -698,8 +725,9 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
_ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::black));
// update cache
Signature & signature = *_cachedSignatures.insert(stat.getSignature().id(), stat.getSignature());
signature.uncompressData(); // make sure data are already uncompressed
Signature signature = stat.getSignature();
signature.uncompressData(); // make sure data are uncompressed
_cachedSignatures.insert(stat.getSignature().id(), signature);
UDEBUG("");
// map ids
@@ -736,6 +764,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
int matchId = 0;
cv::Mat loopImage;
cv::Mat loopDepth;
cv::Mat loopDepth2D;
int shownLoopId = 0;
if(highestHypothesisId > 0 || stat.localLoopClosureId()>0)
{
@@ -782,8 +811,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
QMap<int, Signature>::iterator iter = _cachedSignatures.find(shownLoopId);
if(iter != _cachedSignatures.end())
{
loopImage = iter.value().getImageRaw();
loopDepth = iter.value().getDepthRaw();
iter.value().uncompressData(&loopImage, &loopDepth, &loopDepth2D);
}
}
}
@@ -933,14 +961,20 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
{
loopOldId = stat.localLoopClosureId();
}
int loopNewId = stat.refImageId();
QMap<int, Signature>::iterator newIter = _cachedSignatures.find(loopNewId);
QMap<int, Signature>::iterator oldIter = _cachedSignatures.find(loopOldId);
if(newIter!=_cachedSignatures.end() && oldIter!=_cachedSignatures.end())
if(oldIter!=_cachedSignatures.end())
{
_ui->widget_loopClosureViewer->setData(*oldIter, *newIter);
Signature old = oldIter.value();
if(old.getImageRaw().empty())
{
old.setImageRaw(loopImage);
old.setDepthRaw(loopDepth);
old.setDepth2DRaw(loopDepth2D);
}
signature.setPose(loopClosureTransform);
_ui->widget_loopClosureViewer->setData(*oldIter, signature);
if(_ui->dockWidget_loopClosureViewer->isVisible())
{
UTimer loopTimer;
@@ -973,7 +1007,8 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
void MainWindow::updateMapCloud(
const std::map<int, Transform> & posesIn,
const Transform & currentPose,
const std::multimap<int, Link> & constraints)
const std::multimap<int, Link> & constraints,
bool verboseProgress)
{
if(posesIn.size())
{
@@ -1028,6 +1063,7 @@ void MainWindow::updateMapCloud(
// Map updated! regenerate the assembled cloud, last pose is the new one
UDEBUG("Update map with %d locations (currentPose=%s)", poses.size(), currentPose.prettyPrint().c_str());
QMap<std::string, Transform> viewerClouds = _ui->widget_cloudViewer->getAddedClouds();
int i=1;
for(std::map<int, Transform>::const_iterator iter = poses.begin(); iter!=poses.end(); ++iter)
{
if(!iter->second.isNull())
@@ -1056,7 +1092,7 @@ void MainWindow::updateMapCloud(
else if(_cachedSignatures.contains(iter->first))
{
QMap<int, Signature>::iterator jter = _cachedSignatures.find(iter->first);
if(!jter->getImageRaw().empty() && !jter->getDepthRaw().empty())
if(jter->getImage().size() && jter->getDepth().size())
{
this->createAndAddCloudToMap(iter->first, iter->second);
}
@@ -1091,7 +1127,7 @@ void MainWindow::updateMapCloud(
else if(_cachedSignatures.contains(iter->first))
{
QMap<int, Signature>::iterator jter = _cachedSignatures.find(iter->first);
if(!jter->getDepth2DRaw().empty())
if(jter->getDepth2D().size())
{
this->createAndAddScanToMap(iter->first, iter->second);
}
@@ -1107,11 +1143,20 @@ void MainWindow::updateMapCloud(
UDEBUG("Hide scan %s", scanName.c_str());
_ui->widget_cloudViewer->setCloudVisibility(scanName.c_str(), false);
}
if(verboseProgress)
{
_initProgressDialog->appendText(tr("Updated cloud %1 (%2/%3)").arg(iter->first).arg(i).arg(poses.size()));
_initProgressDialog->incrementStep();
QApplication::processEvents();
}
}
else
{
UERROR("transform is null!?");
}
++i;
}
//remove not used clouds
for(QMap<std::string, Transform>::iterator iter = viewerClouds.begin(); iter!=viewerClouds.end(); ++iter)
@@ -1224,10 +1269,13 @@ void MainWindow::createAndAddCloudToMap(int nodeId, const Transform & pose)
return;
}
cv::Mat image, depth;
iter->uncompressData(&image, &depth, 0);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
cloud = createCloud(nodeId,
iter->getImageRaw(),
iter->getDepthRaw(),
image,
depth,
iter->getDepthFx(),
iter->getDepthFy(),
iter->getDepthCx(),
@@ -1327,9 +1375,11 @@ void MainWindow::createAndAddScanToMap(int nodeId, const Transform & pose)
UERROR("Node %d is not in the cache.", nodeId);
return;
}
cv::Mat depth2D;
iter->uncompressData(0, 0, &depth2D);
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud;
cloud = util3d::depth2DToPointCloud(iter->getDepth2DRaw());
cloud = util3d::depth2DToPointCloud(depth2D);
QColor color = Qt::red;
int mapId = _mapIds.value(nodeId, -1);
if(mapId >= 0)
@@ -1399,10 +1449,50 @@ void MainWindow::processRtabmapEventInit(int status, const QString & info)
_initProgressDialog->setAutoClose(true, 1);
_initProgressDialog->resetProgress();
_initProgressDialog->show();
this->changeState(MainWindow::kInitializing);
}
else if((RtabmapEventInit::Status)status == RtabmapEventInit::kInitialized)
{
_initProgressDialog->setValue(_initProgressDialog->maximumSteps());
this->changeState(MainWindow::kInitialized);
}
else if((RtabmapEventInit::Status)status == RtabmapEventInit::kClosing)
{
_initProgressDialog->setAutoClose(true, 1);
_initProgressDialog->resetProgress();
_initProgressDialog->show();
if(_state!=kApplicationClosing)
{
this->changeState(MainWindow::kClosing);
}
}
else if((RtabmapEventInit::Status)status == RtabmapEventInit::kClosed)
{
_initProgressDialog->setValue(_initProgressDialog->maximumSteps());
if(_openedDatabasePath.compare(_preferencesDialog->getWorkingDirectory()+"/"+Parameters::getDefaultDatabaseName().c_str()) == 0)
{
// Temp database used, automatically backup with unique name (timestamp)
QString newName = _preferencesDialog->getWorkingDirectory()+(QString("/rtabmap_%1.db").arg(QDateTime::currentDateTime().toString("yyMMddhhmmss")));
if(QFile::rename(_openedDatabasePath, newName))
{
std::string msg = uFormat("Database saved to \"%s\".", newName.toStdString().c_str());
UINFO(msg.c_str());
QMessageBox::information(this, tr("Database saved!"), QString(msg.c_str()));
}
else
{
std::string msg = uFormat("Failed to rename temporary database from \"%s\" to \"%s\".", _openedDatabasePath.toStdString().c_str(), newName.toStdString().c_str());
UERROR(msg.c_str());
QMessageBox::critical(this, tr("Closing failed!"), QString(msg.c_str()));
}
}
_openedDatabasePath.clear();
bool applicationClosing = _state == kApplicationClosing;
this->changeState(MainWindow::kIdle);
if(applicationClosing)
{
this->close();
}
}
else
{
@@ -1410,10 +1500,16 @@ void MainWindow::processRtabmapEventInit(int status, const QString & info)
QString msg(info);
if((RtabmapEventInit::Status)status == RtabmapEventInit::kError)
{
_openedDatabasePath.clear();
_initProgressDialog->setAutoClose(false);
msg.prepend(tr("[ERROR] "));
_initProgressDialog->appendText(msg);
this->changeState(MainWindow::kIdle);
}
else
{
_initProgressDialog->appendText(msg);
}
_initProgressDialog->appendText(msg);
}
}
@@ -1437,8 +1533,9 @@ void MainWindow::processRtabmapEvent3DMap(const rtabmap::RtabmapEvent3DMap & eve
UINFO(" poses = %d", event.getPoses().size());
UINFO(" constraints = %d", event.getConstraints().size());
_initProgressDialog->setMaximumSteps(event.getSignatures().size());
_initProgressDialog->setMaximumSteps(event.getSignatures().size()+event.getPoses().size()+1);
_initProgressDialog->appendText(QString("Inserting data in the cache (%1 signatures downloaded)...").arg(event.getSignatures().size()));
QApplication::processEvents();
int addedSignatures = 0;
for(std::map<int, Signature>::const_iterator iter = event.getSignatures().begin();
@@ -1447,17 +1544,15 @@ void MainWindow::processRtabmapEvent3DMap(const rtabmap::RtabmapEvent3DMap & eve
{
if(!_cachedSignatures.contains(iter->first))
{
QMap<int, Signature>::iterator inserted = _cachedSignatures.insert(iter->first, iter->second);
//uncompress data if required
if(inserted->getImageRaw().empty() && inserted->getImage().size())
{
inserted->uncompressData();
++addedSignatures;
}
_cachedSignatures.insert(iter->first, iter->second);
++addedSignatures;
}
_initProgressDialog->incrementStep();
QApplication::processEvents();
}
_initProgressDialog->appendText(tr("Inserted %1 new signatures.").arg(addedSignatures));
_initProgressDialog->incrementStep();
QApplication::processEvents();
for(std::map<int, int>::const_iterator iter = event.getMapIds().begin();
iter!=event.getMapIds().end();
@@ -1467,6 +1562,7 @@ void MainWindow::processRtabmapEvent3DMap(const rtabmap::RtabmapEvent3DMap & eve
}
_initProgressDialog->appendText(tr("Inserted %1 map ids").arg(_mapIds.size()));
_initProgressDialog->incrementStep();
QApplication::processEvents();
_initProgressDialog->appendText("Inserting data in the cache... done.");
@@ -1475,7 +1571,7 @@ void MainWindow::processRtabmapEvent3DMap(const rtabmap::RtabmapEvent3DMap & eve
_initProgressDialog->appendText("Updating the 3D map cloud...");
_initProgressDialog->incrementStep();
QApplication::processEvents();
this->updateMapCloud(event.getPoses(), Transform(), event.getConstraints());
this->updateMapCloud(event.getPoses(), Transform(), event.getConstraints(), true);
_initProgressDialog->appendText("Updating the 3D map cloud... done.");
}
else
@@ -1489,27 +1585,6 @@ void MainWindow::processRtabmapEvent3DMap(const rtabmap::RtabmapEvent3DMap & eve
_initProgressDialog->setValue(_initProgressDialog->maximumSteps());
}
void MainWindow::applyAllPrefSettings()
{
ULOGGER_DEBUG("");
//This will update the statistics toolbox
_ui->statsToolBox->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
if(_ui->statsToolBox->findChildren<StatItem*>().size() == 0)
{
const std::map<std::string, float> & statistics = Statistics::defaultData();
for(std::map<std::string, float>::const_iterator iter = statistics.begin(); iter != statistics.end(); ++iter)
{
_ui->statsToolBox->updateStat(QString((*iter).first.c_str()).replace('_', ' '), 0, (*iter).second);
}
}
_ui->graphicsView_graphView->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
this->applyPrefSettings(PreferencesDialog::kPanelAll);
this->applyPrefSettings(_preferencesDialog->getAllParameters());
}
void MainWindow::applyPrefSettings(PreferencesDialog::PANEL_FLAGS flags)
{
ULOGGER_DEBUG("");
@@ -1539,7 +1614,7 @@ void MainWindow::applyPrefSettings(PreferencesDialog::PANEL_FLAGS flags)
{
_dbReader->setFrameRate(_preferencesDialog->getGeneralInputRate());
}
}
}//This will update the statistics toolbox
if(flags & PreferencesDialog::kPanelGeneral)
{
@@ -1579,7 +1654,7 @@ void MainWindow::applyPrefSettings(const rtabmap::ParametersMap & parameters)
rtabmap::ParametersMap parametersModified = parameters;
if(_state != kIdle)
if(_state != kIdle && parametersModified.size())
{
if(parametersModified.erase(Parameters::kRtabmapWorkingDirectory()))
{
@@ -1592,23 +1667,15 @@ void MainWindow::applyPrefSettings(const rtabmap::ParametersMap & parameters)
QMessageBox::information(this, tr("Working memory changed"), tr("The working directory can't be changed while the detector is running. This will be applied when the detector will stop."));
}
}
if(parametersModified.erase(Parameters::kRtabmapDatabasePath()))
{
if(_state == kMonitoring || _state == kMonitoringPaused)
{
QMessageBox::information(this, tr("Database path changed"), tr("The remote database path can't be changed while the interface is in monitoring mode."));
}
else
{
QMessageBox::information(this, tr("Database path changed"), tr("The database path can't be changed while the detector is running. This will be applied when the detector will stop."));
}
}
this->post(new ParamEvent(parametersModified));
}
else if(parametersModified.size() == _preferencesDialog->getAllParameters().size())
if(_state != kMonitoring && _state != kMonitoringPaused &&
uContains(parameters, Parameters::kRtabmapWorkingDirectory()))
{
// Send only if all parameters are sent
this->post(new ParamEvent(parametersModified));
_ui->statsToolBox->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
_ui->graphicsView_graphView->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
_ui->widget_cloudViewer->setWorkingDirectory(_preferencesDialog->getWorkingDirectory());
}
// update loop closure viewer parameters
@@ -1884,6 +1951,83 @@ void MainWindow::beep()
}
//ACTIONS
void MainWindow::newDatabase()
{
if(_state != MainWindow::kIdle)
{
UERROR("This method can be called only in IDLE state.");
return;
}
_openedDatabasePath.clear();
ULOGGER_DEBUG("");
this->clearTheCache();
std::string databasePath = _preferencesDialog->getWorkingDirectory().toStdString()+"/"+Parameters::getDefaultDatabaseName();
if(QFile::exists(databasePath.c_str()))
{
if(QFile::remove(databasePath.c_str()))
{
UINFO("Deleted database \"%s\".", databasePath.c_str());
}
else
{
UERROR("Cannot create a new database because the temporary database \"%s\" cannot be deleted.", databasePath.c_str());
return;
}
}
_openedDatabasePath = databasePath.c_str();
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdInit, databasePath, 0, _preferencesDialog->getAllParameters()));
}
void MainWindow::openDatabase()
{
if(_state != MainWindow::kIdle)
{
UERROR("This method can be called only in IDLE state.");
return;
}
_openedDatabasePath.clear();
QString path = QFileDialog::getOpenFileName(this, tr("Open database..."), _preferencesDialog->getWorkingDirectory(), tr("RTAB-Map database files (*.db)"));
if(!path.isEmpty())
{
this->clearTheCache();
_openedDatabasePath = path;
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdInit, path.toStdString(), 0, _preferencesDialog->getAllParameters()));
}
}
void MainWindow::closeDatabase()
{
if(_state != MainWindow::kInitialized)
{
UERROR("This method can be called only in INITIALIZED state.");
return;
}
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdClose));
}
void MainWindow::editDatabase()
{
if(_state != MainWindow::kIdle)
{
UERROR("This method can be called only in IDLE state.");
return;
}
QString path = QFileDialog::getOpenFileName(this, tr("Edit database..."), _preferencesDialog->getWorkingDirectory(), tr("RTAB-Map database files (*.db)"));
if(!path.isEmpty())
{
DatabaseViewer * viewer = new DatabaseViewer(this);
viewer->setWindowModality(Qt::WindowModal);
if(viewer->openDatabase(path))
{
viewer->show();
}
else
{
delete viewer;
}
}
}
void MainWindow::startDetection()
{
ParametersMap parameters = _preferencesDialog->getAllParameters();
@@ -1945,7 +2089,7 @@ void MainWindow::startDetection()
tr("RTAB-Map"),
tr("A camera is running, stop it first."));
UWARN("_camera is not null... it must be stopped first");
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
return;
}
if(_dbReader != 0)
@@ -1954,7 +2098,7 @@ void MainWindow::startDetection()
tr("RTAB-Map"),
tr("A database reader is running, stop it first."));
UWARN("_dbReader is not null... it must be stopped first");
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
return;
}
@@ -1967,7 +2111,7 @@ void MainWindow::startDetection()
tr("RTAB-Map"),
tr("No sources are selected. See Preferences->Source panel."));
UWARN("No sources are selected. See Preferences->Source panel.");
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
return;
}
@@ -2052,7 +2196,7 @@ void MainWindow::startDetection()
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("Camera initialization failed..."));
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
delete camera;
camera = 0;
if(_odomThread)
@@ -2105,7 +2249,7 @@ void MainWindow::startDetection()
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("Database reader initialization failed..."));
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
delete _dbReader;
_dbReader = 0;
if(_odomThread)
@@ -2161,7 +2305,7 @@ void MainWindow::startDetection()
QMessageBox::warning(this,
tr("RTAB-Map"),
tr("Camera initialization failed..."));
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
delete camera;
camera = 0;
return;
@@ -2174,7 +2318,6 @@ void MainWindow::startDetection()
_lastOdomPose.setNull();
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdCleanDataBuffer)); // clean sensors buffer
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdTriggerNewMap)); // Trigger a new map
this->applyAllPrefSettings();
if(_odomThread)
{
@@ -2229,7 +2372,7 @@ void MainWindow::pauseDetection()
void MainWindow::stopDetection()
{
if(_state == kIdle || (!_camera && !_dbReader))
if(!_camera && !_dbReader && !_odomThread)
{
return;
}
@@ -2280,7 +2423,7 @@ void MainWindow::stopDetection()
delete _odomThread;
_odomThread = 0;
}
emit stateChanged(kIdle);
emit stateChanged(kInitialized);
}
void MainWindow::printLoopClosureIds()
@@ -2424,12 +2567,11 @@ void MainWindow::generateTOROMap()
void MainWindow::deleteMemory()
{
QMessageBox::StandardButton button;
QString dbPath = _preferencesDialog->getDatabasePath();
if(_state == kMonitoring || _state == kMonitoringPaused)
{
button = QMessageBox::question(this,
tr("Deleting memory..."),
tr("The remote database file \"%1\" and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath),
tr("The remote database and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::No);
}
@@ -2437,7 +2579,7 @@ void MainWindow::deleteMemory()
{
button = QMessageBox::question(this,
tr("Deleting memory..."),
tr("The database file \"%1\" (%2 MB) and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath).arg(UFile::length(dbPath.toStdString())/1000000),
tr("The current database and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::No);
}
@@ -2447,7 +2589,7 @@ void MainWindow::deleteMemory()
return;
}
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdDeleteMemory, dbPath.toStdString()));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdResetMemory));
this->clearTheCache();
}
@@ -2588,11 +2730,11 @@ void MainWindow::downloadAllClouds()
.arg(global?"true":"false").arg(optimized?"true":"false"));
if(global)
{
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublish3DMapGlobal, optimized?1:0));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublish3DMapGlobal, "", optimized?1:0));
}
else
{
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublish3DMapLocal, optimized?1:0));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublish3DMapLocal, "", optimized?1:0));
}
}
}
@@ -2640,11 +2782,11 @@ void MainWindow::downloadPoseGraph()
.arg(global?"true":"false").arg(optimized?"true":"false"));
if(global)
{
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublishTOROGraphGlobal, optimized?1:0));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublishTOROGraphGlobal, "", optimized?1:0));
}
else
{
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublishTOROGraphLocal, optimized?1:0));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPublishTOROGraphLocal, "", optimized?1:0));
}
}
}
@@ -3721,18 +3863,20 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr MainWindow::getAssembledCloud(
{
if(_cachedSignatures.contains(iter->first))
{
QMap<int, Signature>::const_iterator jter = _cachedSignatures.find(iter->first);
const Signature & s = _cachedSignatures.find(iter->first).value();
cv::Mat image, depth;
s.uncompressData(&image, &depth, 0);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
if(regenerateClouds)
{
cloud = createCloud(iter->first,
jter->getImageRaw(),
jter->getDepthRaw(),
jter->getDepthFx(),
jter->getDepthFy(),
jter->getDepthCx(),
jter->getDepthCy(),
jter->getLocalTransform(),
image,
depth,
s.getDepthFx(),
s.getDepthFy(),
s.getDepthCx(),
s.getDepthCy(),
s.getLocalTransform(),
iter->second,
regenerateVoxelSize,
regenerateDecimation,
@@ -3805,18 +3949,20 @@ std::map<int, pcl::PointCloud<pcl::PointXYZRGB>::Ptr > MainWindow::getClouds(
{
if(_cachedSignatures.contains(iter->first))
{
QMap<int, Signature>::const_iterator jter = _cachedSignatures.find(iter->first);
const Signature & s = _cachedSignatures.find(iter->first).value();
cv::Mat image, depth;
s.uncompressData(&image, &depth, 0);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
if(regenerateClouds)
{
cloud = createCloud(iter->first,
jter->getImageRaw(),
jter->getDepthRaw(),
jter->getDepthFx(),
jter->getDepthFy(),
jter->getDepthCx(),
jter->getDepthCy(),
jter->getLocalTransform(),
image,
depth,
s.getDepthFx(),
s.getDepthFy(),
s.getDepthCx(),
s.getDepthCy(),
s.getLocalTransform(),
Transform::getIdentity(),
regenerateVoxelSize,
regenerateDecimation,
@@ -3872,7 +4018,57 @@ void MainWindow::changeState(MainWindow::State newState)
// TODO : To protect with mutex ?
switch (newState)
{
case kIdle:
case kIdle: // RTAB-Map is not initialized yet
_ui->actionNew_database->setEnabled(true);
_ui->actionOpen_database->setEnabled(true);
_ui->actionClose_database->setEnabled(false);
_ui->actionEdit_database->setEnabled(true);
_ui->actionStart->setEnabled(false);
_ui->actionPause->setEnabled(false);
_ui->actionPause->setChecked(false);
_ui->actionPause->setToolTip(tr("Pause"));
_ui->actionStop->setEnabled(false);
_ui->actionPause_on_match->setEnabled(true);
_ui->actionPause_on_local_loop_detection->setEnabled(true);
_ui->actionPause_when_a_loop_hypothesis_is_rejected->setEnabled(true);
_ui->actionDump_the_memory->setEnabled(false);
_ui->actionDump_the_prediction_matrix->setEnabled(false);
_ui->actionDelete_memory->setEnabled(false);
_ui->actionGenerate_map->setEnabled(false);
_ui->actionGenerate_local_map->setEnabled(false);
_ui->actionGenerate_TORO_graph_graph->setEnabled(false);
_ui->actionData_recorder->setEnabled(false);
_ui->actionOpen_working_directory->setEnabled(true);
_ui->actionDownload_all_clouds->setEnabled(false);
_ui->actionDownload_graph->setEnabled(false);
_ui->menuSelect_source->setEnabled(false);
_ui->actionTrigger_a_new_map->setEnabled(false);
_ui->doubleSpinBox_stats_imgRate->setEnabled(true);
_ui->statusbar->clearMessage();
_state = newState;
_oneSecondTimer->stop();
break;
case kApplicationClosing:
case kClosing:
_ui->actionStart->setEnabled(false);
_ui->actionPause->setEnabled(false);
_ui->actionStop->setEnabled(false);
_state = newState;
break;
case kInitializing:
_ui->actionNew_database->setEnabled(false);
_ui->actionOpen_database->setEnabled(false);
_ui->actionEdit_database->setEnabled(false);
_state = newState;
break;
case kInitialized:
_ui->actionNew_database->setEnabled(false);
_ui->actionOpen_database->setEnabled(false);
_ui->actionClose_database->setEnabled(true);
_ui->actionEdit_database->setEnabled(false);
_ui->actionStart->setEnabled(true);
_ui->actionPause->setEnabled(false);
_ui->actionPause->setChecked(false);
@@ -3889,9 +4085,10 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_TORO_graph_graph->setEnabled(true);
_ui->actionData_recorder->setEnabled(false);
_ui->actionOpen_working_directory->setEnabled(true);
_ui->actionApply_settings_to_the_detector->setEnabled(true);
_ui->actionDownload_all_clouds->setEnabled(true);
_ui->actionDownload_graph->setEnabled(true);
_ui->menuSelect_source->setEnabled(true);
_ui->actionTrigger_a_new_map->setEnabled(true);
_ui->doubleSpinBox_stats_imgRate->setEnabled(true);
_ui->statusbar->clearMessage();
_state = newState;
@@ -3900,6 +4097,7 @@ void MainWindow::changeState(MainWindow::State newState)
case kStartingDetection:
_ui->actionStart->setEnabled(false);
_state = newState;
break;
case kDetecting:
@@ -3919,9 +4117,10 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_TORO_graph_graph->setEnabled(false);
_ui->actionData_recorder->setEnabled(true);
_ui->actionOpen_working_directory->setEnabled(true);
_ui->actionApply_settings_to_the_detector->setEnabled(false);
_ui->actionDownload_all_clouds->setEnabled(false);
_ui->actionDownload_graph->setEnabled(false);
_ui->menuSelect_source->setEnabled(false);
_ui->actionTrigger_a_new_map->setEnabled(true);
_ui->doubleSpinBox_stats_imgRate->setEnabled(true);
_ui->statusbar->showMessage(tr("Detecting..."));
_state = newState;
@@ -3953,6 +4152,7 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_local_map->setEnabled(false);
_ui->actionGenerate_TORO_graph_graph->setEnabled(false);
_ui->actionDownload_all_clouds->setEnabled(false);
_ui->actionDownload_graph->setEnabled(false);
_state = kDetecting;
_elapsedTime->start();
_oneSecondTimer->start();
@@ -3979,6 +4179,7 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_local_map->setEnabled(true);
_ui->actionGenerate_TORO_graph_graph->setEnabled(true);
_ui->actionDownload_all_clouds->setEnabled(true);
_ui->actionDownload_graph->setEnabled(true);
_state = kPaused;
_oneSecondTimer->stop();
@@ -3995,6 +4196,10 @@ void MainWindow::changeState(MainWindow::State newState)
}
break;
case kMonitoring:
_ui->actionNew_database->setVisible(false);
_ui->actionOpen_database->setVisible(false);
_ui->actionClose_database->setVisible(false);
_ui->actionEdit_database->setVisible(false);
_ui->actionStart->setVisible(false);
_ui->actionPause->setEnabled(true);
_ui->actionPause->setChecked(false);
@@ -4012,18 +4217,23 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_TORO_graph_graph->setVisible(false);
_ui->actionData_recorder->setVisible(false);
_ui->actionOpen_working_directory->setEnabled(false);
_ui->actionApply_settings_to_the_detector->setVisible(false);
_ui->actionDownload_all_clouds->setEnabled(true);
_ui->actionDownload_graph->setEnabled(true);
_ui->menuSelect_source->setVisible(false);
_ui->actionTrigger_a_new_map->setEnabled(true);
_ui->doubleSpinBox_stats_imgRate->setVisible(false);
_ui->doubleSpinBox_stats_imgRate_label->setVisible(false);
_ui->statusbar->showMessage(tr("Monitoring..."));
_state = newState;
_elapsedTime->start();
_oneSecondTimer->start();
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPause, 0));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPause, "", 0));
break;
case kMonitoringPaused:
_ui->actionNew_database->setVisible(false);
_ui->actionOpen_database->setVisible(false);
_ui->actionClose_database->setVisible(false);
_ui->actionEdit_database->setVisible(false);
_ui->actionStart->setVisible(false);
_ui->actionPause->setToolTip(tr("Continue"));
_ui->actionPause->setChecked(true);
@@ -4041,15 +4251,16 @@ void MainWindow::changeState(MainWindow::State newState)
_ui->actionGenerate_TORO_graph_graph->setVisible(false);
_ui->actionData_recorder->setVisible(false);
_ui->actionOpen_working_directory->setEnabled(false);
_ui->actionApply_settings_to_the_detector->setVisible(false);
_ui->actionDownload_all_clouds->setEnabled(true);
_ui->actionDownload_graph->setEnabled(true);
_ui->menuSelect_source->setVisible(false);
_ui->actionTrigger_a_new_map->setEnabled(true);
_ui->doubleSpinBox_stats_imgRate->setVisible(false);
_ui->doubleSpinBox_stats_imgRate_label->setVisible(false);
_ui->statusbar->showMessage(tr("Monitoring paused..."));
_state = newState;
_oneSecondTimer->stop();
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPause, 1));
this->post(new RtabmapEventCmd(RtabmapEventCmd::kCmdPause, "", 1));
break;
default:
break;

View File

@@ -70,8 +70,10 @@ void PdfPlotItem::showDescription(bool shown)
{
QImage img;
QMap<int, Signature>::const_iterator iter = _signaturesRef->find(int(this->data().x()));
if(iter != _signaturesRef->constEnd() && !iter.value().getImageRaw().empty())
if(iter != _signaturesRef->constEnd() && !iter.value().getImage().empty())
{
cv::Mat image;
iter.value().uncompressData(&image, 0, 0);
img = uCvMat2QImage(iter.value().getImageRaw());
QPixmap scaled = QPixmap::fromImage(img).scaledToWidth(128);
_img = new QGraphicsPixmapItem(scaled, this);

View File

@@ -268,8 +268,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
connect(_ui->general_spinBox_imagesBufferSize, SIGNAL(valueChanged(int)), _ui->general_spinBox_imagesBufferSize_2, SLOT(setValue(int)));
connect(_ui->general_spinBox_maxStMemSize, SIGNAL(valueChanged(int)), _ui->general_spinBox_maxStMemSize_2, SLOT(setValue(int)));
connect(_ui->lineEdit_databasePath, SIGNAL(textChanged(const QString &)), _ui->lineEdit_databasePath_2, SLOT(setText(const QString &)));
connect(_ui->general_doubleSpinBox_timeThr_2, SIGNAL(editingFinished()), this, SLOT(updateBasicParameter()));
connect(_ui->general_doubleSpinBox_hardThr_2, SIGNAL(editingFinished()), this, SLOT(updateBasicParameter()));
connect(_ui->doubleSpinBox_similarityThreshold_2, SIGNAL(editingFinished()), this, SLOT(updateBasicParameter()));
@@ -283,9 +281,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
connect(_ui->general_checkBox_SLAM_mode, SIGNAL(stateChanged(int)), this, SLOT(updateBasicParameter()));
connect(_ui->general_checkBox_SLAM_mode_2, SIGNAL(stateChanged(int)), this, SLOT(updateBasicParameter()));
connect(_ui->lineEdit_databasePath_2, SIGNAL(textChanged(const QString &)), _ui->lineEdit_databasePath, SLOT(setText(const QString &)));
connect(_ui->toolButton_databasePath_2, SIGNAL(clicked()), this, SLOT(changeDatabasePath()));
// Map objects name with the corresponding parameter key, needed for the addParameter() slots
//Rtabmap
_ui->groupBox_publishing->setObjectName(Parameters::kRtabmapPublishStats().c_str());
@@ -301,9 +296,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui->general_spinBox_imagesBufferSize->setObjectName(Parameters::kRtabmapImageBufferSize().c_str());
_ui->general_spinBox_maxRetrieved->setObjectName(Parameters::kRtabmapMaxRetrieved().c_str());
_ui->general_checkBox_startNewMapOnLoopClosure->setObjectName(Parameters::kRtabmapStartNewMapOnLoopClosure().c_str());
_ui->lineEdit_databasePath->setObjectName(Parameters::kRtabmapDatabasePath().c_str());
_ui->lineEdit_workingDirectory->setObjectName(Parameters::kRtabmapWorkingDirectory().c_str());
connect(_ui->toolButton_databasePath, SIGNAL(clicked()), this, SLOT(changeDatabasePath()));
connect(_ui->toolButton_workingDirectory, SIGNAL(clicked()), this, SLOT(changeWorkingDirectory()));
// Memory
@@ -868,7 +861,6 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
_ui->general_checkBox_publishStats_2->setChecked(Parameters::defaultRtabmapPublishStats());
_ui->general_checkBox_activateRGBD_2->setChecked(Parameters::defaultRGBDEnabled());
_ui->general_checkBox_SLAM_mode_2->setChecked(Parameters::defaultMemIncrementalMemory());
_ui->lineEdit_databasePath_2->setText(Parameters::defaultRtabmapDatabasePath().c_str());
_ui->general_doubleSpinBox_detectionRate_2->setValue(Parameters::defaultRtabmapDetectionRate());
// match the advanced (spin and doubleSpin boxes)
_ui->general_doubleSpinBox_timeThr->setValue(Parameters::defaultRtabmapTimeThr());
@@ -944,11 +936,6 @@ QString PreferencesDialog::getWorkingDirectory() const
return _ui->lineEdit_workingDirectory->text();
}
QString PreferencesDialog::getDatabasePath() const
{
return _ui->lineEdit_databasePath->text();
}
QString PreferencesDialog::getIniFilePath() const
{
QString privatePath = QDir::homePath() + "/.rtabmap";
@@ -1492,13 +1479,6 @@ void PreferencesDialog::showEvent ( QShowEvent * event )
if(_monitoringState)
{
// In monitoring state, you cannot change remote paths
_ui->lineEdit_databasePath->setEnabled(false);
_ui->lineEdit_databasePath_2->setEnabled(false);
_ui->toolButton_databasePath->setEnabled(false);
_ui->toolButton_databasePath_2->setEnabled(false);
_ui->label_databasePath->setEnabled(false);
_ui->label_databasePath_2->setEnabled(false);
_ui->lineEdit_workingDirectory->setEnabled(false);
_ui->toolButton_workingDirectory->setEnabled(false);
_ui->label_workingDirectory->setEnabled(false);
@@ -1514,13 +1494,6 @@ void PreferencesDialog::showEvent ( QShowEvent * event )
}
else
{
_ui->lineEdit_databasePath->setEnabled(true);
_ui->lineEdit_databasePath_2->setEnabled(true);
_ui->toolButton_databasePath->setEnabled(true);
_ui->toolButton_databasePath_2->setEnabled(true);
_ui->label_databasePath->setEnabled(true);
_ui->label_databasePath_2->setEnabled(true);
_ui->lineEdit_workingDirectory->setEnabled(true);
_ui->toolButton_workingDirectory->setEnabled(true);
_ui->label_workingDirectory->setEnabled(true);
@@ -2468,30 +2441,6 @@ void PreferencesDialog::updateKpROI()
_ui->lineEdit_kp_roi->setText(strings.join(" "));
}
void PreferencesDialog::changeDatabasePath()
{
QFileDialog fileDialog;
fileDialog.setFileMode(QFileDialog::AnyFile);
fileDialog.setNameFilter(tr("RTAB-Map database files (*.db)"));
fileDialog.setDefaultSuffix("db");
fileDialog.setDirectory(QFileInfo(_ui->lineEdit_databasePath->text()).dir());
fileDialog.selectFile (_ui->lineEdit_databasePath->text());
QStringList fileNames;
QString path;
if(fileDialog.exec())
{
if(!fileDialog.selectedFiles().empty())
{
path = fileDialog.selectedFiles().first();
}
}
if(!path.isEmpty())
{
_ui->lineEdit_databasePath->setText(path);
}
}
void PreferencesDialog::changeWorkingDirectory()
{
QString directory = QFileDialog::getExistingDirectory(this, tr("Working directory"), _ui->lineEdit_workingDirectory->text());

View File

@@ -34,32 +34,37 @@
<property name="title">
<string>File</string>
</property>
<addaction name="actionNew_database"/>
<addaction name="actionOpen_database"/>
<addaction name="separator"/>
<addaction name="actionSave_point_cloud"/>
<addaction name="actionExport_2D_scans_ply_pcd"/>
<addaction name="actionExport_2D_Grid_map_bmp_png"/>
<addaction name="separator"/>
<addaction name="actionClose_database"/>
<addaction name="separator"/>
<addaction name="actionEdit_database"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuEdit">
<property name="title">
<string>Edit</string>
</property>
<addaction name="actionApply_settings_to_the_detector"/>
<addaction name="separator"/>
<addaction name="actionDownload_all_clouds"/>
<addaction name="actionDownload_graph"/>
<addaction name="actionClear_cache"/>
<addaction name="separator"/>
<addaction name="actionOpen_working_directory"/>
<addaction name="actionPrint_loop_closure_IDs_to_console"/>
<addaction name="separator"/>
<addaction name="actionDelete_memory"/>
<addaction name="actionClear_cache"/>
<addaction name="separator"/>
<addaction name="actionDump_the_memory"/>
<addaction name="actionDump_the_prediction_matrix"/>
<addaction name="actionGenerate_map"/>
<addaction name="actionGenerate_local_map"/>
<addaction name="actionGenerate_TORO_graph_graph"/>
<addaction name="actionPrint_loop_closure_IDs_to_console"/>
<addaction name="separator"/>
<addaction name="actionData_recorder"/>
<addaction name="separator"/>
@@ -777,11 +782,6 @@
<string>Stop</string>
</property>
</action>
<action name="actionApply_settings_to_the_detector">
<property name="text">
<string>Apply settings to detector</string>
</property>
</action>
<action name="actionDump_the_memory">
<property name="text">
<string>Dump the memory</string>
@@ -1068,6 +1068,26 @@
<string>OpenNI2</string>
</property>
</action>
<action name="actionOpen_database">
<property name="text">
<string>Open database...</string>
</property>
</action>
<action name="actionNew_database">
<property name="text">
<string>New database...</string>
</property>
</action>
<action name="actionClose_database">
<property name="text">
<string>Close database</string>
</property>
</action>
<action name="actionEdit_database">
<property name="text">
<string>Edit database...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@@ -65,7 +65,7 @@
<x>0</x>
<y>0</y>
<width>744</width>
<height>1047</height>
<height>905</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -86,7 +86,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>5</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -1948,7 +1948,20 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<property name="title">
<string>RTAB-Map settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0,1">
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1">
<item row="3" column="0">
<widget class="QDoubleSpinBox" name="general_doubleSpinBox_detectionRate_2">
<property name="suffix">
<string> Hz</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="general_checkBox_SLAM_mode_2">
<property name="text">
@@ -1959,7 +1972,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="1">
<widget class="QLabel" name="label_79">
<property name="text">
<string>SLAM mode.
@@ -1980,7 +1993,7 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="1" column="2">
<item row="1" column="1">
<widget class="QLabel" name="label_activateRGBD_2">
<property name="text">
<string>Activate metric RGB-D SLAM.
@@ -2001,7 +2014,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="2" column="2">
<item row="2" column="1">
<widget class="QLabel" name="label_publishStat">
<property name="text">
<string>Publish statistics.</string>
@@ -2011,20 +2024,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QDoubleSpinBox" name="general_doubleSpinBox_detectionRate_2">
<property name="suffix">
<string> Hz</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="2">
<item row="3" column="1">
<widget class="QLabel" name="label_134">
<property name="text">
<string>Detection rate (0 means inf). RTAB-Map will filter input images to satisfy this rate.</string>
@@ -2044,7 +2044,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="4" column="2">
<item row="4" column="1">
<widget class="QLabel" name="label_112">
<property name="text">
<string>Images buffer size (0 means inf).</string>
@@ -2073,7 +2073,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="5" column="2">
<item row="5" column="1">
<widget class="QLabel" name="label_timeLimit_2">
<property name="text">
<string>T_time : Max time (ms) allowed (0 means inf).</string>
@@ -2096,7 +2096,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="6" column="2">
<item row="6" column="1">
<widget class="QLabel" name="label_121">
<property name="text">
<string>T_loop : Loop closure threshold.</string>
@@ -2116,7 +2116,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="7" column="2">
<item row="7" column="1">
<widget class="QLabel" name="label_similarity_2">
<property name="text">
<string>T_similarity : Similarity threshold (for Rehearsal/Weight Update).</string>
@@ -2139,7 +2139,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="8" column="2">
<item row="8" column="1">
<widget class="QLabel" name="label_126">
<property name="text">
<string>STM size : Short-term memory size.</string>
@@ -2149,30 +2149,6 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_databasePath_2">
<property name="text">
<string>Database path.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QToolButton" name="toolButton_databasePath_2">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLineEdit" name="lineEdit_databasePath_2">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -2519,32 +2495,8 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,1">
<layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0">
<item row="0" column="0">
<widget class="QLabel" name="label_databasePath">
<property name="text">
<string>Database path.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="toolButton_databasePath">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="lineEdit_databasePath">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_workingDirectory">
<property name="text">
<string>Working directory (where to put logs/dump stuff).</string>
@@ -2554,14 +2506,14 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
</widget>
</item>
<item row="1" column="1">
<item row="0" column="1">
<widget class="QToolButton" name="toolButton_workingDirectory">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="0" column="2">
<widget class="QLineEdit" name="lineEdit_workingDirectory">
<property name="readOnly">
<bool>true</bool>