mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added parameter Kp/NewWordsComparedTogether for dictionary, always true but when comparing loop closures with Reextracting features, it is set to false to save time.
fixed crash when calling getMap without rtabmap yet initialized. Parameter "LccReextract/LoopClosureFeatures" is now named "LccReextract/Activated" git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1855 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -346,6 +346,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->lineEdit_kp_roi->setObjectName(Parameters::kKpRoiRatios().c_str());
|
||||
_ui->lineEdit_dictionaryPath->setObjectName(Parameters::kKpDictionaryPath().c_str());
|
||||
connect(_ui->toolButton_dictionaryPath, SIGNAL(clicked()), this, SLOT(changeDictionaryPath()));
|
||||
_ui->checkBox_kp_newWordsComparedTogether->setObjectName(Parameters::kKpNewWordsComparedTogether().c_str());
|
||||
|
||||
//SURF detector
|
||||
_ui->surf_doubleSpinBox_hessianThr->setObjectName(Parameters::kSURFHessianThreshold().c_str());
|
||||
@@ -429,7 +430,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->loopClosure_bowMaxDepth->setObjectName(Parameters::kLccBowMaxDepth().c_str());
|
||||
_ui->loopClosure_bowForce2D->setObjectName(Parameters::kLccBowForce2D().c_str());
|
||||
|
||||
_ui->groupBox_reextract->setObjectName(Parameters::kLccReextractLoopClosureFeatures().c_str());
|
||||
_ui->groupBox_reextract->setObjectName(Parameters::kLccReextractActivated().c_str());
|
||||
_ui->reextract_nn->setObjectName(Parameters::kLccReextractNNType().c_str());
|
||||
_ui->reextract_nndrRatio->setObjectName(Parameters::kLccReextractNNDR().c_str());
|
||||
_ui->reextract_type->setObjectName(Parameters::kLccReextractFeatureType().c_str());
|
||||
@@ -1834,64 +1835,57 @@ void PreferencesDialog::setParameter(const std::string & key, const std::string
|
||||
QWidget * obj = _ui->stackedWidget->findChild<QWidget*>(key.c_str());
|
||||
if(obj)
|
||||
{
|
||||
if(obj->isEnabled())
|
||||
QSpinBox * spin = qobject_cast<QSpinBox *>(obj);
|
||||
QDoubleSpinBox * doubleSpin = qobject_cast<QDoubleSpinBox *>(obj);
|
||||
QComboBox * combo = qobject_cast<QComboBox *>(obj);
|
||||
QCheckBox * check = qobject_cast<QCheckBox *>(obj);
|
||||
QRadioButton * radio = qobject_cast<QRadioButton *>(obj);
|
||||
QLineEdit * lineEdit = qobject_cast<QLineEdit *>(obj);
|
||||
QGroupBox * groupBox = qobject_cast<QGroupBox *>(obj);
|
||||
bool ok;
|
||||
if(spin)
|
||||
{
|
||||
QSpinBox * spin = qobject_cast<QSpinBox *>(obj);
|
||||
QDoubleSpinBox * doubleSpin = qobject_cast<QDoubleSpinBox *>(obj);
|
||||
QComboBox * combo = qobject_cast<QComboBox *>(obj);
|
||||
QCheckBox * check = qobject_cast<QCheckBox *>(obj);
|
||||
QRadioButton * radio = qobject_cast<QRadioButton *>(obj);
|
||||
QLineEdit * lineEdit = qobject_cast<QLineEdit *>(obj);
|
||||
QGroupBox * groupBox = qobject_cast<QGroupBox *>(obj);
|
||||
bool ok;
|
||||
if(spin)
|
||||
spin->setValue(QString(value.c_str()).toInt(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
spin->setValue(QString(value.c_str()).toInt(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
else if(doubleSpin)
|
||||
}
|
||||
else if(doubleSpin)
|
||||
{
|
||||
doubleSpin->setValue(QString(value.c_str()).toDouble(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
doubleSpin->setValue(QString(value.c_str()).toDouble(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
else if(combo)
|
||||
}
|
||||
else if(combo)
|
||||
{
|
||||
combo->setCurrentIndex(QString(value.c_str()).toInt(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
combo->setCurrentIndex(QString(value.c_str()).toInt(&ok));
|
||||
if(!ok)
|
||||
{
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
}
|
||||
else if(check)
|
||||
{
|
||||
check->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else if(radio)
|
||||
{
|
||||
radio->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else if(lineEdit)
|
||||
{
|
||||
lineEdit->setText(value.c_str());
|
||||
}
|
||||
else if(groupBox)
|
||||
{
|
||||
groupBox->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_WARN("QObject called %s can't be cast to a supported widget", key.c_str());
|
||||
UERROR("Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
|
||||
}
|
||||
}
|
||||
else if(check)
|
||||
{
|
||||
check->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else if(radio)
|
||||
{
|
||||
radio->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else if(lineEdit)
|
||||
{
|
||||
lineEdit->setText(value.c_str());
|
||||
}
|
||||
else if(groupBox)
|
||||
{
|
||||
groupBox->setChecked(uStr2Bool(value.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
UDEBUG("Ignoring parameter %s because it is disabled.", key.c_str());
|
||||
ULOGGER_WARN("QObject called %s can't be cast to a supported widget", key.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>744</width>
|
||||
<height>1019</height>
|
||||
<height>900</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>24</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -3561,6 +3561,26 @@ When set to false, no new words are added to dictionary, so no more updates are
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_kp_newWordsComparedTogether">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_186">
|
||||
<property name="text">
|
||||
<string>When adding new words to dictionary, they are compared also with each other (to detect same words in the same signature).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user