mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-09 21:10:19 +08:00
Updated error messages in Preferences dialog
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@572 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -1,82 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>rtabmap</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-C ${ProjDirPath}/build VERBOSE=true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>mingw32-make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/RTAB-Map}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>rtabmap</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-C ${ProjDirPath}/build VERBOSE=true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/RTAB-Map}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -193,7 +193,7 @@ protected:
|
||||
virtual void readSettings(const QString & filePath = QString());
|
||||
virtual void readGuiSettings(const QString & filePath = QString());
|
||||
virtual void readCameraSettings(const QString & filePath = QString());
|
||||
virtual void readCoreSettings(const QString & filePath = QString());
|
||||
virtual bool readCoreSettings(const QString & filePath = QString());
|
||||
|
||||
virtual void writeSettings(const QString & filePath = QString());
|
||||
virtual void writeGuiSettings(const QString & filePath = QString());
|
||||
|
||||
@@ -606,7 +606,12 @@ void PreferencesDialog::readSettings(const QString & filePath)
|
||||
ULOGGER_DEBUG("");
|
||||
readGuiSettings(filePath);
|
||||
readCameraSettings(filePath);
|
||||
readCoreSettings(filePath);
|
||||
if(!readCoreSettings(filePath))
|
||||
{
|
||||
_parameters.clear();
|
||||
_obsoletePanels = kPanelDummy;
|
||||
this->reject();
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::readGuiSettings(const QString & filePath)
|
||||
@@ -687,7 +692,7 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
settings.endGroup(); // Database
|
||||
}
|
||||
|
||||
void PreferencesDialog::readCoreSettings(const QString & filePath)
|
||||
bool PreferencesDialog::readCoreSettings(const QString & filePath)
|
||||
{
|
||||
UDEBUG("");
|
||||
QString path = getIniFilePath();
|
||||
@@ -695,6 +700,12 @@ void PreferencesDialog::readCoreSettings(const QString & filePath)
|
||||
{
|
||||
path = filePath;
|
||||
}
|
||||
|
||||
if(!QFile::exists(path))
|
||||
{
|
||||
QMessageBox::information(this, tr("INI file doesn't exist..."), tr("The configuration file \"%1\" does not exist, it will be created with default parameters.").arg(path));
|
||||
}
|
||||
|
||||
QSettings settings(path, QSettings::IniFormat);
|
||||
|
||||
const rtabmap::ParametersMap & parameters = Parameters::getDefaultParameters();
|
||||
@@ -731,6 +742,7 @@ void PreferencesDialog::readCoreSettings(const QString & filePath)
|
||||
}
|
||||
}
|
||||
settings.endGroup(); // Core
|
||||
return true;
|
||||
}
|
||||
|
||||
void PreferencesDialog::saveConfigTo()
|
||||
@@ -927,10 +939,13 @@ void PreferencesDialog::readSettingsEnd()
|
||||
this->readSettings();
|
||||
|
||||
_progressDialog->setValue(1);
|
||||
_progressDialog->setLabelText(tr("Reading GUI settings..."));
|
||||
if(this->isVisible())
|
||||
{
|
||||
_progressDialog->setLabelText(tr("Setup dialog..."));
|
||||
|
||||
this->updatePredictionPlot();
|
||||
this->setupKpRoiPanel();
|
||||
this->updatePredictionPlot();
|
||||
this->setupKpRoiPanel();
|
||||
}
|
||||
|
||||
_progressDialog->setValue(2); // this will make closing...
|
||||
}
|
||||
@@ -1550,7 +1565,12 @@ QList<QGroupBox*> PreferencesDialog::getGroupBoxes()
|
||||
void PreferencesDialog::updatePredictionPlot()
|
||||
{
|
||||
QStringList values = _ui->lineEdit_bayes_predictionLC->text().split(' ');
|
||||
|
||||
if(values.size() < 2)
|
||||
{
|
||||
UERROR("Error parsing prediction (must have at least 2 items) : %s",
|
||||
_ui->lineEdit_bayes_predictionLC->text().toStdString().c_str());
|
||||
return;
|
||||
}
|
||||
QVector<float> dataX((values.size()-2)*2 + 1);
|
||||
QVector<float> dataY((values.size()-2)*2 + 1);
|
||||
double value;
|
||||
|
||||
Reference in New Issue
Block a user