mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added interpolate parameter to util3d::getDepth()
Added Reset calibration button Added Sense 3D scanner input source git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1625 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -228,6 +228,7 @@ private slots:
|
||||
void cleanOdometryTest();
|
||||
void testOdometry();
|
||||
void calibrate();
|
||||
void resetCalibration();
|
||||
|
||||
protected:
|
||||
virtual void showEvent ( QShowEvent * event );
|
||||
|
||||
@@ -297,6 +297,8 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
||||
_ui->actionOpenNI_CV_ASUS->setEnabled(CameraOpenNICV::available());
|
||||
connect(_ui->actionOpenNI2, SIGNAL(triggered()), this, SLOT(selectOpenni2()));
|
||||
_ui->actionOpenNI2->setEnabled(CameraOpenNI2::available());
|
||||
connect(_ui->actionOpenNI2_Sense, SIGNAL(triggered()), this, SLOT(selectOpenni2()));
|
||||
_ui->actionOpenNI2_Sense->setEnabled(CameraOpenNI2::available());
|
||||
|
||||
connect(_ui->actionSave_state, SIGNAL(triggered()), this, SLOT(saveFigures()));
|
||||
connect(_ui->actionLoad_state, SIGNAL(triggered()), this, SLOT(loadFigures()));
|
||||
|
||||
@@ -242,6 +242,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->doubleSpinBox_openniCx, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->doubleSpinBox_openniCy, SIGNAL(valueChanged(double)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->pushButton_calibrate, SIGNAL(clicked()), this, SLOT(calibrate()));
|
||||
connect(_ui->pushButton_calibrate_reset, SIGNAL(clicked()), this, SLOT(resetCalibration()));
|
||||
|
||||
|
||||
//Rtabmap basic
|
||||
@@ -1655,7 +1656,7 @@ void PreferencesDialog::selectSourceRGBD(Src src)
|
||||
tr("Activate RGB-D SLAM?"),
|
||||
tr("You've selected RGB-D camera as source input, "
|
||||
"would you want to activate RGB-D SLAM mode?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
if(button & QMessageBox::Yes)
|
||||
{
|
||||
_ui->general_checkBox_activateRGBD->setChecked(true);
|
||||
@@ -1673,6 +1674,27 @@ void PreferencesDialog::selectSourceRGBD(Src src)
|
||||
{
|
||||
_ui->groupBox_sourceImage->setChecked(false);
|
||||
_ui->groupBox_sourceDatabase->setChecked(false);
|
||||
|
||||
if(_ui->doubleSpinBox_openniFx->value() != 0 ||
|
||||
_ui->doubleSpinBox_openniFy->value() != 0 ||
|
||||
_ui->doubleSpinBox_openniCx->value() != 0 ||
|
||||
_ui->doubleSpinBox_openniCy->value() != 0 )
|
||||
{
|
||||
int button = QMessageBox::information(this,
|
||||
tr("Calibration detected"),
|
||||
tr("Some calibration values (fx=%1, fy=%2, cx=%3, cy=%4) are set.\n"
|
||||
"Do you want to reset them to factory defaults?")
|
||||
.arg(_ui->doubleSpinBox_openniFx->value())
|
||||
.arg(_ui->doubleSpinBox_openniFy->value())
|
||||
.arg(_ui->doubleSpinBox_openniCx->value())
|
||||
.arg(_ui->doubleSpinBox_openniCy->value()),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
if(button & QMessageBox::Yes)
|
||||
{
|
||||
this->resetCalibration();
|
||||
}
|
||||
}
|
||||
|
||||
if(validateForm())
|
||||
{
|
||||
this->writeSettings();
|
||||
@@ -2988,4 +3010,12 @@ void PreferencesDialog::calibrate()
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::resetCalibration()
|
||||
{
|
||||
_ui->doubleSpinBox_openniFx->setValue(0);
|
||||
_ui->doubleSpinBox_openniFy->setValue(0);
|
||||
_ui->doubleSpinBox_openniCx->setValue(0);
|
||||
_ui->doubleSpinBox_openniCy->setValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1012</width>
|
||||
<height>25</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -110,8 +110,15 @@
|
||||
<addaction name="actionOpenNI2"/>
|
||||
<addaction name="actionOpenNI_CV_ASUS"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuSense_3D_scanner">
|
||||
<property name="title">
|
||||
<string>Sense 3D scanner</string>
|
||||
</property>
|
||||
<addaction name="actionOpenNI2_Sense"/>
|
||||
</widget>
|
||||
<addaction name="menuKinect_for_Xbox_360"/>
|
||||
<addaction name="menuXtion_PRO_LIVE"/>
|
||||
<addaction name="menuSense_3D_scanner"/>
|
||||
</widget>
|
||||
<addaction name="menuRGB_D_camera"/>
|
||||
<addaction name="menuImage"/>
|
||||
@@ -1056,6 +1063,11 @@
|
||||
<string>View scans...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenNI2_Sense">
|
||||
<property name="text">
|
||||
<string>OpenNI2</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>732</width>
|
||||
<height>1198</height>
|
||||
<width>736</width>
|
||||
<height>751</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>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -287,14 +287,7 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
||||
<property name="title">
|
||||
<string>Save/load settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_saveConfig">
|
||||
<property name="text">
|
||||
<string>Save settings (*.ini) ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_loadConfig">
|
||||
<property name="text">
|
||||
@@ -302,6 +295,13 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_saveConfig">
|
||||
<property name="text">
|
||||
<string>Save settings (*.ini) ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_resetConfig">
|
||||
<property name="text">
|
||||
@@ -309,6 +309,19 @@ Show a yellow background when the number of odometry inliers goes under this thr
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1821,11 +1834,35 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_calibrate">
|
||||
<property name="text">
|
||||
<string>Calibrate</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_calibrate">
|
||||
<property name="text">
|
||||
<string>Calibrate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_calibrate_reset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user