mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +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
|
kSrcVideo
|
||||||
};
|
};
|
||||||
|
|
||||||
enum OdomTest {
|
enum OdomType {
|
||||||
kOdomBIN,
|
kOdomBIN,
|
||||||
kOdomBOW,
|
kOdomBOW,
|
||||||
kOdomICP
|
kOdomICP
|
||||||
@@ -137,8 +137,7 @@ public:
|
|||||||
bool isSourceImageUsed() const;
|
bool isSourceImageUsed() const;
|
||||||
bool isSourceDatabaseUsed() const;
|
bool isSourceDatabaseUsed() const;
|
||||||
bool isSourceOpenniUsed() const;
|
bool isSourceOpenniUsed() const;
|
||||||
bool isSourceOpenniOdometryBIN() const;
|
OdomType getOdometryType() const;
|
||||||
bool isSourceOpenniOdometryBOW() const;
|
|
||||||
bool getGeneralAutoRestart() const;
|
bool getGeneralAutoRestart() const;
|
||||||
bool getGeneralCameraKeypoints() const;
|
bool getGeneralCameraKeypoints() const;
|
||||||
int getSourceImageType() const;
|
int getSourceImageType() const;
|
||||||
@@ -217,7 +216,7 @@ private slots:
|
|||||||
void updateBasicParameter();
|
void updateBasicParameter();
|
||||||
void openDatabaseViewer();
|
void openDatabaseViewer();
|
||||||
void cleanOdometryTest();
|
void cleanOdometryTest();
|
||||||
void testSourceOdometry();
|
void testOdometry();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent ( QShowEvent * event );
|
virtual void showEvent ( QShowEvent * event );
|
||||||
@@ -252,7 +251,7 @@ private:
|
|||||||
void addParameters(const QGroupBox * box);
|
void addParameters(const QGroupBox * box);
|
||||||
QList<QGroupBox*> getGroupBoxes();
|
QList<QGroupBox*> getGroupBoxes();
|
||||||
void readSettingsBegin();
|
void readSettingsBegin();
|
||||||
void testOdometry(OdomTest test);
|
void testOdometry(OdomType type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
rtabmap::ParametersMap _parameters;
|
rtabmap::ParametersMap _parameters;
|
||||||
|
|||||||
@@ -1948,14 +1948,21 @@ void MainWindow::startDetection()
|
|||||||
delete _odomThread;
|
delete _odomThread;
|
||||||
}
|
}
|
||||||
Odometry * odom;
|
Odometry * odom;
|
||||||
if(_preferencesDialog->isSourceOpenniOdometryBIN())
|
if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBIN)
|
||||||
{
|
{
|
||||||
|
UINFO("Using odometry FAST/BRIEF");
|
||||||
odom = new OdometryBinary(parameters);
|
odom = new OdometryBinary(parameters);
|
||||||
}
|
}
|
||||||
else //BOW
|
else if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBOW)
|
||||||
{
|
{
|
||||||
|
UINFO("Using odometry SIFT/SURF");
|
||||||
odom = new OdometryBOW(parameters);
|
odom = new OdometryBOW(parameters);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UINFO("Using odometry ICP");
|
||||||
|
odom = new OdometryICP(parameters);
|
||||||
|
}
|
||||||
_odomThread = new OdometryThread(odom);
|
_odomThread = new OdometryThread(odom);
|
||||||
|
|
||||||
UEventsManager::addHandler(_odomThread);
|
UEventsManager::addHandler(_odomThread);
|
||||||
@@ -2005,14 +2012,21 @@ void MainWindow::startDetection()
|
|||||||
delete _odomThread;
|
delete _odomThread;
|
||||||
}
|
}
|
||||||
Odometry * odom;
|
Odometry * odom;
|
||||||
if(_preferencesDialog->isSourceOpenniOdometryBIN())
|
if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBIN)
|
||||||
{
|
{
|
||||||
|
UINFO("Using odometry FAST/BRIEF");
|
||||||
odom = new OdometryBinary(parameters);
|
odom = new OdometryBinary(parameters);
|
||||||
}
|
}
|
||||||
else //BOW
|
else if(_preferencesDialog->getOdometryType() == PreferencesDialog::kOdomBOW)
|
||||||
{
|
{
|
||||||
|
UINFO("Using odometry SIFT/SURF");
|
||||||
odom = new OdometryBOW(parameters);
|
odom = new OdometryBOW(parameters);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UINFO("Using odometry ICP");
|
||||||
|
odom = new OdometryICP(parameters);
|
||||||
|
}
|
||||||
_odomThread = new OdometryThread(odom);
|
_odomThread = new OdometryThread(odom);
|
||||||
|
|
||||||
UEventsManager::addHandler(_odomThread);
|
UEventsManager::addHandler(_odomThread);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
connect(_ui->pushButton_saveConfig, SIGNAL(clicked()), this, SLOT(saveConfigTo()));
|
connect(_ui->pushButton_saveConfig, SIGNAL(clicked()), this, SLOT(saveConfigTo()));
|
||||||
connect(_ui->pushButton_resetConfig, SIGNAL(clicked()), this, SLOT(resetConfig()));
|
connect(_ui->pushButton_resetConfig, SIGNAL(clicked()), this, SLOT(resetConfig()));
|
||||||
connect(_ui->radioButton_basic, SIGNAL(toggled(bool)), this, SLOT(setupTreeView()));
|
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
|
// General panel
|
||||||
connect(_ui->general_checkBox_imagesKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel()));
|
connect(_ui->general_checkBox_imagesKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel()));
|
||||||
@@ -2367,13 +2367,18 @@ bool PreferencesDialog::isSourceOpenniUsed() const
|
|||||||
{
|
{
|
||||||
return _ui->groupBox_sourceOpenni->isChecked();
|
return _ui->groupBox_sourceOpenni->isChecked();
|
||||||
}
|
}
|
||||||
bool PreferencesDialog::isSourceOpenniOdometryBOW() const
|
|
||||||
|
PreferencesDialog::OdomType PreferencesDialog::getOdometryType() const
|
||||||
{
|
{
|
||||||
return _ui->odom_type->currentIndex() == 0;
|
if(_ui->odom_type->currentIndex() == 0)
|
||||||
}
|
{
|
||||||
bool PreferencesDialog::isSourceOpenniOdometryBIN() const
|
return kOdomBOW;
|
||||||
{
|
}
|
||||||
return _ui->odom_type->currentIndex() == 1;
|
else if(_ui->odom_type->currentIndex() == 1)
|
||||||
|
{
|
||||||
|
return kOdomBIN;
|
||||||
|
}
|
||||||
|
return kOdomICP;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PreferencesDialog::getGeneralAutoRestart() const
|
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)
|
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);
|
UASSERT(_odomCamera == 0 && _odomThread == 0);
|
||||||
|
|
||||||
@@ -2635,11 +2640,11 @@ void PreferencesDialog::testOdometry(OdomTest test)
|
|||||||
{
|
{
|
||||||
Odometry * odometry;
|
Odometry * odometry;
|
||||||
ParametersMap parameters = this->getAllParameters();
|
ParametersMap parameters = this->getAllParameters();
|
||||||
if(test == kOdomBIN)
|
if(type == kOdomBIN)
|
||||||
{
|
{
|
||||||
odometry = new OdometryBinary(parameters);
|
odometry = new OdometryBinary(parameters);
|
||||||
}
|
}
|
||||||
else if(test == kOdomICP)
|
else if(type == kOdomICP)
|
||||||
{
|
{
|
||||||
odometry = new OdometryICP(parameters);
|
odometry = new OdometryICP(parameters);
|
||||||
}
|
}
|
||||||
@@ -2653,7 +2658,7 @@ void PreferencesDialog::testOdometry(OdomTest test)
|
|||||||
QWidget * window = new QWidget(this, Qt::Popup);
|
QWidget * window = new QWidget(this, Qt::Popup);
|
||||||
window->setAttribute(Qt::WA_DeleteOnClose);
|
window->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
window->setWindowFlags(Qt::Dialog);
|
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->setMinimumWidth(800);
|
||||||
window->setMinimumHeight(600);
|
window->setMinimumHeight(600);
|
||||||
connect( window, SIGNAL(destroyed(QObject*)), this, SLOT(cleanOdometryTest()) );
|
connect( window, SIGNAL(destroyed(QObject*)), this, SLOT(cleanOdometryTest()) );
|
||||||
|
|||||||
@@ -64,8 +64,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>761</width>
|
<width>777</width>
|
||||||
<height>981</height>
|
<height>826</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>12</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_22">
|
<widget class="QWidget" name="page_22">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
<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">
|
<item row="3" column="1">
|
||||||
<widget class="QLabel" name="label_147">
|
<widget class="QLabel" name="label_147">
|
||||||
<property name="text">
|
<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>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -5138,7 +5138,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_testSourceOdometry">
|
<widget class="QPushButton" name="pushButton_testOdometry">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Test selected odometry</string>
|
<string>Test selected odometry</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ TARGET_LINK_LIBRARIES(databaseViewer rtabmap_core rtabmap_gui rtabmap_utilite ${
|
|||||||
SET_TARGET_PROPERTIES( databaseViewer
|
SET_TARGET_PROPERTIES( databaseViewer
|
||||||
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-databaseViewer)
|
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-databaseViewer)
|
||||||
|
|
||||||
|
INSTALL(TARGETS databaseViewer
|
||||||
|
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT runtime
|
||||||
|
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" COMPONENT runtime)
|
||||||
|
|||||||
Reference in New Issue
Block a user