mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Standalone version: -fixed ICP odometry selection, -install of rtabmap-databaseViewer
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1286 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -77,7 +77,7 @@ public:
|
||||
kSrcVideo
|
||||
};
|
||||
|
||||
enum OdomTest {
|
||||
enum OdomType {
|
||||
kOdomBIN,
|
||||
kOdomBOW,
|
||||
kOdomICP
|
||||
@@ -137,8 +137,7 @@ public:
|
||||
bool isSourceImageUsed() const;
|
||||
bool isSourceDatabaseUsed() const;
|
||||
bool isSourceOpenniUsed() const;
|
||||
bool isSourceOpenniOdometryBIN() const;
|
||||
bool isSourceOpenniOdometryBOW() const;
|
||||
OdomType getOdometryType() const;
|
||||
bool getGeneralAutoRestart() const;
|
||||
bool getGeneralCameraKeypoints() const;
|
||||
int getSourceImageType() const;
|
||||
@@ -217,7 +216,7 @@ private slots:
|
||||
void updateBasicParameter();
|
||||
void openDatabaseViewer();
|
||||
void cleanOdometryTest();
|
||||
void testSourceOdometry();
|
||||
void testOdometry();
|
||||
|
||||
protected:
|
||||
virtual void showEvent ( QShowEvent * event );
|
||||
@@ -252,7 +251,7 @@ private:
|
||||
void addParameters(const QGroupBox * box);
|
||||
QList<QGroupBox*> getGroupBoxes();
|
||||
void readSettingsBegin();
|
||||
void testOdometry(OdomTest test);
|
||||
void testOdometry(OdomType type);
|
||||
|
||||
protected:
|
||||
rtabmap::ParametersMap _parameters;
|
||||
|
||||
@@ -1948,14 +1948,21 @@ void MainWindow::startDetection()
|
||||
delete _odomThread;
|
||||
}
|
||||
Odometry * odom;
|
||||
if(_preferencesDialog->isSourceOpenniOdometryBIN())
|
||||
if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBIN)
|
||||
{
|
||||
UINFO("Using odometry FAST/BRIEF");
|
||||
odom = new OdometryBinary(parameters);
|
||||
}
|
||||
else //BOW
|
||||
else if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBOW)
|
||||
{
|
||||
UINFO("Using odometry SIFT/SURF");
|
||||
odom = new OdometryBOW(parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINFO("Using odometry ICP");
|
||||
odom = new OdometryICP(parameters);
|
||||
}
|
||||
_odomThread = new OdometryThread(odom);
|
||||
|
||||
UEventsManager::addHandler(_odomThread);
|
||||
@@ -2005,14 +2012,21 @@ void MainWindow::startDetection()
|
||||
delete _odomThread;
|
||||
}
|
||||
Odometry * odom;
|
||||
if(_preferencesDialog->isSourceOpenniOdometryBIN())
|
||||
if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBIN)
|
||||
{
|
||||
UINFO("Using odometry FAST/BRIEF");
|
||||
odom = new OdometryBinary(parameters);
|
||||
}
|
||||
else //BOW
|
||||
else if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBOW)
|
||||
{
|
||||
UINFO("Using odometry SIFT/SURF");
|
||||
odom = new OdometryBOW(parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINFO("Using odometry ICP");
|
||||
odom = new OdometryICP(parameters);
|
||||
}
|
||||
_odomThread = new OdometryThread(odom);
|
||||
|
||||
UEventsManager::addHandler(_odomThread);
|
||||
|
||||
@@ -88,7 +88,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->pushButton_saveConfig, SIGNAL(clicked()), this, SLOT(saveConfigTo()));
|
||||
connect(_ui->pushButton_resetConfig, SIGNAL(clicked()), this, SLOT(resetConfig()));
|
||||
connect(_ui->radioButton_basic, SIGNAL(toggled(bool)), this, SLOT(setupTreeView()));
|
||||
connect(_ui->pushButton_testSourceOdometry, SIGNAL(clicked()), this, SLOT(testSourceOdometry()));
|
||||
connect(_ui->pushButton_testOdometry, SIGNAL(clicked()), this, SLOT(testOdometry()));
|
||||
|
||||
// General panel
|
||||
connect(_ui->general_checkBox_imagesKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel()));
|
||||
@@ -2367,13 +2367,18 @@ bool PreferencesDialog::isSourceOpenniUsed() const
|
||||
{
|
||||
return _ui->groupBox_sourceOpenni->isChecked();
|
||||
}
|
||||
bool PreferencesDialog::isSourceOpenniOdometryBOW() const
|
||||
|
||||
PreferencesDialog::OdomType PreferencesDialog::getOdometryType() const
|
||||
{
|
||||
return _ui->odom_type->currentIndex() == 0;
|
||||
}
|
||||
bool PreferencesDialog::isSourceOpenniOdometryBIN() const
|
||||
{
|
||||
return _ui->odom_type->currentIndex() == 1;
|
||||
if(_ui->odom_type->currentIndex() == 0)
|
||||
{
|
||||
return kOdomBOW;
|
||||
}
|
||||
else if(_ui->odom_type->currentIndex() == 1)
|
||||
{
|
||||
return kOdomBIN;
|
||||
}
|
||||
return kOdomICP;
|
||||
}
|
||||
|
||||
bool PreferencesDialog::getGeneralAutoRestart() const
|
||||
@@ -2606,7 +2611,7 @@ void PreferencesDialog::setSLAMMode(bool enabled)
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::testSourceOdometry()
|
||||
void PreferencesDialog::testOdometry()
|
||||
{
|
||||
if(_ui->odom_type->currentIndex() == 0)
|
||||
{
|
||||
@@ -2622,7 +2627,7 @@ void PreferencesDialog::testSourceOdometry()
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::testOdometry(OdomTest test)
|
||||
void PreferencesDialog::testOdometry(OdomType type)
|
||||
{
|
||||
UASSERT(_odomCamera == 0 && _odomThread == 0);
|
||||
|
||||
@@ -2635,11 +2640,11 @@ void PreferencesDialog::testOdometry(OdomTest test)
|
||||
{
|
||||
Odometry * odometry;
|
||||
ParametersMap parameters = this->getAllParameters();
|
||||
if(test == kOdomBIN)
|
||||
if(type == kOdomBIN)
|
||||
{
|
||||
odometry = new OdometryBinary(parameters);
|
||||
}
|
||||
else if(test == kOdomICP)
|
||||
else if(type == kOdomICP)
|
||||
{
|
||||
odometry = new OdometryICP(parameters);
|
||||
}
|
||||
@@ -2653,7 +2658,7 @@ void PreferencesDialog::testOdometry(OdomTest test)
|
||||
QWidget * window = new QWidget(this, Qt::Popup);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose);
|
||||
window->setWindowFlags(Qt::Dialog);
|
||||
window->setWindowTitle(tr("%1 Odometry viewer").arg(test==kOdomBIN?"Binary":"Bag-of-words"));
|
||||
window->setWindowTitle(tr("%1 Odometry viewer").arg(type==kOdomBIN?"Binary":"Bag-of-words"));
|
||||
window->setMinimumWidth(800);
|
||||
window->setMinimumHeight(600);
|
||||
connect( window, SIGNAL(destroyed(QObject*)), this, SLOT(cleanOdometryTest()) );
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>761</width>
|
||||
<height>981</height>
|
||||
<width>777</width>
|
||||
<height>826</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>12</number>
|
||||
<number>15</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -4919,7 +4919,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_147">
|
||||
<property name="text">
|
||||
<string>Brute force nerarest neighbor matching. If false, FLANN LSH index is used.</string>
|
||||
<string>Brute force nearest neighbor matching. If false, FLANN LSH index is used.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -5138,7 +5138,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_testSourceOdometry">
|
||||
<widget class="QPushButton" name="pushButton_testOdometry">
|
||||
<property name="text">
|
||||
<string>Test selected odometry</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user