33 #include <QtCore/QSettings> 34 #include <QtCore/QDir> 35 #include <QtCore/QTimer> 38 #include <QButtonGroup> 39 #include <QFileDialog> 40 #include <QInputDialog> 41 #include <QMessageBox> 42 #include <QtGui/QStandardItemModel> 43 #include <QMainWindow> 44 #include <QProgressDialog> 47 #include <QDesktopServices> 48 #include <QtGui/QCloseEvent> 50 #include "ui_preferencesDialog.h" 52 #include "rtabmap/core/Version.h" 85 #include <opencv2/opencv_modules.hpp> 86 #if CV_MAJOR_VERSION < 3 87 #ifdef HAVE_OPENCV_GPU 88 #include <opencv2/gpu/gpu.hpp> 91 #ifdef HAVE_OPENCV_CUDAFEATURES2D 92 #include <opencv2/core/cuda.hpp> 102 _obsoletePanels(kPanelDummy),
106 _progressDialog(new QProgressDialog(this)),
118 _ui =
new Ui_preferencesDialog();
121 bool haveCuda =
false;
122 #if CV_MAJOR_VERSION < 3 123 #ifdef HAVE_OPENCV_GPU 124 haveCuda = cv::gpu::getCudaEnabledDeviceCount() != 0;
127 #ifdef HAVE_OPENCV_CUDAFEATURES2D 128 haveCuda = cv::cuda::getCudaEnabledDeviceCount() != 0;
133 _ui->surf_checkBox_gpuVersion->setChecked(
false);
134 _ui->surf_checkBox_gpuVersion->setEnabled(
false);
135 _ui->label_surf_checkBox_gpuVersion->setEnabled(
false);
136 _ui->surf_doubleSpinBox_gpuKeypointsRatio->setEnabled(
false);
137 _ui->label_surf_checkBox_gpuKeypointsRatio->setEnabled(
false);
139 _ui->fastGpu->setChecked(
false);
140 _ui->fastGpu->setEnabled(
false);
141 _ui->label_fastGPU->setEnabled(
false);
142 _ui->fastKeypointRatio->setEnabled(
false);
143 _ui->label_fastGPUKptRatio->setEnabled(
false);
145 _ui->checkBox_ORBGpu->setChecked(
false);
146 _ui->checkBox_ORBGpu->setEnabled(
false);
147 _ui->label_orbGpu->setEnabled(
false);
150 _ui->comboBox_dictionary_strategy->setItemData(4, 0, Qt::UserRole - 1);
151 _ui->reextract_nn->setItemData(4, 0, Qt::UserRole - 1);
154 #ifndef RTABMAP_OCTOMAP 155 _ui->groupBox_octomap->setChecked(
false);
156 _ui->groupBox_octomap->setEnabled(
false);
159 #ifndef RTABMAP_REALSENSE_SLAM 160 _ui->checkbox_realsenseOdom->setChecked(
false);
161 _ui->checkbox_realsenseOdom->setEnabled(
false);
162 _ui->label_realsenseOdom->setEnabled(
false);
165 #ifndef RTABMAP_FOVIS 166 _ui->odom_strategy->setItemData(2, 0, Qt::UserRole - 1);
168 #ifndef RTABMAP_VISO2 169 _ui->odom_strategy->setItemData(3, 0, Qt::UserRole - 1);
172 _ui->odom_strategy->setItemData(4, 0, Qt::UserRole - 1);
174 #ifndef RTABMAP_ORB_SLAM2 175 _ui->odom_strategy->setItemData(5, 0, Qt::UserRole - 1);
177 #ifndef RTABMAP_OKVIS 178 _ui->odom_strategy->setItemData(6, 0, Qt::UserRole - 1);
181 _ui->odom_strategy->setItemData(7, 0, Qt::UserRole - 1);
183 #ifndef RTABMAP_MSCKF_VIO 184 _ui->odom_strategy->setItemData(8, 0, Qt::UserRole - 1);
187 _ui->odom_strategy->setItemData(9, 0, Qt::UserRole - 1);
190 #if CV_MAJOR_VERSION < 3 191 _ui->stereosgbm_mode->setItemData(2, 0, Qt::UserRole - 1);
195 #ifndef RTABMAP_NONFREE 196 _ui->comboBox_detector_strategy->setItemData(0, 0, Qt::UserRole - 1);
197 _ui->comboBox_detector_strategy->setItemData(12, 0, Qt::UserRole - 1);
198 _ui->comboBox_detector_strategy->setItemData(14, 0, Qt::UserRole - 1);
199 _ui->vis_feature_detector->setItemData(0, 0, Qt::UserRole - 1);
200 _ui->vis_feature_detector->setItemData(12, 0, Qt::UserRole - 1);
201 _ui->vis_feature_detector->setItemData(14, 0, Qt::UserRole - 1);
205 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) 206 #ifndef RTABMAP_NONFREE 207 _ui->comboBox_detector_strategy->setItemData(1, 0, Qt::UserRole - 1);
208 _ui->vis_feature_detector->setItemData(1, 0, Qt::UserRole - 1);
212 #if CV_MAJOR_VERSION >= 3 && !defined(HAVE_OPENCV_XFEATURES2D) 213 _ui->comboBox_detector_strategy->setItemData(3, 0, Qt::UserRole - 1);
214 _ui->comboBox_detector_strategy->setItemData(4, 0, Qt::UserRole - 1);
215 _ui->comboBox_detector_strategy->setItemData(5, 0, Qt::UserRole - 1);
216 _ui->comboBox_detector_strategy->setItemData(6, 0, Qt::UserRole - 1);
217 _ui->comboBox_detector_strategy->setItemData(12, 0, Qt::UserRole - 1);
218 _ui->comboBox_detector_strategy->setItemData(13, 0, Qt::UserRole - 1);
219 _ui->comboBox_detector_strategy->setItemData(14, 0, Qt::UserRole - 1);
220 _ui->vis_feature_detector->setItemData(3, 0, Qt::UserRole - 1);
221 _ui->vis_feature_detector->setItemData(4, 0, Qt::UserRole - 1);
222 _ui->vis_feature_detector->setItemData(5, 0, Qt::UserRole - 1);
223 _ui->vis_feature_detector->setItemData(6, 0, Qt::UserRole - 1);
224 _ui->vis_feature_detector->setItemData(12, 0, Qt::UserRole - 1);
225 _ui->vis_feature_detector->setItemData(13, 0, Qt::UserRole - 1);
226 _ui->vis_feature_detector->setItemData(14, 0, Qt::UserRole - 1);
229 #ifndef RTABMAP_ORB_OCTREE 230 _ui->comboBox_detector_strategy->setItemData(10, 0, Qt::UserRole - 1);
231 _ui->vis_feature_detector->setItemData(10, 0, Qt::UserRole - 1);
234 #ifndef RTABMAP_SUPERPOINT_TORCH 235 _ui->comboBox_detector_strategy->setItemData(11, 0, Qt::UserRole - 1);
236 _ui->vis_feature_detector->setItemData(11, 0, Qt::UserRole - 1);
239 #ifndef RTABMAP_PYMATCHER 240 _ui->reextract_nn->setItemData(6, 0, Qt::UserRole - 1);
243 #if !defined(HAVE_OPENCV_XFEATURES2D) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION<4 || CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<1)) 244 _ui->reextract_nn->setItemData(7, 0, Qt::UserRole - 1);
247 #if CV_MAJOR_VERSION >= 3 248 _ui->groupBox_fast_opencv2->setEnabled(
false);
250 _ui->comboBox_detector_strategy->setItemData(9, 0, Qt::UserRole - 1);
251 _ui->comboBox_detector_strategy->setItemData(13, 0, Qt::UserRole - 1);
252 _ui->comboBox_detector_strategy->setItemData(14, 0, Qt::UserRole - 1);
253 _ui->vis_feature_detector->setItemData(9, 0, Qt::UserRole - 1);
254 _ui->vis_feature_detector->setItemData(13, 0, Qt::UserRole - 1);
255 _ui->vis_feature_detector->setItemData(14, 0, Qt::UserRole - 1);
258 _ui->comboBox_cameraImages_odomFormat->setItemData(4, 0, Qt::UserRole - 1);
259 _ui->comboBox_cameraImages_gtFormat->setItemData(4, 0, Qt::UserRole - 1);
262 _ui->graphOptimization_type->setItemData(1, 0, Qt::UserRole - 1);
263 _ui->odom_f2m_bundleStrategy->setItemData(1, 0, Qt::UserRole - 1);
264 _ui->loopClosure_bundle->setItemData(1, 0, Qt::UserRole - 1);
265 _ui->groupBoxx_g2o->setEnabled(
false);
267 #ifdef RTABMAP_ORB_SLAM2 271 _ui->graphOptimization_type->setItemData(1, 0, Qt::UserRole - 1);
276 _ui->comboBox_g2o_solver->setItemData(0, 0, Qt::UserRole - 1);
280 _ui->comboBox_g2o_solver->setItemData(2, 0, Qt::UserRole - 1);
284 _ui->graphOptimization_type->setItemData(0, 0, Qt::UserRole - 1);
288 _ui->graphOptimization_type->setItemData(2, 0, Qt::UserRole - 1);
292 _ui->odom_f2m_bundleStrategy->setItemData(2, 0, Qt::UserRole - 1);
293 _ui->loopClosure_bundle->setItemData(2, 0, Qt::UserRole - 1);
297 _ui->graphOptimization_type->setItemData(3, 0, Qt::UserRole - 1);
298 _ui->odom_f2m_bundleStrategy->setItemData(3, 0, Qt::UserRole - 1);
299 _ui->loopClosure_bundle->setItemData(3, 0, Qt::UserRole - 1);
301 #ifdef RTABMAP_VERTIGO 305 _ui->graphOptimization_robust->setEnabled(
false);
307 #ifndef RTABMAP_POINTMATCHER 308 _ui->groupBox_libpointmatcher->setEnabled(
false);
371 #if PCL_VERSION_COMPARE(<, 1, 7, 2) 372 _ui->checkBox_showFrustums->setEnabled(
false);
373 _ui->checkBox_showFrustums->setChecked(
false);
374 _ui->checkBox_showOdomFrustums->setEnabled(
false);
375 _ui->checkBox_showOdomFrustums->setChecked(
false);
379 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION <4 || (CV_MINOR_VERSION ==4 && CV_SUBMINOR_VERSION<2))) 380 _ui->ArucoDictionary->setItemData(17, 0, Qt::UserRole - 1);
381 _ui->ArucoDictionary->setItemData(18, 0, Qt::UserRole - 1);
382 _ui->ArucoDictionary->setItemData(19, 0, Qt::UserRole - 1);
383 _ui->ArucoDictionary->setItemData(20, 0, Qt::UserRole - 1);
385 #ifndef HAVE_OPENCV_ARUCO 386 _ui->label_markerDetection->setText(
_ui->label_markerDetection->text()+
" This option works only if OpenCV has been built with \"aruco\" module.");
389 #ifndef RTABMAP_MADGWICK 390 _ui->comboBox_imuFilter_strategy->setItemData(1, 0, Qt::UserRole - 1);
394 UASSERT(
_ui->odom_registration->count() == 4);
404 _ui->predictionPlot->showLegend(
false);
406 QButtonGroup * buttonGroup =
new QButtonGroup(
this);
407 buttonGroup->addButton(
_ui->radioButton_basic);
408 buttonGroup->addButton(
_ui->radioButton_advanced);
411 connect(
_ui->buttonBox_global, SIGNAL(
clicked(QAbstractButton *)),
this, SLOT(
closeDialog(QAbstractButton *)));
412 connect(
_ui->buttonBox_local, SIGNAL(
clicked(QAbstractButton *)),
this, SLOT(
resetApply(QAbstractButton *)));
416 connect(
_ui->radioButton_basic, SIGNAL(toggled(
bool)),
this, SLOT(
setupTreeView()));
526 for(
int i=0; i<2; ++i)
604 _ui->comboBox_loggerFilter->SetDisplayText(
"Select:");
609 connect(
_ui->general_doubleSpinBox_imgRate, SIGNAL(valueChanged(
double)),
_ui->doubleSpinBox_OdomORBSLAM2Fps, SLOT(setValue(
double)));
613 _ui->stackedWidget_src->setCurrentIndex(
_ui->comboBox_sourceType->currentIndex());
614 connect(
_ui->comboBox_sourceType, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_src, SLOT(setCurrentIndex(
int)));
620 _ui->stackedWidget_image->setCurrentIndex(
_ui->source_comboBox_image_type->currentIndex());
621 connect(
_ui->source_comboBox_image_type, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_image, SLOT(setCurrentIndex(
int)));
648 connect(
_ui->source_checkBox_stereoToDepthDB, SIGNAL(toggled(
bool)),
_ui->checkbox_stereo_depthGenerated, SLOT(setChecked(
bool)));
649 connect(
_ui->checkbox_stereo_depthGenerated, SIGNAL(toggled(
bool)),
_ui->source_checkBox_stereoToDepthDB, SLOT(setChecked(
bool)));
652 _ui->stackedWidget_rgbd->setCurrentIndex(
_ui->comboBox_cameraRGBD->currentIndex());
653 connect(
_ui->comboBox_cameraRGBD, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_rgbd, SLOT(setCurrentIndex(
int)));
655 _ui->stackedWidget_stereo->setCurrentIndex(
_ui->comboBox_cameraStereo->currentIndex());
656 connect(
_ui->comboBox_cameraStereo, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_stereo, SLOT(setCurrentIndex(
int)));
699 connect(
_ui->lineEdit_cameraRGBDImages_path_rgb, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
700 connect(
_ui->lineEdit_cameraRGBDImages_path_depth, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
708 connect(
_ui->lineEdit_cameraImages_laser_transform, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
716 connect(
_ui->lineEdit_cameraImages_imu_transform, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
726 connect(
_ui->lineEdit_cameraStereoImages_path_left, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
727 connect(
_ui->lineEdit_cameraStereoImages_path_right, SIGNAL(textChanged(
const QString &)),
this, SLOT(
makeObsoleteSourcePanel()));
786 connect(
_ui->comboBox_imuFilter_strategy, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_imuFilter, SLOT(setCurrentIndex(
int)));
787 _ui->stackedWidget_imuFilter->setCurrentIndex(
_ui->comboBox_imuFilter_strategy->currentIndex());
797 connect(
_ui->doubleSpinBox_source_scanNormalsForceGroundUp, SIGNAL(valueChanged(
double)),
this, SLOT(
makeObsoleteSourcePanel()));
801 connect(
_ui->general_doubleSpinBox_timeThr, SIGNAL(valueChanged(
double)),
_ui->general_doubleSpinBox_timeThr_2, SLOT(setValue(
double)));
802 connect(
_ui->general_doubleSpinBox_hardThr, SIGNAL(valueChanged(
double)),
_ui->general_doubleSpinBox_hardThr_2, SLOT(setValue(
double)));
803 connect(
_ui->doubleSpinBox_similarityThreshold, SIGNAL(valueChanged(
double)),
_ui->doubleSpinBox_similarityThreshold_2, SLOT(setValue(
double)));
804 connect(
_ui->general_doubleSpinBox_detectionRate, SIGNAL(valueChanged(
double)),
_ui->general_doubleSpinBox_detectionRate_2, SLOT(setValue(
double)));
805 connect(
_ui->general_spinBox_imagesBufferSize, SIGNAL(valueChanged(
int)),
_ui->general_spinBox_imagesBufferSize_2, SLOT(setValue(
int)));
806 connect(
_ui->general_spinBox_maxStMemSize, SIGNAL(valueChanged(
int)),
_ui->general_spinBox_maxStMemSize_2, SLOT(setValue(
int)));
810 connect(
_ui->doubleSpinBox_similarityThreshold_2, SIGNAL(editingFinished()),
this, SLOT(
updateBasicParameter()));
811 connect(
_ui->general_doubleSpinBox_detectionRate_2, SIGNAL(editingFinished()),
this, SLOT(
updateBasicParameter()));
812 connect(
_ui->general_spinBox_imagesBufferSize_2, SIGNAL(editingFinished()),
this, SLOT(
updateBasicParameter()));
823 _ui->groupBox_publishing->setObjectName(Parameters::kRtabmapPublishStats().c_str());
824 _ui->general_checkBox_publishRawData->setObjectName(Parameters::kRtabmapPublishLastSignature().c_str());
825 _ui->general_checkBox_publishPdf->setObjectName(Parameters::kRtabmapPublishPdf().c_str());
826 _ui->general_checkBox_publishLikelihood->setObjectName(Parameters::kRtabmapPublishLikelihood().c_str());
827 _ui->general_checkBox_publishRMSE->setObjectName(Parameters::kRtabmapComputeRMSE().c_str());
828 _ui->general_checkBox_saveWMState->setObjectName(Parameters::kRtabmapSaveWMState().c_str());
829 _ui->general_checkBox_publishRAM->setObjectName(Parameters::kRtabmapPublishRAMUsage().c_str());
830 _ui->general_checkBox_statisticLogsBufferedInRAM->setObjectName(Parameters::kRtabmapStatisticLogsBufferedInRAM().c_str());
831 _ui->groupBox_statistics->setObjectName(Parameters::kRtabmapStatisticLogged().c_str());
832 _ui->general_checkBox_statisticLoggedHeaders->setObjectName(Parameters::kRtabmapStatisticLoggedHeaders().c_str());
833 _ui->general_doubleSpinBox_timeThr->setObjectName(Parameters::kRtabmapTimeThr().c_str());
834 _ui->general_spinBox_memoryThr->setObjectName(Parameters::kRtabmapMemoryThr().c_str());
835 _ui->general_doubleSpinBox_detectionRate->setObjectName(Parameters::kRtabmapDetectionRate().c_str());
836 _ui->general_spinBox_imagesBufferSize->setObjectName(Parameters::kRtabmapImageBufferSize().c_str());
837 _ui->general_checkBox_createIntermediateNodes->setObjectName(Parameters::kRtabmapCreateIntermediateNodes().c_str());
838 _ui->general_spinBox_maxRetrieved->setObjectName(Parameters::kRtabmapMaxRetrieved().c_str());
839 _ui->general_checkBox_startNewMapOnLoopClosure->setObjectName(Parameters::kRtabmapStartNewMapOnLoopClosure().c_str());
840 _ui->general_checkBox_startNewMapOnGoodSignature->setObjectName(Parameters::kRtabmapStartNewMapOnGoodSignature().c_str());
841 _ui->general_checkBox_imagesAlreadyRectified->setObjectName(Parameters::kRtabmapImagesAlreadyRectified().c_str());
842 _ui->general_checkBox_rectifyOnlyFeatures->setObjectName(Parameters::kRtabmapRectifyOnlyFeatures().c_str());
843 _ui->checkBox_rtabmap_loopGPS->setObjectName(Parameters::kRtabmapLoopGPS().c_str());
844 _ui->lineEdit_workingDirectory->setObjectName(Parameters::kRtabmapWorkingDirectory().c_str());
848 _ui->general_checkBox_keepRawData->setObjectName(Parameters::kMemImageKept().c_str());
849 _ui->general_checkBox_keepBinaryData->setObjectName(Parameters::kMemBinDataKept().c_str());
850 _ui->general_checkBox_saveIntermediateNodeData->setObjectName(Parameters::kMemIntermediateNodeDataKept().c_str());
851 _ui->lineEdit_rgbCompressionFormat->setObjectName(Parameters::kMemImageCompressionFormat().c_str());
852 _ui->general_checkBox_keepDescriptors->setObjectName(Parameters::kMemRawDescriptorsKept().c_str());
853 _ui->general_checkBox_saveDepth16bits->setObjectName(Parameters::kMemSaveDepth16Format().c_str());
854 _ui->general_checkBox_compressionParallelized->setObjectName(Parameters::kMemCompressionParallelized().c_str());
855 _ui->general_checkBox_reduceGraph->setObjectName(Parameters::kMemReduceGraph().c_str());
856 _ui->general_checkBox_keepNotLinkedNodes->setObjectName(Parameters::kMemNotLinkedNodesKept().c_str());
857 _ui->general_spinBox_maxStMemSize->setObjectName(Parameters::kMemSTMSize().c_str());
858 _ui->doubleSpinBox_similarityThreshold->setObjectName(Parameters::kMemRehearsalSimilarity().c_str());
859 _ui->general_checkBox_SLAM_mode->setObjectName(Parameters::kMemIncrementalMemory().c_str());
860 _ui->general_checkBox_saveLocalizationData->setObjectName(Parameters::kMemLocalizationDataSaved().c_str());
861 _ui->general_doubleSpinBox_recentWmRatio->setObjectName(Parameters::kMemRecentWmRatio().c_str());
862 _ui->general_checkBox_transferSortingByWeightId->setObjectName(Parameters::kMemTransferSortingByWeightId().c_str());
863 _ui->general_checkBox_RehearsalIdUpdatedToNewOne->setObjectName(Parameters::kMemRehearsalIdUpdatedToNewOne().c_str());
864 _ui->general_checkBox_generateIds->setObjectName(Parameters::kMemGenerateIds().c_str());
865 _ui->general_checkBox_badSignaturesIgnored->setObjectName(Parameters::kMemBadSignaturesIgnored().c_str());
866 _ui->general_checkBox_createMapLabels->setObjectName(Parameters::kMemMapLabelsAdded().c_str());
867 _ui->general_checkBox_initWMWithAllNodes->setObjectName(Parameters::kMemInitWMWithAllNodes().c_str());
868 _ui->checkBox_localSpaceScanMatchingIDsSaved->setObjectName(Parameters::kRGBDScanMatchingIdsSavedInLinks().c_str());
869 _ui->spinBox_imagePreDecimation->setObjectName(Parameters::kMemImagePreDecimation().c_str());
870 _ui->spinBox_imagePostDecimation->setObjectName(Parameters::kMemImagePostDecimation().c_str());
871 _ui->general_spinBox_laserScanDownsample->setObjectName(Parameters::kMemLaserScanDownsampleStepSize().c_str());
872 _ui->general_doubleSpinBox_laserScanVoxelSize->setObjectName(Parameters::kMemLaserScanVoxelSize().c_str());
873 _ui->general_spinBox_laserScanNormalK->setObjectName(Parameters::kMemLaserScanNormalK().c_str());
874 _ui->general_doubleSpinBox_laserScanNormalRadius->setObjectName(Parameters::kMemLaserScanNormalRadius().c_str());
875 _ui->checkBox_useOdomFeatures->setObjectName(Parameters::kMemUseOdomFeatures().c_str());
876 _ui->memCovOffDiagIgnored->setObjectName(Parameters::kMemCovOffDiagIgnored().c_str());
879 _ui->checkBox_dbInMemory->setObjectName(Parameters::kDbSqlite3InMemory().c_str());
880 _ui->spinBox_dbCacheSize->setObjectName(Parameters::kDbSqlite3CacheSize().c_str());
881 _ui->comboBox_dbJournalMode->setObjectName(Parameters::kDbSqlite3JournalMode().c_str());
882 _ui->comboBox_dbSynchronous->setObjectName(Parameters::kDbSqlite3Synchronous().c_str());
883 _ui->comboBox_dbTempStore->setObjectName(Parameters::kDbSqlite3TempStore().c_str());
884 _ui->lineEdit_targetDatabaseVersion->setObjectName(Parameters::kDbTargetVersion().c_str());
888 _ui->general_doubleSpinBox_hardThr->setObjectName(Parameters::kRtabmapLoopThr().c_str());
889 _ui->general_doubleSpinBox_loopRatio->setObjectName(Parameters::kRtabmapLoopRatio().c_str());
892 _ui->general_doubleSpinBox_vp->setObjectName(Parameters::kBayesVirtualPlacePriorThr().c_str());
893 _ui->lineEdit_bayes_predictionLC->setObjectName(Parameters::kBayesPredictionLC().c_str());
894 _ui->checkBox_bayes_fullPredictionUpdate->setObjectName(Parameters::kBayesFullPredictionUpdate().c_str());
895 connect(
_ui->lineEdit_bayes_predictionLC, SIGNAL(textChanged(
const QString &)),
this, SLOT(
updatePredictionPlot()));
898 _ui->comboBox_dictionary_strategy->setObjectName(Parameters::kKpNNStrategy().c_str());
899 _ui->checkBox_dictionary_incremental->setObjectName(Parameters::kKpIncrementalDictionary().c_str());
900 _ui->checkBox_kp_incrementalFlann->setObjectName(Parameters::kKpIncrementalFlann().c_str());
901 _ui->checkBox_kp_byteToFloat->setObjectName(Parameters::kKpByteToFloat().c_str());
902 _ui->surf_doubleSpinBox_rebalancingFactor->setObjectName(Parameters::kKpFlannRebalancingFactor().c_str());
903 _ui->comboBox_detector_strategy->setObjectName(Parameters::kKpDetectorStrategy().c_str());
904 _ui->surf_doubleSpinBox_nndrRatio->setObjectName(Parameters::kKpNndrRatio().c_str());
905 _ui->surf_doubleSpinBox_maxDepth->setObjectName(Parameters::kKpMaxDepth().c_str());
906 _ui->surf_doubleSpinBox_minDepth->setObjectName(Parameters::kKpMinDepth().c_str());
907 _ui->checkBox_memDepthAsMask->setObjectName(Parameters::kMemDepthAsMask().c_str());
908 _ui->checkBox_memStereoFromMotion->setObjectName(Parameters::kMemStereoFromMotion().c_str());
909 _ui->surf_spinBox_wordsPerImageTarget->setObjectName(Parameters::kKpMaxFeatures().c_str());
910 _ui->spinBox_KPGridRows->setObjectName(Parameters::kKpGridRows().c_str());
911 _ui->spinBox_KPGridCols->setObjectName(Parameters::kKpGridCols().c_str());
912 _ui->surf_doubleSpinBox_ratioBadSign->setObjectName(Parameters::kKpBadSignRatio().c_str());
913 _ui->checkBox_kp_tfIdfLikelihoodUsed->setObjectName(Parameters::kKpTfIdfLikelihoodUsed().c_str());
914 _ui->checkBox_kp_parallelized->setObjectName(Parameters::kKpParallelized().c_str());
915 _ui->lineEdit_kp_roi->setObjectName(Parameters::kKpRoiRatios().c_str());
916 _ui->lineEdit_dictionaryPath->setObjectName(Parameters::kKpDictionaryPath().c_str());
918 _ui->checkBox_kp_newWordsComparedTogether->setObjectName(Parameters::kKpNewWordsComparedTogether().c_str());
919 _ui->subpix_winSize_kp->setObjectName(Parameters::kKpSubPixWinSize().c_str());
920 _ui->subpix_iterations_kp->setObjectName(Parameters::kKpSubPixIterations().c_str());
921 _ui->subpix_eps_kp->setObjectName(Parameters::kKpSubPixEps().c_str());
923 _ui->subpix_winSize->setObjectName(Parameters::kKpSubPixWinSize().c_str());
924 _ui->subpix_iterations->setObjectName(Parameters::kKpSubPixIterations().c_str());
925 _ui->subpix_eps->setObjectName(Parameters::kKpSubPixEps().c_str());
928 _ui->surf_doubleSpinBox_hessianThr->setObjectName(Parameters::kSURFHessianThreshold().c_str());
929 _ui->surf_spinBox_octaves->setObjectName(Parameters::kSURFOctaves().c_str());
930 _ui->surf_spinBox_octaveLayers->setObjectName(Parameters::kSURFOctaveLayers().c_str());
931 _ui->checkBox_surfExtended->setObjectName(Parameters::kSURFExtended().c_str());
932 _ui->surf_checkBox_upright->setObjectName(Parameters::kSURFUpright().c_str());
933 _ui->surf_checkBox_gpuVersion->setObjectName(Parameters::kSURFGpuVersion().c_str());
934 _ui->surf_doubleSpinBox_gpuKeypointsRatio->setObjectName(Parameters::kSURFGpuKeypointsRatio().c_str());
937 _ui->sift_spinBox_nFeatures->setObjectName(Parameters::kSIFTNFeatures().c_str());
938 _ui->sift_spinBox_nOctaveLayers->setObjectName(Parameters::kSIFTNOctaveLayers().c_str());
939 _ui->sift_doubleSpinBox_contrastThr->setObjectName(Parameters::kSIFTContrastThreshold().c_str());
940 _ui->sift_doubleSpinBox_edgeThr->setObjectName(Parameters::kSIFTEdgeThreshold().c_str());
941 _ui->sift_doubleSpinBox_sigma->setObjectName(Parameters::kSIFTSigma().c_str());
942 _ui->sift_checkBox_rootsift->setObjectName(Parameters::kSIFTRootSIFT().c_str());
945 _ui->briefBytes->setObjectName(Parameters::kBRIEFBytes().c_str());
948 _ui->fastSuppressNonMax->setObjectName(Parameters::kFASTNonmaxSuppression().c_str());
949 _ui->fastThreshold->setObjectName(Parameters::kFASTThreshold().c_str());
950 _ui->fastThresholdMin->setObjectName(Parameters::kFASTMinThreshold().c_str());
951 _ui->fastThresholdMax->setObjectName(Parameters::kFASTMaxThreshold().c_str());
952 _ui->fastGridRows->setObjectName(Parameters::kFASTGridRows().c_str());
953 _ui->fastGridCols->setObjectName(Parameters::kFASTGridCols().c_str());
954 _ui->fastGpu->setObjectName(Parameters::kFASTGpu().c_str());
955 _ui->fastKeypointRatio->setObjectName(Parameters::kFASTGpuKeypointsRatio().c_str());
956 _ui->fastCV->setObjectName(Parameters::kFASTCV().c_str());
959 _ui->doubleSpinBox_ORBScaleFactor->setObjectName(Parameters::kORBScaleFactor().c_str());
960 _ui->spinBox_ORBNLevels->setObjectName(Parameters::kORBNLevels().c_str());
961 _ui->spinBox_ORBEdgeThreshold->setObjectName(Parameters::kORBEdgeThreshold().c_str());
962 _ui->spinBox_ORBFirstLevel->setObjectName(Parameters::kORBFirstLevel().c_str());
963 _ui->spinBox_ORBWTA_K->setObjectName(Parameters::kORBWTA_K().c_str());
964 _ui->spinBox_ORBScoreType->setObjectName(Parameters::kORBScoreType().c_str());
965 _ui->spinBox_ORBPatchSize->setObjectName(Parameters::kORBPatchSize().c_str());
966 _ui->checkBox_ORBGpu->setObjectName(Parameters::kORBGpu().c_str());
969 _ui->checkBox_FREAKOrientationNormalized->setObjectName(Parameters::kFREAKOrientationNormalized().c_str());
970 _ui->checkBox_FREAKScaleNormalized->setObjectName(Parameters::kFREAKScaleNormalized().c_str());
971 _ui->doubleSpinBox_FREAKPatternScale->setObjectName(Parameters::kFREAKPatternScale().c_str());
972 _ui->spinBox_FREAKNOctaves->setObjectName(Parameters::kFREAKNOctaves().c_str());
975 _ui->doubleSpinBox_GFTT_qualityLevel->setObjectName(Parameters::kGFTTQualityLevel().c_str());
976 _ui->doubleSpinBox_GFTT_minDistance->setObjectName(Parameters::kGFTTMinDistance().c_str());
977 _ui->spinBox_GFTT_blockSize->setObjectName(Parameters::kGFTTBlockSize().c_str());
978 _ui->checkBox_GFTT_useHarrisDetector->setObjectName(Parameters::kGFTTUseHarrisDetector().c_str());
979 _ui->doubleSpinBox_GFTT_k->setObjectName(Parameters::kGFTTK().c_str());
982 _ui->spinBox_BRISK_thresh->setObjectName(Parameters::kBRISKThresh().c_str());
983 _ui->spinBox_BRISK_octaves->setObjectName(Parameters::kBRISKOctaves().c_str());
984 _ui->doubleSpinBox_BRISK_patterScale->setObjectName(Parameters::kBRISKPatternScale().c_str());
987 _ui->checkBox_kaze_extended->setObjectName(Parameters::kKAZEExtended().c_str());
988 _ui->checkBox_kaze_upright->setObjectName(Parameters::kKAZEUpright().c_str());
989 _ui->doubleSpinBox_kaze_threshold->setObjectName(Parameters::kKAZEThreshold().c_str());
990 _ui->spinBox_kaze_octaves->setObjectName(Parameters::kKAZENOctaves().c_str());
991 _ui->spinBox_kaze_octavelayers->setObjectName(Parameters::kKAZENOctaveLayers().c_str());
992 _ui->spinBox_kaze_diffusivity->setObjectName(Parameters::kKAZEDiffusivity().c_str());
995 _ui->lineEdit_sptorch_path->setObjectName(Parameters::kSuperPointModelPath().c_str());
997 _ui->doubleSpinBox_sptorch_threshold->setObjectName(Parameters::kSuperPointThreshold().c_str());
998 _ui->checkBox_sptorch_nms->setObjectName(Parameters::kSuperPointNMS().c_str());
999 _ui->spinBox_sptorch_minDistance->setObjectName(Parameters::kSuperPointNMSRadius().c_str());
1000 _ui->checkBox_sptorch_cuda->setObjectName(Parameters::kSuperPointCuda().c_str());
1003 _ui->lineEdit_pymatcher_path->setObjectName(Parameters::kPyMatcherPath().c_str());
1005 _ui->pymatcher_matchThreshold->setObjectName(Parameters::kPyMatcherThreshold().c_str());
1006 _ui->pymatcher_iterations->setObjectName(Parameters::kPyMatcherIterations().c_str());
1007 _ui->checkBox_pymatcher_cuda->setObjectName(Parameters::kPyMatcherCuda().c_str());
1008 _ui->lineEdit_pymatcher_model->setObjectName(Parameters::kPyMatcherModel().c_str());
1012 _ui->checkBox_gms_withRotation->setObjectName(Parameters::kGMSWithRotation().c_str());
1013 _ui->checkBox_gms_withScale->setObjectName(Parameters::kGMSWithScale().c_str());
1014 _ui->gms_thresholdFactor->setObjectName(Parameters::kGMSThresholdFactor().c_str());
1017 _ui->groupBox_vh_epipolar2->setObjectName(Parameters::kVhEpEnabled().c_str());
1018 _ui->surf_spinBox_matchCountMinAccepted->setObjectName(Parameters::kVhEpMatchCountMin().c_str());
1019 _ui->surf_doubleSpinBox_ransacParam1->setObjectName(Parameters::kVhEpRansacParam1().c_str());
1020 _ui->surf_doubleSpinBox_ransacParam2->setObjectName(Parameters::kVhEpRansacParam2().c_str());
1023 _ui->general_checkBox_activateRGBD->setObjectName(Parameters::kRGBDEnabled().c_str());
1024 _ui->rgdb_linearUpdate->setObjectName(Parameters::kRGBDLinearUpdate().c_str());
1025 _ui->rgdb_angularUpdate->setObjectName(Parameters::kRGBDAngularUpdate().c_str());
1026 _ui->rgdb_linearSpeedUpdate->setObjectName(Parameters::kRGBDLinearSpeedUpdate().c_str());
1027 _ui->rgdb_angularSpeedUpdate->setObjectName(Parameters::kRGBDAngularSpeedUpdate().c_str());
1028 _ui->rgbd_savedLocalizationIgnored->setObjectName(Parameters::kRGBDSavedLocalizationIgnored().c_str());
1029 _ui->rgdb_rehearsalWeightIgnoredWhileMoving->setObjectName(Parameters::kMemRehearsalWeightIgnoredWhileMoving().c_str());
1030 _ui->rgdb_newMapOdomChange->setObjectName(Parameters::kRGBDNewMapOdomChangeDistance().c_str());
1031 _ui->odomScanHistory->setObjectName(Parameters::kRGBDNeighborLinkRefining().c_str());
1032 _ui->odomGravity->setObjectName(Parameters::kMemUseOdomGravity().c_str());
1033 _ui->spinBox_maxLocalLocationsRetrieved->setObjectName(Parameters::kRGBDMaxLocalRetrieved().c_str());
1034 _ui->rgbd_loopCovLimited->setObjectName(Parameters::kRGBDLoopCovLimited().c_str());
1036 _ui->graphOptimization_type->setObjectName(Parameters::kOptimizerStrategy().c_str());
1037 _ui->graphOptimization_iterations->setObjectName(Parameters::kOptimizerIterations().c_str());
1038 _ui->graphOptimization_covarianceIgnored->setObjectName(Parameters::kOptimizerVarianceIgnored().c_str());
1039 _ui->graphOptimization_fromGraphEnd->setObjectName(Parameters::kRGBDOptimizeFromGraphEnd().c_str());
1040 _ui->graphOptimization_maxError->setObjectName(Parameters::kRGBDOptimizeMaxError().c_str());
1041 _ui->graphOptimization_gravitySigma->setObjectName(Parameters::kOptimizerGravitySigma().c_str());
1042 _ui->graphOptimization_stopEpsilon->setObjectName(Parameters::kOptimizerEpsilon().c_str());
1043 _ui->graphOptimization_robust->setObjectName(Parameters::kOptimizerRobust().c_str());
1044 _ui->graphOptimization_priorsIgnored->setObjectName(Parameters::kOptimizerPriorsIgnored().c_str());
1045 _ui->graphOptimization_landmarksIgnored->setObjectName(Parameters::kOptimizerLandmarksIgnored().c_str());
1047 _ui->comboBox_g2o_solver->setObjectName(Parameters::kg2oSolver().c_str());
1048 _ui->comboBox_g2o_optimizer->setObjectName(Parameters::kg2oOptimizer().c_str());
1049 _ui->doubleSpinBox_g2o_pixelVariance->setObjectName(Parameters::kg2oPixelVariance().c_str());
1050 _ui->doubleSpinBox_g2o_robustKernelDelta->setObjectName(Parameters::kg2oRobustKernelDelta().c_str());
1051 _ui->doubleSpinBox_g2o_baseline->setObjectName(Parameters::kg2oBaseline().c_str());
1053 _ui->comboBox_gtsam_optimizer->setObjectName(Parameters::kGTSAMOptimizer().c_str());
1055 _ui->graphPlan_goalReachedRadius->setObjectName(Parameters::kRGBDGoalReachedRadius().c_str());
1056 _ui->graphPlan_goalsSavedInUserData->setObjectName(Parameters::kRGBDGoalsSavedInUserData().c_str());
1057 _ui->graphPlan_stuckIterations->setObjectName(Parameters::kRGBDPlanStuckIterations().c_str());
1058 _ui->graphPlan_linearVelocity->setObjectName(Parameters::kRGBDPlanLinearVelocity().c_str());
1059 _ui->graphPlan_angularVelocity->setObjectName(Parameters::kRGBDPlanAngularVelocity().c_str());
1061 _ui->groupBox_localDetection_time->setObjectName(Parameters::kRGBDProximityByTime().c_str());
1062 _ui->groupBox_localDetection_space->setObjectName(Parameters::kRGBDProximityBySpace().c_str());
1063 _ui->localDetection_radius->setObjectName(Parameters::kRGBDLocalRadius().c_str());
1064 _ui->maxLocalizationDistance->setObjectName(Parameters::kRGBDMaxLoopClosureDistance().c_str());
1065 _ui->localDetection_maxDiffID->setObjectName(Parameters::kRGBDProximityMaxGraphDepth().c_str());
1066 _ui->localDetection_maxNeighbors->setObjectName(Parameters::kRGBDProximityPathMaxNeighbors().c_str());
1067 _ui->localDetection_maxPaths->setObjectName(Parameters::kRGBDProximityMaxPaths().c_str());
1068 _ui->localDetection_pathFilteringRadius->setObjectName(Parameters::kRGBDProximityPathFilteringRadius().c_str());
1069 _ui->localDetection_angle->setObjectName(Parameters::kRGBDProximityAngle().c_str());
1070 _ui->checkBox_localSpaceOdomGuess->setObjectName(Parameters::kRGBDProximityOdomGuess().c_str());
1071 _ui->checkBox_localSpacePathOdomPosesUsed->setObjectName(Parameters::kRGBDProximityPathRawPosesUsed().c_str());
1072 _ui->rgdb_localImmunizationRatio->setObjectName(Parameters::kRGBDLocalImmunizationRatio().c_str());
1073 _ui->loopClosure_reextract->setObjectName(Parameters::kRGBDLoopClosureReextractFeatures().c_str());
1074 _ui->loopClosure_bunlde->setObjectName(Parameters::kRGBDLocalBundleOnLoopClosure().c_str());
1075 _ui->checkbox_rgbd_createOccupancyGrid->setObjectName(Parameters::kRGBDCreateOccupancyGrid().c_str());
1076 _ui->RGBDMarkerDetection->setObjectName(Parameters::kRGBDMarkerDetection().c_str());
1077 _ui->spinBox_maxOdomCacheSize->setObjectName(Parameters::kRGBDMaxOdomCacheSize().c_str());
1080 _ui->reg_repeatOnce->setObjectName(Parameters::kRegRepeatOnce().c_str());
1081 _ui->comboBox_registrationStrategy->setObjectName(Parameters::kRegStrategy().c_str());
1082 _ui->loopClosure_bowForce2D->setObjectName(Parameters::kRegForce3DoF().c_str());
1085 _ui->loopClosure_bowMinInliers->setObjectName(Parameters::kVisMinInliers().c_str());
1086 _ui->loopClosure_bowInlierDistance->setObjectName(Parameters::kVisInlierDistance().c_str());
1087 _ui->loopClosure_bowIterations->setObjectName(Parameters::kVisIterations().c_str());
1088 _ui->loopClosure_bowRefineIterations->setObjectName(Parameters::kVisRefineIterations().c_str());
1089 _ui->visMeanDistance->setObjectName(Parameters::kVisMeanInliersDistance().c_str());
1090 _ui->visMinDistribution->setObjectName(Parameters::kVisMinInliersDistribution().c_str());
1091 _ui->loopClosure_estimationType->setObjectName(Parameters::kVisEstimationType().c_str());
1092 connect(
_ui->loopClosure_estimationType, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_loopClosureEstimation, SLOT(setCurrentIndex(
int)));
1093 _ui->stackedWidget_loopClosureEstimation->setCurrentIndex(Parameters::defaultVisEstimationType());
1094 _ui->loopClosure_forwardEst->setObjectName(Parameters::kVisForwardEstOnly().c_str());
1095 _ui->loopClosure_bowEpipolarGeometryVar->setObjectName(Parameters::kVisEpipolarGeometryVar().c_str());
1096 _ui->loopClosure_pnpReprojError->setObjectName(Parameters::kVisPnPReprojError().c_str());
1097 _ui->loopClosure_pnpFlags->setObjectName(Parameters::kVisPnPFlags().c_str());
1098 _ui->loopClosure_pnpRefineIterations->setObjectName(Parameters::kVisPnPRefineIterations().c_str());
1099 _ui->reextract_nn->setObjectName(Parameters::kVisCorNNType().c_str());
1101 _ui->reextract_nndrRatio->setObjectName(Parameters::kVisCorNNDR().c_str());
1102 _ui->spinBox_visCorGuessWinSize->setObjectName(Parameters::kVisCorGuessWinSize().c_str());
1103 _ui->checkBox__visCorGuessMatchToProjection->setObjectName(Parameters::kVisCorGuessMatchToProjection().c_str());
1104 _ui->vis_feature_detector->setObjectName(Parameters::kVisFeatureType().c_str());
1105 _ui->reextract_maxFeatures->setObjectName(Parameters::kVisMaxFeatures().c_str());
1106 _ui->reextract_gridrows->setObjectName(Parameters::kVisGridRows().c_str());
1107 _ui->reextract_gridcols->setObjectName(Parameters::kVisGridCols().c_str());
1108 _ui->loopClosure_bowMaxDepth->setObjectName(Parameters::kVisMaxDepth().c_str());
1109 _ui->loopClosure_bowMinDepth->setObjectName(Parameters::kVisMinDepth().c_str());
1110 _ui->checkBox_visDepthAsMask->setObjectName(Parameters::kVisDepthAsMask().c_str());
1111 _ui->loopClosure_roi->setObjectName(Parameters::kVisRoiRatios().c_str());
1112 _ui->subpix_winSize->setObjectName(Parameters::kVisSubPixWinSize().c_str());
1113 _ui->subpix_iterations->setObjectName(Parameters::kVisSubPixIterations().c_str());
1114 _ui->subpix_eps->setObjectName(Parameters::kVisSubPixEps().c_str());
1115 _ui->odom_flow_winSize_2->setObjectName(Parameters::kVisCorFlowWinSize().c_str());
1116 _ui->odom_flow_maxLevel_2->setObjectName(Parameters::kVisCorFlowMaxLevel().c_str());
1117 _ui->odom_flow_iterations_2->setObjectName(Parameters::kVisCorFlowIterations().c_str());
1118 _ui->odom_flow_eps_2->setObjectName(Parameters::kVisCorFlowEps().c_str());
1119 _ui->loopClosure_bundle->setObjectName(Parameters::kVisBundleAdjustment().c_str());
1122 _ui->globalDetection_icpMaxTranslation->setObjectName(Parameters::kIcpMaxTranslation().c_str());
1123 _ui->globalDetection_icpMaxRotation->setObjectName(Parameters::kIcpMaxRotation().c_str());
1124 _ui->loopClosure_icpVoxelSize->setObjectName(Parameters::kIcpVoxelSize().c_str());
1125 _ui->loopClosure_icpDownsamplingStep->setObjectName(Parameters::kIcpDownsamplingStep().c_str());
1126 _ui->loopClosure_icpRangeMin->setObjectName(Parameters::kIcpRangeMin().c_str());
1127 _ui->loopClosure_icpRangeMax->setObjectName(Parameters::kIcpRangeMax().c_str());
1128 _ui->loopClosure_icpMaxCorrespondenceDistance->setObjectName(Parameters::kIcpMaxCorrespondenceDistance().c_str());
1129 _ui->loopClosure_icpIterations->setObjectName(Parameters::kIcpIterations().c_str());
1130 _ui->loopClosure_icpEpsilon->setObjectName(Parameters::kIcpEpsilon().c_str());
1131 _ui->loopClosure_icpRatio->setObjectName(Parameters::kIcpCorrespondenceRatio().c_str());
1132 _ui->loopClosure_icpPointToPlane->setObjectName(Parameters::kIcpPointToPlane().c_str());
1133 _ui->loopClosure_icpPointToPlaneNormals->setObjectName(Parameters::kIcpPointToPlaneK().c_str());
1134 _ui->loopClosure_icpPointToPlaneNormalsRadius->setObjectName(Parameters::kIcpPointToPlaneRadius().c_str());
1135 _ui->loopClosure_icpPointToPlaneGroundNormalsUp->setObjectName(Parameters::kIcpPointToPlaneGroundNormalsUp().c_str());
1136 _ui->loopClosure_icpPointToPlaneNormalsMinComplexity->setObjectName(Parameters::kIcpPointToPlaneMinComplexity().c_str());
1137 _ui->loopClosure_icpPointToPlaneLowComplexityStrategy->setObjectName(Parameters::kIcpPointToPlaneLowComplexityStrategy().c_str());
1139 _ui->groupBox_libpointmatcher->setObjectName(Parameters::kIcpPM().c_str());
1140 _ui->lineEdit_IcpPMConfigPath->setObjectName(Parameters::kIcpPMConfig().c_str());
1142 _ui->doubleSpinBox_icpPMOutlierRatio->setObjectName(Parameters::kIcpPMOutlierRatio().c_str());
1143 _ui->spinBox_icpPMMatcherKnn->setObjectName(Parameters::kIcpPMMatcherKnn().c_str());
1144 _ui->doubleSpinBox_icpPMMatcherEpsilon->setObjectName(Parameters::kIcpPMMatcherEpsilon().c_str());
1145 _ui->loopClosure_icpPMMatcherIntensity->setObjectName(Parameters::kIcpPMMatcherIntensity().c_str());
1148 _ui->groupBox_grid_3d->setObjectName(Parameters::kGrid3D().c_str());
1149 _ui->checkBox_grid_groundObstacle->setObjectName(Parameters::kGridGroundIsObstacle().c_str());
1150 _ui->doubleSpinBox_grid_resolution->setObjectName(Parameters::kGridCellSize().c_str());
1151 _ui->checkBox_grid_preVoxelFiltering->setObjectName(Parameters::kGridPreVoxelFiltering().c_str());
1152 _ui->spinBox_grid_decimation->setObjectName(Parameters::kGridDepthDecimation().c_str());
1153 _ui->doubleSpinBox_grid_maxDepth->setObjectName(Parameters::kGridRangeMax().c_str());
1154 _ui->doubleSpinBox_grid_minDepth->setObjectName(Parameters::kGridRangeMin().c_str());
1155 _ui->lineEdit_grid_roi->setObjectName(Parameters::kGridDepthRoiRatios().c_str());
1156 _ui->checkBox_grid_projRayTracing->setObjectName(Parameters::kGridRayTracing().c_str());
1157 _ui->doubleSpinBox_grid_footprintLength->setObjectName(Parameters::kGridFootprintLength().c_str());
1158 _ui->doubleSpinBox_grid_footprintWidth->setObjectName(Parameters::kGridFootprintWidth().c_str());
1159 _ui->doubleSpinBox_grid_footprintHeight->setObjectName(Parameters::kGridFootprintHeight().c_str());
1160 _ui->checkBox_grid_flatObstaclesDetected->setObjectName(Parameters::kGridFlatObstacleDetected().c_str());
1161 _ui->groupBox_grid_fromDepthImage->setObjectName(Parameters::kGridFromDepth().c_str());
1162 _ui->checkBox_grid_projMapFrame->setObjectName(Parameters::kGridMapFrameProjection().c_str());
1163 _ui->doubleSpinBox_grid_maxGroundAngle->setObjectName(Parameters::kGridMaxGroundAngle().c_str());
1164 _ui->spinBox_grid_normalK->setObjectName(Parameters::kGridNormalK().c_str());
1165 _ui->doubleSpinBox_grid_maxGroundHeight->setObjectName(Parameters::kGridMaxGroundHeight().c_str());
1166 _ui->doubleSpinBox_grid_maxObstacleHeight->setObjectName(Parameters::kGridMaxObstacleHeight().c_str());
1167 _ui->doubleSpinBox_grid_clusterRadius->setObjectName(Parameters::kGridClusterRadius().c_str());
1168 _ui->spinBox_grid_minClusterSize->setObjectName(Parameters::kGridMinClusterSize().c_str());
1169 _ui->doubleSpinBox_grid_minGroundHeight->setObjectName(Parameters::kGridMinGroundHeight().c_str());
1170 _ui->spinBox_grid_noiseMinNeighbors->setObjectName(Parameters::kGridNoiseFilteringMinNeighbors().c_str());
1171 _ui->doubleSpinBox_grid_noiseRadius->setObjectName(Parameters::kGridNoiseFilteringRadius().c_str());
1172 _ui->groupBox_grid_normalsSegmentation->setObjectName(Parameters::kGridNormalsSegmentation().c_str());
1173 _ui->checkBox_grid_unknownSpaceFilled->setObjectName(Parameters::kGridScan2dUnknownSpaceFilled().c_str());
1174 _ui->spinBox_grid_scanDecimation->setObjectName(Parameters::kGridScanDecimation().c_str());
1176 _ui->checkBox_grid_fullUpdate->setObjectName(Parameters::kGridGlobalFullUpdate().c_str());
1177 _ui->doubleSpinBox_grid_updateError->setObjectName(Parameters::kGridGlobalUpdateError().c_str());
1178 _ui->doubleSpinBox_grid_minMapSize->setObjectName(Parameters::kGridGlobalMinSize().c_str());
1179 _ui->spinBox_grid_maxNodes->setObjectName(Parameters::kGridGlobalMaxNodes().c_str());
1180 _ui->doubleSpinBox_grid_footprintRadius->setObjectName(Parameters::kGridGlobalFootprintRadius().c_str());
1181 _ui->doubleSpinBox_grid_occThr->setObjectName(Parameters::kGridGlobalOccupancyThr().c_str());
1182 _ui->doubleSpinBox_grid_probHit->setObjectName(Parameters::kGridGlobalProbHit().c_str());
1183 _ui->doubleSpinBox_grid_probMiss->setObjectName(Parameters::kGridGlobalProbMiss().c_str());
1184 _ui->doubleSpinBox_grid_clampingMin->setObjectName(Parameters::kGridGlobalProbClampingMin().c_str());
1185 _ui->doubleSpinBox_grid_clampingMax->setObjectName(Parameters::kGridGlobalProbClampingMax().c_str());
1186 _ui->checkBox_grid_erode->setObjectName(Parameters::kGridGlobalEroded().c_str());
1189 _ui->odom_strategy->setObjectName(Parameters::kOdomStrategy().c_str());
1190 connect(
_ui->odom_strategy, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_odometryType, SLOT(setCurrentIndex(
int)));
1191 _ui->odom_strategy->setCurrentIndex(Parameters::defaultOdomStrategy());
1192 _ui->stackedWidget_odometryType->setCurrentIndex(Parameters::defaultOdomStrategy());
1193 _ui->odom_countdown->setObjectName(Parameters::kOdomResetCountdown().c_str());
1194 _ui->odom_holonomic->setObjectName(Parameters::kOdomHolonomic().c_str());
1195 _ui->odom_fillInfoData->setObjectName(Parameters::kOdomFillInfoData().c_str());
1196 _ui->odom_dataBufferSize->setObjectName(Parameters::kOdomImageBufferSize().c_str());
1197 _ui->odom_flow_keyframeThr->setObjectName(Parameters::kOdomKeyFrameThr().c_str());
1198 _ui->odom_VisKeyFrameThr->setObjectName(Parameters::kOdomVisKeyFrameThr().c_str());
1199 _ui->odom_flow_scanKeyframeThr->setObjectName(Parameters::kOdomScanKeyFrameThr().c_str());
1200 _ui->odom_flow_guessMotion->setObjectName(Parameters::kOdomGuessMotion().c_str());
1201 _ui->odom_guess_smoothing_delay->setObjectName(Parameters::kOdomGuessSmoothingDelay().c_str());
1202 _ui->odom_imageDecimation->setObjectName(Parameters::kOdomImageDecimation().c_str());
1203 _ui->odom_alignWithGround->setObjectName(Parameters::kOdomAlignWithGround().c_str());
1206 _ui->odom_localHistory->setObjectName(Parameters::kOdomF2MMaxSize().c_str());
1207 _ui->spinBox_odom_f2m_maxNewFeatures->setObjectName(Parameters::kOdomF2MMaxNewFeatures().c_str());
1208 _ui->spinBox_odom_f2m_scanMaxSize->setObjectName(Parameters::kOdomF2MScanMaxSize().c_str());
1209 _ui->doubleSpinBox_odom_f2m_scanRadius->setObjectName(Parameters::kOdomF2MScanSubtractRadius().c_str());
1210 _ui->doubleSpinBox_odom_f2m_scanAngle->setObjectName(Parameters::kOdomF2MScanSubtractAngle().c_str());
1211 _ui->doubleSpinBox_odom_f2m_scanRange->setObjectName(Parameters::kOdomF2MScanRange().c_str());
1212 _ui->odom_f2m_validDepthRatio->setObjectName(Parameters::kOdomF2MValidDepthRatio().c_str());
1213 _ui->odom_f2m_bundleStrategy->setObjectName(Parameters::kOdomF2MBundleAdjustment().c_str());
1214 _ui->odom_f2m_bundleMaxFrames->setObjectName(Parameters::kOdomF2MBundleAdjustmentMaxFrames().c_str());
1217 _ui->comboBox_odomf2f_corType->setObjectName(Parameters::kVisCorType().c_str());
1220 _ui->doubleSpinBox_minFlow->setObjectName(Parameters::kOdomMonoInitMinFlow().c_str());
1221 _ui->doubleSpinBox_minInitTranslation->setObjectName(Parameters::kOdomMonoInitMinTranslation().c_str());
1222 _ui->doubleSpinBox_minTranslation->setObjectName(Parameters::kOdomMonoMinTranslation().c_str());
1223 _ui->doubleSpinBox_maxVariance->setObjectName(Parameters::kOdomMonoMaxVariance().c_str());
1226 _ui->odom_filteringStrategy->setObjectName(Parameters::kOdomFilteringStrategy().c_str());
1227 _ui->stackedWidget_odometryFiltering->setCurrentIndex(
_ui->odom_filteringStrategy->currentIndex());
1228 connect(
_ui->odom_filteringStrategy, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_odometryFiltering, SLOT(setCurrentIndex(
int)));
1229 _ui->spinBox_particleSize->setObjectName(Parameters::kOdomParticleSize().c_str());
1230 _ui->doubleSpinBox_particleNoiseT->setObjectName(Parameters::kOdomParticleNoiseT().c_str());
1231 _ui->doubleSpinBox_particleLambdaT->setObjectName(Parameters::kOdomParticleLambdaT().c_str());
1232 _ui->doubleSpinBox_particleNoiseR->setObjectName(Parameters::kOdomParticleNoiseR().c_str());
1233 _ui->doubleSpinBox_particleLambdaR->setObjectName(Parameters::kOdomParticleLambdaR().c_str());
1236 _ui->doubleSpinBox_kalmanProcessNoise->setObjectName(Parameters::kOdomKalmanProcessNoise().c_str());
1237 _ui->doubleSpinBox_kalmanMeasurementNoise->setObjectName(Parameters::kOdomKalmanMeasurementNoise().c_str());
1240 _ui->spinBox_OdomFovisFeatureWindowSize->setObjectName(Parameters::kOdomFovisFeatureWindowSize().c_str());
1241 _ui->spinBox_OdomFovisMaxPyramidLevel->setObjectName(Parameters::kOdomFovisMaxPyramidLevel().c_str());
1242 _ui->spinBox_OdomFovisMinPyramidLevel->setObjectName(Parameters::kOdomFovisMinPyramidLevel().c_str());
1243 _ui->spinBox_OdomFovisTargetPixelsPerFeature->setObjectName(Parameters::kOdomFovisTargetPixelsPerFeature().c_str());
1244 _ui->spinBox_OdomFovisFastThreshold->setObjectName(Parameters::kOdomFovisFastThreshold().c_str());
1245 _ui->checkBox_OdomFovisUseAdaptiveThreshold->setObjectName(Parameters::kOdomFovisUseAdaptiveThreshold().c_str());
1246 _ui->doubleSpinBox_OdomFovisFastThresholdAdaptiveGain->setObjectName(Parameters::kOdomFovisFastThresholdAdaptiveGain().c_str());
1247 _ui->checkBox_OdomFovisUseHomographyInitialization->setObjectName(Parameters::kOdomFovisUseHomographyInitialization().c_str());
1249 _ui->checkBox_OdomFovisUseBucketing->setObjectName(Parameters::kOdomFovisUseBucketing().c_str());
1250 _ui->spinBox_OdomFovisBucketWidth->setObjectName(Parameters::kOdomFovisBucketWidth().c_str());
1251 _ui->spinBox_OdomFovisBucketHeight->setObjectName(Parameters::kOdomFovisBucketHeight().c_str());
1252 _ui->spinBox_OdomFovisMaxKeypointsPerBucket->setObjectName(Parameters::kOdomFovisMaxKeypointsPerBucket().c_str());
1253 _ui->checkBox_OdomFovisUseImageNormalization->setObjectName(Parameters::kOdomFovisUseImageNormalization().c_str());
1255 _ui->doubleSpinBox_OdomFovisInlierMaxReprojectionError->setObjectName(Parameters::kOdomFovisInlierMaxReprojectionError().c_str());
1256 _ui->doubleSpinBox_OdomFovisCliqueInlierThreshold->setObjectName(Parameters::kOdomFovisCliqueInlierThreshold().c_str());
1257 _ui->spinBox_OdomFovisMinFeaturesForEstimate->setObjectName(Parameters::kOdomFovisMinFeaturesForEstimate().c_str());
1258 _ui->doubleSpinBox_OdomFovisMaxMeanReprojectionError->setObjectName(Parameters::kOdomFovisMaxMeanReprojectionError().c_str());
1259 _ui->checkBox_OdomFovisUseSubpixelRefinement->setObjectName(Parameters::kOdomFovisUseSubpixelRefinement().c_str());
1260 _ui->spinBox_OdomFovisFeatureSearchWindow->setObjectName(Parameters::kOdomFovisFeatureSearchWindow().c_str());
1261 _ui->checkBox_OdomFovisUpdateTargetFeaturesWithRefined->setObjectName(Parameters::kOdomFovisUpdateTargetFeaturesWithRefined().c_str());
1263 _ui->checkBox_OdomFovisStereoRequireMutualMatch->setObjectName(Parameters::kOdomFovisStereoRequireMutualMatch().c_str());
1264 _ui->doubleSpinBox_OdomFovisStereoMaxDistEpipolarLine->setObjectName(Parameters::kOdomFovisStereoMaxDistEpipolarLine().c_str());
1265 _ui->doubleSpinBox_OdomFovisStereoMaxRefinementDisplacement->setObjectName(Parameters::kOdomFovisStereoMaxRefinementDisplacement().c_str());
1266 _ui->spinBox_OdomFovisStereoMaxDisparity->setObjectName(Parameters::kOdomFovisStereoMaxDisparity().c_str());
1269 _ui->spinBox_OdomViso2RansacIters->setObjectName(Parameters::kOdomViso2RansacIters().c_str());
1270 _ui->doubleSpinBox_OdomViso2InlierThreshold->setObjectName(Parameters::kOdomViso2InlierThreshold().c_str());
1271 _ui->checkBox_OdomViso2Reweighting->setObjectName(Parameters::kOdomViso2Reweighting().c_str());
1273 _ui->spinBox_OdomViso2MatchNmsN->setObjectName(Parameters::kOdomViso2MatchNmsN().c_str());
1274 _ui->spinBox_OdomViso2MatchNmsTau->setObjectName(Parameters::kOdomViso2MatchNmsTau().c_str());
1275 _ui->spinBox_OdomViso2MatchBinsize->setObjectName(Parameters::kOdomViso2MatchBinsize().c_str());
1276 _ui->spinBox_OdomViso2MatchRadius->setObjectName(Parameters::kOdomViso2MatchRadius().c_str());
1277 _ui->spinBox_OdomViso2MatchDispTolerance->setObjectName(Parameters::kOdomViso2MatchDispTolerance().c_str());
1278 _ui->spinBox_OdomViso2MatchOutlierDispTolerance->setObjectName(Parameters::kOdomViso2MatchOutlierDispTolerance().c_str());
1279 _ui->spinBox_OdomViso2MatchOutlierFlowTolerance->setObjectName(Parameters::kOdomViso2MatchOutlierFlowTolerance().c_str());
1280 _ui->checkBox_OdomViso2MatchMultiStage->setObjectName(Parameters::kOdomViso2MatchMultiStage().c_str());
1281 _ui->checkBox_OdomViso2MatchHalfResolution->setObjectName(Parameters::kOdomViso2MatchHalfResolution().c_str());
1282 _ui->spinBox_OdomViso2MatchRefinement->setObjectName(Parameters::kOdomViso2MatchRefinement().c_str());
1284 _ui->spinBox_OdomViso2BucketMaxFeatures->setObjectName(Parameters::kOdomViso2BucketMaxFeatures().c_str());
1285 _ui->doubleSpinBox_OdomViso2BucketWidth->setObjectName(Parameters::kOdomViso2BucketWidth().c_str());
1286 _ui->doubleSpinBox_OdomViso2BucketHeight->setObjectName(Parameters::kOdomViso2BucketHeight().c_str());
1289 _ui->lineEdit_OdomORBSLAM2VocPath->setObjectName(Parameters::kOdomORBSLAM2VocPath().c_str());
1291 _ui->doubleSpinBox_OdomORBSLAM2Bf->setObjectName(Parameters::kOdomORBSLAM2Bf().c_str());
1292 _ui->doubleSpinBox_OdomORBSLAM2ThDepth->setObjectName(Parameters::kOdomORBSLAM2ThDepth().c_str());
1293 _ui->doubleSpinBox_OdomORBSLAM2Fps->setObjectName(Parameters::kOdomORBSLAM2Fps().c_str());
1294 _ui->spinBox_OdomORBSLAM2MaxFeatures->setObjectName(Parameters::kOdomORBSLAM2MaxFeatures().c_str());
1295 _ui->spinBox_OdomORBSLAM2MapSize->setObjectName(Parameters::kOdomORBSLAM2MapSize().c_str());
1298 _ui->lineEdit_OdomOkvisPath->setObjectName(Parameters::kOdomOKVISConfigPath().c_str());
1302 _ui->odom_loam_sensor->setObjectName(Parameters::kOdomLOAMSensor().c_str());
1303 _ui->odom_loam_scan_period->setObjectName(Parameters::kOdomLOAMScanPeriod().c_str());
1304 _ui->odom_loam_linvar->setObjectName(Parameters::kOdomLOAMLinVar().c_str());
1305 _ui->odom_loam_angvar->setObjectName(Parameters::kOdomLOAMAngVar().c_str());
1306 _ui->odom_loam_localMapping->setObjectName(Parameters::kOdomLOAMLocalMapping().c_str());
1309 _ui->OdomMSCKFGridRow->setObjectName(Parameters::kOdomMSCKFGridRow().c_str());
1310 _ui->OdomMSCKFGridCol->setObjectName(Parameters::kOdomMSCKFGridCol().c_str());
1311 _ui->OdomMSCKFGridMinFeatureNum->setObjectName(Parameters::kOdomMSCKFGridMinFeatureNum().c_str());
1312 _ui->OdomMSCKFGridMaxFeatureNum->setObjectName(Parameters::kOdomMSCKFGridMaxFeatureNum().c_str());
1313 _ui->OdomMSCKFPyramidLevels->setObjectName(Parameters::kOdomMSCKFPyramidLevels().c_str());
1314 _ui->OdomMSCKFPatchSize->setObjectName(Parameters::kOdomMSCKFPatchSize().c_str());
1315 _ui->OdomMSCKFFastThreshold->setObjectName(Parameters::kOdomMSCKFFastThreshold().c_str());
1316 _ui->OdomMSCKFMaxIteration->setObjectName(Parameters::kOdomMSCKFMaxIteration().c_str());
1317 _ui->OdomMSCKFMaxCamStateSize->setObjectName(Parameters::kOdomMSCKFMaxCamStateSize().c_str());
1318 _ui->OdomMSCKFTrackPrecision->setObjectName(Parameters::kOdomMSCKFTrackPrecision().c_str());
1319 _ui->OdomMSCKFRansacThreshold->setObjectName(Parameters::kOdomMSCKFRansacThreshold().c_str());
1320 _ui->OdomMSCKFStereoThreshold->setObjectName(Parameters::kOdomMSCKFStereoThreshold().c_str());
1321 _ui->OdomMSCKFPositionStdThreshold->setObjectName(Parameters::kOdomMSCKFPositionStdThreshold().c_str());
1322 _ui->OdomMSCKFRotationThreshold->setObjectName(Parameters::kOdomMSCKFRotationThreshold().c_str());
1323 _ui->OdomMSCKFTranslationThreshold->setObjectName(Parameters::kOdomMSCKFTranslationThreshold().c_str());
1324 _ui->OdomMSCKFTrackingRateThreshold->setObjectName(Parameters::kOdomMSCKFTrackingRateThreshold().c_str());
1325 _ui->OdomMSCKFOptTranslationThreshold->setObjectName(Parameters::kOdomMSCKFOptTranslationThreshold().c_str());
1326 _ui->OdomMSCKFNoiseGyro->setObjectName(Parameters::kOdomMSCKFNoiseGyro().c_str());
1327 _ui->OdomMSCKFNoiseAcc->setObjectName(Parameters::kOdomMSCKFNoiseAcc().c_str());
1328 _ui->OdomMSCKFNoiseGyroBias->setObjectName(Parameters::kOdomMSCKFNoiseGyroBias().c_str());
1329 _ui->OdomMSCKFNoiseAccBias->setObjectName(Parameters::kOdomMSCKFNoiseAccBias().c_str());
1330 _ui->OdomMSCKFNoiseFeature->setObjectName(Parameters::kOdomMSCKFNoiseFeature().c_str());
1331 _ui->OdomMSCKFInitCovVel->setObjectName(Parameters::kOdomMSCKFInitCovVel().c_str());
1332 _ui->OdomMSCKFInitCovGyroBias->setObjectName(Parameters::kOdomMSCKFInitCovGyroBias().c_str());
1333 _ui->OdomMSCKFInitCovAccBias->setObjectName(Parameters::kOdomMSCKFInitCovAccBias().c_str());
1334 _ui->OdomMSCKFInitCovExRot->setObjectName(Parameters::kOdomMSCKFInitCovExRot().c_str());
1335 _ui->OdomMSCKFInitCovExTrans->setObjectName(Parameters::kOdomMSCKFInitCovExTrans().c_str());
1338 _ui->lineEdit_OdomVinsPath->setObjectName(Parameters::kOdomVINSConfigPath().c_str());
1342 _ui->stereo_winWidth->setObjectName(Parameters::kStereoWinWidth().c_str());
1343 _ui->stereo_winHeight->setObjectName(Parameters::kStereoWinHeight().c_str());
1344 _ui->stereo_maxLevel->setObjectName(Parameters::kStereoMaxLevel().c_str());
1345 _ui->stereo_iterations->setObjectName(Parameters::kStereoIterations().c_str());
1346 _ui->stereo_minDisparity->setObjectName(Parameters::kStereoMinDisparity().c_str());
1347 _ui->stereo_maxDisparity->setObjectName(Parameters::kStereoMaxDisparity().c_str());
1348 _ui->stereo_ssd->setObjectName(Parameters::kStereoSSD().c_str());
1349 _ui->stereo_flow_eps->setObjectName(Parameters::kStereoEps().c_str());
1350 _ui->stereo_opticalFlow->setObjectName(Parameters::kStereoOpticalFlow().c_str());
1353 _ui->comboBox_stereoDense_strategy->setObjectName(Parameters::kStereoDenseStrategy().c_str());
1354 connect(
_ui->comboBox_stereoDense_strategy, SIGNAL(currentIndexChanged(
int)),
_ui->stackedWidget_stereoDense, SLOT(setCurrentIndex(
int)));
1355 _ui->comboBox_stereoDense_strategy->setCurrentIndex(Parameters::defaultStereoDenseStrategy());
1356 _ui->stackedWidget_stereoDense->setCurrentIndex(Parameters::defaultStereoDenseStrategy());
1359 _ui->stereobm_blockSize->setObjectName(Parameters::kStereoBMBlockSize().c_str());
1360 _ui->stereobm_minDisparity->setObjectName(Parameters::kStereoBMMinDisparity().c_str());
1361 _ui->stereobm_numDisparities->setObjectName(Parameters::kStereoBMNumDisparities().c_str());
1362 _ui->stereobm_preFilterCap->setObjectName(Parameters::kStereoBMPreFilterCap().c_str());
1363 _ui->stereobm_preFilterSize->setObjectName(Parameters::kStereoBMPreFilterSize().c_str());
1364 _ui->stereobm_speckleRange->setObjectName(Parameters::kStereoBMSpeckleRange().c_str());
1365 _ui->stereobm_speckleWinSize->setObjectName(Parameters::kStereoBMSpeckleWindowSize().c_str());
1366 _ui->stereobm_tetureThreshold->setObjectName(Parameters::kStereoBMTextureThreshold().c_str());
1367 _ui->stereobm_uniquessRatio->setObjectName(Parameters::kStereoBMUniquenessRatio().c_str());
1368 _ui->stereobm_disp12MaxDiff->setObjectName(Parameters::kStereoBMDisp12MaxDiff().c_str());
1371 _ui->stereosgbm_blockSize->setObjectName(Parameters::kStereoSGBMBlockSize().c_str());
1372 _ui->stereosgbm_minDisparity->setObjectName(Parameters::kStereoSGBMMinDisparity().c_str());
1373 _ui->stereosgbm_numDisparities->setObjectName(Parameters::kStereoSGBMNumDisparities().c_str());
1374 _ui->stereosgbm_preFilterCap->setObjectName(Parameters::kStereoSGBMPreFilterCap().c_str());
1375 _ui->stereosgbm_speckleRange->setObjectName(Parameters::kStereoSGBMSpeckleRange().c_str());
1376 _ui->stereosgbm_speckleWinSize->setObjectName(Parameters::kStereoSGBMSpeckleWindowSize().c_str());
1377 _ui->stereosgbm_uniquessRatio->setObjectName(Parameters::kStereoSGBMUniquenessRatio().c_str());
1378 _ui->stereosgbm_disp12MaxDiff->setObjectName(Parameters::kStereoSGBMDisp12MaxDiff().c_str());
1379 _ui->stereosgbm_p1->setObjectName(Parameters::kStereoSGBMP1().c_str());
1380 _ui->stereosgbm_p2->setObjectName(Parameters::kStereoSGBMP2().c_str());
1381 _ui->stereosgbm_mode->setObjectName(Parameters::kStereoSGBMMode().c_str());
1384 _ui->ArucoDictionary->setObjectName(Parameters::kMarkerDictionary().c_str());
1385 _ui->ArucoMarkerLength->setObjectName(Parameters::kMarkerLength().c_str());
1386 _ui->ArucoMaxDepthError->setObjectName(Parameters::kMarkerMaxDepthError().c_str());
1387 _ui->ArucoVarianceLinear->setObjectName(Parameters::kMarkerVarianceLinear().c_str());
1388 _ui->ArucoVarianceAngular->setObjectName(Parameters::kMarkerVarianceAngular().c_str());
1389 _ui->ArucoMarkerRangeMin->setObjectName(Parameters::kMarkerMinRange().c_str());
1390 _ui->ArucoMarkerRangeMax->setObjectName(Parameters::kMarkerMaxRange().c_str());
1391 _ui->ArucoCornerRefinementMethod->setObjectName(Parameters::kMarkerCornerRefinementMethod().c_str());
1394 _ui->doubleSpinBox_imuFilterMadgwickGain->setObjectName(Parameters::kImuFilterMadgwickGain().c_str());
1395 _ui->doubleSpinBox_imuFilterMadgwickZeta->setObjectName(Parameters::kImuFilterMadgwickZeta().c_str());
1396 _ui->doubleSpinBox_imuFilterComplementaryGainAcc->setObjectName(Parameters::kImuFilterComplementaryGainAcc().c_str());
1397 _ui->doubleSpinBox_imuFilterComplementaryBiasAlpha->setObjectName(Parameters::kImuFilterComplementaryBiasAlpha().c_str());
1398 _ui->checkBox_imuFilterComplementaryDoAdaptiveGain->setObjectName(Parameters::kImuFilterComplementaryDoAdpativeGain().c_str());
1399 _ui->checkBox_imuFilterComplementaryDoBiasEstimation->setObjectName(Parameters::kImuFilterComplementaryDoBiasEstimation().c_str());
1411 connect(
_ui->doubleSpinBox_kp_roi0, SIGNAL(valueChanged(
double)),
this, SLOT(
updateKpROI()));
1412 connect(
_ui->doubleSpinBox_kp_roi1, SIGNAL(valueChanged(
double)),
this, SLOT(
updateKpROI()));
1413 connect(
_ui->doubleSpinBox_kp_roi2, SIGNAL(valueChanged(
double)),
this, SLOT(
updateKpROI()));
1414 connect(
_ui->doubleSpinBox_kp_roi3, SIGNAL(valueChanged(
double)),
this, SLOT(
updateKpROI()));
1415 connect(
_ui->checkBox_useOdomFeatures, SIGNAL(toggled(
bool)),
this, SLOT(
useOdomFeatures()));
1419 _ui->stackedWidget->setCurrentIndex(0);
1436 for(ParametersMap::const_iterator iter=defaults.begin(); iter!=defaults.end(); ++iter)
1450 for(
int i =0;i<boxes.size();++i)
1452 if(boxes[i] ==
_ui->groupBox_source0)
1454 _ui->stackedWidget->setCurrentIndex(i);
1470 _ui->treeView->setModel(0);
1476 if(
_ui->radioButton_basic->isChecked())
1478 boxes = boxes.mid(0,7);
1485 QStandardItem * parentItem =
_indexModel->invisibleRootItem();
1487 this->
parseModel(boxes, parentItem, 0, index);
1488 if(
_ui->radioButton_advanced->isChecked() && index !=
_ui->stackedWidget->count()-1)
1490 ULOGGER_ERROR(
"The tree model is not the same size of the stacked widgets...%d vs %d advanced stacks", index,
_ui->stackedWidget->count()-1);
1492 int currentIndex =
_ui->stackedWidget->currentIndex();
1493 if(
_ui->radioButton_basic->isChecked())
1495 if(currentIndex >= 6)
1497 _ui->stackedWidget->setCurrentIndex(6);
1503 if(currentIndex == 6)
1505 _ui->stackedWidget->setCurrentIndex(7);
1509 _ui->treeView->expandToDepth(1);
1512 connect(
_ui->treeView->selectionModel(), SIGNAL(currentChanged(
const QModelIndex &,
const QModelIndex &)),
this, SLOT(
clicked(
const QModelIndex &,
const QModelIndex &)));
1524 QStandardItem * currentItem = 0;
1525 while(absoluteIndex < boxes.size())
1527 QString objectName = boxes.at(absoluteIndex)->objectName();
1528 QString title = boxes.at(absoluteIndex)->title();
1530 int lvl = QString(objectName.at(objectName.size()-1)).toInt(&ok);
1533 ULOGGER_ERROR(
"Error while parsing the first number of the QGroupBox title (%s), the first character must be the number in the hierarchy", title.toStdString().c_str());
1538 if(lvl == currentLevel)
1540 QStandardItem * item =
new QStandardItem(title);
1541 item->setData(absoluteIndex);
1544 parentItem->appendRow(item);
1547 else if(lvl > currentLevel)
1549 if(lvl>currentLevel+1)
1551 ULOGGER_ERROR(
"Intermediary lvl doesn't exist, lvl %d to %d, indexes %d and %d", currentLevel, lvl, absoluteIndex-1, absoluteIndex);
1556 parseModel(boxes, currentItem, currentLevel+1, absoluteIndex);
1570 for(rtabmap::ParametersMap::const_iterator iter=parameters.begin(); iter!=parameters.end(); ++iter)
1572 QWidget * obj =
_ui->stackedWidget->findChild<QWidget*>((*iter).first.c_str());
1576 obj->setToolTip(tr(
"%1 (Default=\"%2\")").arg(iter->first.c_str()).arg(iter->second.c_str()));
1578 QSpinBox * spin = qobject_cast<QSpinBox *>(obj);
1579 QDoubleSpinBox * doubleSpin = qobject_cast<QDoubleSpinBox *>(obj);
1580 QComboBox * combo = qobject_cast<QComboBox *>(obj);
1581 QCheckBox * check = qobject_cast<QCheckBox *>(obj);
1582 QRadioButton * radio = qobject_cast<QRadioButton *>(obj);
1583 QLineEdit * lineEdit = qobject_cast<QLineEdit *>(obj);
1584 QGroupBox * groupBox = qobject_cast<QGroupBox *>(obj);
1587 connect(spin, SIGNAL(valueChanged(
int)),
this, SLOT(
addParameter(
int)));
1591 connect(doubleSpin, SIGNAL(valueChanged(
double)),
this, SLOT(
addParameter(
double)));
1595 connect(combo, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
addParameter(
int)));
1599 connect(check, SIGNAL(toggled(
bool)),
this, SLOT(
addParameter(
bool)));
1603 connect(radio, SIGNAL(toggled(
bool)),
this, SLOT(
addParameter(
bool)));
1607 connect(lineEdit, SIGNAL(textChanged(
const QString &)),
this, SLOT(
addParameter(
const QString &)));
1611 connect(groupBox, SIGNAL(toggled(
bool)),
this, SLOT(
addParameter(
bool)));
1615 ULOGGER_WARN(
"QWidget called %s can't be cast to a supported widget", (*iter).first.c_str());
1620 ULOGGER_WARN(
"Can't find the related QWidget for parameter %s", (*iter).first.c_str());
1627 QStandardItem * item =
_indexModel->itemFromIndex(current);
1628 if(item && item->isEnabled())
1630 int index = item->data().toInt();
1631 if(
_ui->radioButton_advanced->isChecked() && index >= 6)
1635 _ui->stackedWidget->setCurrentIndex(index);
1636 _ui->scrollArea->horizontalScrollBar()->setValue(0);
1637 _ui->scrollArea->verticalScrollBar()->setValue(0);
1655 QDialogButtonBox::ButtonRole role =
_ui->buttonBox_global->buttonRole(button);
1658 case QDialogButtonBox::RejectRole:
1666 case QDialogButtonBox::AcceptRole:
1689 QDialogButtonBox::ButtonRole role =
_ui->buttonBox_local->buttonRole(button);
1692 case QDialogButtonBox::ApplyRole:
1700 case QDialogButtonBox::ResetRole:
1711 if(groupBox->objectName() ==
_ui->groupBox_generalSettingsGui0->objectName())
1713 _ui->general_checkBox_imagesKept->setChecked(
true);
1714 _ui->general_checkBox_cloudsKept->setChecked(
true);
1715 _ui->checkBox_beep->setChecked(
false);
1716 _ui->checkBox_stamps->setChecked(
true);
1717 _ui->checkBox_cacheStatistics->setChecked(
true);
1718 _ui->checkBox_notifyWhenNewGlobalPathIsReceived->setChecked(
false);
1719 _ui->checkBox_verticalLayoutUsed->setChecked(
true);
1720 _ui->checkBox_imageRejectedShown->setChecked(
true);
1721 _ui->checkBox_imageHighestHypShown->setChecked(
false);
1722 _ui->spinBox_odomQualityWarnThr->setValue(50);
1723 _ui->checkBox_odom_onlyInliersShown->setChecked(
false);
1724 _ui->radioButton_posteriorGraphView->setChecked(
true);
1725 _ui->radioButton_wordsGraphView->setChecked(
false);
1726 _ui->radioButton_localizationsGraphView->setChecked(
false);
1727 _ui->radioButton_nochangeGraphView->setChecked(
false);
1728 _ui->checkbox_odomDisabled->setChecked(
false);
1729 _ui->checkbox_groundTruthAlign->setChecked(
true);
1731 else if(groupBox->objectName() ==
_ui->groupBox_cloudRendering1->objectName())
1733 for(
int i=0; i<2; ++i)
1758 _ui->doubleSpinBox_voxel->setValue(0);
1759 _ui->doubleSpinBox_noiseRadius->setValue(0);
1760 _ui->spinBox_noiseMinNeighbors->setValue(5);
1762 _ui->doubleSpinBox_ceilingFilterHeight->setValue(0);
1763 _ui->doubleSpinBox_floorFilterHeight->setValue(0);
1764 _ui->spinBox_normalKSearch->setValue(10);
1765 _ui->doubleSpinBox_normalRadiusSearch->setValue(0.0);
1767 _ui->doubleSpinBox_ceilingFilterHeight_scan->setValue(0);
1768 _ui->doubleSpinBox_floorFilterHeight_scan->setValue(0);
1769 _ui->spinBox_normalKSearch_scan->setValue(0);
1770 _ui->doubleSpinBox_normalRadiusSearch_scan->setValue(0.0);
1772 _ui->checkBox_showGraphs->setChecked(
true);
1773 _ui->checkBox_showLabels->setChecked(
false);
1774 _ui->checkBox_showFrames->setChecked(
false);
1775 _ui->checkBox_showLandmarks->setChecked(
true);
1776 _ui->doubleSpinBox_landmarkSize->setValue(0);
1777 _ui->checkBox_showIMUGravity->setChecked(
false);
1778 _ui->checkBox_showIMUAcc->setChecked(
false);
1780 _ui->doubleSpinBox_mesh_angleTolerance->setValue(15.0);
1781 _ui->groupBox_organized->setChecked(
false);
1782 #if PCL_VERSION_COMPARE(>=, 1, 7, 2) 1783 _ui->checkBox_mesh_quad->setChecked(
true);
1785 _ui->checkBox_mesh_quad->setChecked(
false);
1787 _ui->checkBox_mesh_texture->setChecked(
false);
1788 _ui->spinBox_mesh_triangleSize->setValue(2);
1790 else if(groupBox->objectName() ==
_ui->groupBox_filtering2->objectName())
1792 _ui->radioButton_noFiltering->setChecked(
true);
1793 _ui->radioButton_nodeFiltering->setChecked(
false);
1794 _ui->radioButton_subtractFiltering->setChecked(
false);
1795 _ui->doubleSpinBox_cloudFilterRadius->setValue(0.1);
1796 _ui->doubleSpinBox_cloudFilterAngle->setValue(30);
1797 _ui->spinBox_subtractFilteringMinPts->setValue(5);
1798 _ui->doubleSpinBox_subtractFilteringRadius->setValue(0.02);
1799 _ui->doubleSpinBox_subtractFilteringAngle->setValue(0);
1801 else if(groupBox->objectName() ==
_ui->groupBox_gridMap2->objectName())
1803 _ui->checkBox_map_shown->setChecked(
false);
1804 _ui->doubleSpinBox_map_opacity->setValue(0.75);
1806 _ui->groupBox_octomap->setChecked(
false);
1807 _ui->spinBox_octomap_treeDepth->setValue(16);
1808 _ui->checkBox_octomap_2dgrid->setChecked(
true);
1809 _ui->checkBox_octomap_show3dMap->setChecked(
true);
1810 _ui->comboBox_octomap_renderingType->setCurrentIndex(0);
1811 _ui->spinBox_octomap_pointSize->setValue(5);
1813 else if(groupBox->objectName() ==
_ui->groupBox_logging1->objectName())
1815 _ui->comboBox_loggerLevel->setCurrentIndex(2);
1816 _ui->comboBox_loggerEventLevel->setCurrentIndex(3);
1817 _ui->comboBox_loggerPauseLevel->setCurrentIndex(3);
1818 _ui->checkBox_logger_printTime->setChecked(
true);
1819 _ui->checkBox_logger_printThreadId->setChecked(
false);
1820 _ui->comboBox_loggerType->setCurrentIndex(1);
1821 for(
int i=0; i<
_ui->comboBox_loggerFilter->count(); ++i)
1823 _ui->comboBox_loggerFilter->setItemChecked(i,
false);
1826 else if(groupBox->objectName() ==
_ui->groupBox_source0->objectName())
1828 _ui->general_doubleSpinBox_imgRate->setValue(0.0);
1829 _ui->source_mirroring->setChecked(
false);
1830 _ui->lineEdit_calibrationFile->clear();
1831 _ui->comboBox_sourceType->setCurrentIndex(
kSrcRGBD);
1832 _ui->lineEdit_sourceDevice->setText(
"");
1833 _ui->lineEdit_sourceLocalTransform->setText(
"0 0 1 -1 0 0 0 -1 0");
1836 _ui->source_images_spinBox_startPos->setValue(0);
1837 _ui->source_images_spinBox_maxFrames->setValue(0);
1838 _ui->spinBox_usbcam_streamWidth->setValue(0);
1839 _ui->spinBox_usbcam_streamHeight->setValue(0);
1840 _ui->checkBox_rgb_rectify->setChecked(
false);
1841 _ui->comboBox_cameraImages_bayerMode->setCurrentIndex(0);
1843 _ui->source_checkBox_ignoreOdometry->setChecked(
false);
1844 _ui->source_checkBox_ignoreGoalDelay->setChecked(
true);
1845 _ui->source_checkBox_ignoreGoals->setChecked(
true);
1846 _ui->source_spinBox_databaseStartId->setValue(0);
1847 _ui->source_spinBox_databaseStopId->setValue(0);
1848 _ui->source_spinBox_database_cameraIndex->setValue(-1);
1849 _ui->source_checkBox_useDbStamps->setChecked(
true);
1880 _ui->checkbox_rgbd_colorOnly->setChecked(
false);
1881 _ui->spinBox_source_imageDecimation->setValue(1);
1882 _ui->checkbox_stereo_depthGenerated->setChecked(
false);
1883 _ui->checkBox_stereo_exposureCompensation->setChecked(
false);
1884 _ui->openni2_autoWhiteBalance->setChecked(
true);
1885 _ui->openni2_autoExposure->setChecked(
true);
1886 _ui->openni2_exposure->setValue(0);
1887 _ui->openni2_gain->setValue(100);
1888 _ui->openni2_mirroring->setChecked(
false);
1889 _ui->openni2_stampsIdsUsed->setChecked(
false);
1890 _ui->openni2_hshift->setValue(0);
1891 _ui->openni2_vshift->setValue(0);
1892 _ui->comboBox_freenect2Format->setCurrentIndex(1);
1893 _ui->doubleSpinBox_freenect2MinDepth->setValue(0.3);
1894 _ui->doubleSpinBox_freenect2MaxDepth->setValue(12.0);
1895 _ui->checkBox_freenect2BilateralFiltering->setChecked(
true);
1896 _ui->checkBox_freenect2EdgeAwareFiltering->setChecked(
true);
1897 _ui->checkBox_freenect2NoiseFiltering->setChecked(
true);
1898 _ui->lineEdit_freenect2Pipeline->setText(
"");
1899 _ui->comboBox_k4w2Format->setCurrentIndex(1);
1900 _ui->comboBox_realsensePresetRGB->setCurrentIndex(0);
1901 _ui->comboBox_realsensePresetDepth->setCurrentIndex(2);
1902 _ui->checkbox_realsenseOdom->setChecked(
false);
1903 _ui->checkbox_realsenseDepthScaledToRGBSize->setChecked(
false);
1904 _ui->comboBox_realsenseRGBSource->setCurrentIndex(0);
1905 _ui->checkbox_rs2_emitter->setChecked(
true);
1906 _ui->checkbox_rs2_irMode->setChecked(
false);
1907 _ui->checkbox_rs2_irDepth->setChecked(
true);
1908 _ui->spinBox_rs2_width->setValue(848);
1909 _ui->spinBox_rs2_height->setValue(480);
1910 _ui->spinBox_rs2_rate->setValue(60);
1911 _ui->checkbox_rs2_globalTimeStync->setChecked(
true);
1912 _ui->checkbox_rs2_dualMode->setChecked(
false);
1913 _ui->lineEdit_rs2_dualModeExtrinsics->setText(
"0.009 0.021 0.027 0 -0.018 0.005");
1914 _ui->lineEdit_rs2_jsonFile->clear();
1915 _ui->lineEdit_openniOniPath->clear();
1916 _ui->lineEdit_openni2OniPath->clear();
1917 _ui->comboBox_k4a_rgb_resolution->setCurrentIndex(0);
1918 _ui->comboBox_k4a_framerate->setCurrentIndex(2);
1919 _ui->comboBox_k4a_depth_resolution->setCurrentIndex(2);
1920 _ui->checkbox_k4a_irDepth->setChecked(
false);
1921 _ui->lineEdit_k4a_mkv->clear();
1922 _ui->source_checkBox_useMKVStamps->setChecked(
true);
1923 _ui->lineEdit_cameraRGBDImages_path_rgb->setText(
"");
1924 _ui->lineEdit_cameraRGBDImages_path_depth->setText(
"");
1925 _ui->doubleSpinBox_cameraRGBDImages_scale->setValue(1.0);
1926 _ui->spinBox_cameraRGBDImages_startIndex->setValue(0);
1927 _ui->spinBox_cameraRGBDImages_maxFrames->setValue(0);
1928 _ui->lineEdit_source_distortionModel->setText(
"");
1929 _ui->groupBox_bilateral->setChecked(
false);
1930 _ui->doubleSpinBox_bilateral_sigmaS->setValue(10.0);
1931 _ui->doubleSpinBox_bilateral_sigmaR->setValue(0.1);
1934 _ui->lineEdit_cameraStereoImages_path_left->setText(
"");
1935 _ui->lineEdit_cameraStereoImages_path_right->setText(
"");
1936 _ui->checkBox_stereo_rectify->setChecked(
false);
1937 _ui->spinBox_cameraStereoImages_startIndex->setValue(0);
1938 _ui->spinBox_cameraStereoImages_maxFrames->setValue(0);
1939 _ui->lineEdit_cameraStereoVideo_path->setText(
"");
1940 _ui->lineEdit_cameraStereoVideo_path_2->setText(
"");
1941 _ui->spinBox_stereo_right_device->setValue(-1);
1942 _ui->comboBox_stereoZed_resolution->setCurrentIndex(2);
1943 _ui->comboBox_stereoZed_quality->setCurrentIndex(1);
1944 _ui->checkbox_stereoZed_selfCalibration->setChecked(
true);
1945 _ui->comboBox_stereoZed_sensingMode->setCurrentIndex(0);
1946 _ui->spinBox_stereoZed_confidenceThr->setValue(100);
1947 _ui->spinBox_stereoZed_texturenessConfidenceThr->setValue(90);
1948 _ui->checkbox_stereoZed_odom->setChecked(
false);
1949 _ui->lineEdit_zedSvoPath->clear();
1950 _ui->checkbox_stereoRealSense2_odom->setChecked(
false);
1951 _ui->checkbox_stereoMyntEye_rectify->setChecked(
false);
1952 _ui->checkbox_stereoMyntEye_depth->setChecked(
false);
1953 _ui->checkbox_stereoMyntEye_autoExposure->setChecked(
true);
1954 _ui->spinBox_stereoMyntEye_gain->setValue(24);
1955 _ui->spinBox_stereoMyntEye_brightness->setValue(120);
1956 _ui->spinBox_stereoMyntEye_contrast->setValue(116);
1957 _ui->spinBox_stereoMyntEye_irControl->setValue(0);
1959 _ui->checkBox_cameraImages_configForEachFrame->setChecked(
false);
1960 _ui->checkBox_cameraImages_timestamps->setChecked(
false);
1961 _ui->checkBox_cameraImages_syncTimeStamps->setChecked(
true);
1962 _ui->lineEdit_cameraImages_timestamps->setText(
"");
1963 _ui->lineEdit_cameraImages_path_scans->setText(
"");
1964 _ui->lineEdit_cameraImages_laser_transform->setText(
"0 0 0 0 0 0");
1965 _ui->spinBox_cameraImages_max_scan_pts->setValue(0);
1966 _ui->lineEdit_cameraImages_odom->setText(
"");
1967 _ui->comboBox_cameraImages_odomFormat->setCurrentIndex(0);
1968 _ui->lineEdit_cameraImages_gt->setText(
"");
1969 _ui->comboBox_cameraImages_gtFormat->setCurrentIndex(0);
1970 _ui->doubleSpinBox_maxPoseTimeDiff->setValue(0.02);
1971 _ui->lineEdit_cameraImages_path_imu->setText(
"");
1972 _ui->lineEdit_cameraImages_imu_transform->setText(
"0 0 1 0 -1 0 1 0 0");
1973 _ui->spinBox_cameraImages_max_imu_rate->setValue(0);
1975 _ui->comboBox_imuFilter_strategy->setCurrentIndex(0);
1976 _ui->doubleSpinBox_imuFilterMadgwickGain->setValue(Parameters::defaultImuFilterMadgwickGain());
1977 _ui->doubleSpinBox_imuFilterMadgwickZeta->setValue(Parameters::defaultImuFilterMadgwickZeta());
1978 _ui->doubleSpinBox_imuFilterComplementaryGainAcc->setValue(Parameters::defaultImuFilterComplementaryGainAcc());
1979 _ui->doubleSpinBox_imuFilterComplementaryBiasAlpha->setValue(Parameters::defaultImuFilterComplementaryBiasAlpha());
1980 _ui->checkBox_imuFilterComplementaryDoAdaptiveGain->setChecked(Parameters::defaultImuFilterComplementaryDoAdpativeGain());
1981 _ui->checkBox_imuFilterComplementaryDoBiasEstimation->setChecked(Parameters::defaultImuFilterComplementaryDoBiasEstimation());
1982 _ui->checkbox_publishInterIMU->setChecked(
false);
1984 _ui->checkBox_source_scanFromDepth->setChecked(
false);
1985 _ui->spinBox_source_scanDownsampleStep->setValue(1);
1986 _ui->doubleSpinBox_source_scanRangeMin->setValue(0);
1987 _ui->doubleSpinBox_source_scanRangeMax->setValue(0);
1988 _ui->doubleSpinBox_source_scanVoxelSize->setValue(0.0
f);
1989 _ui->spinBox_source_scanNormalsK->setValue(0);
1990 _ui->doubleSpinBox_source_scanNormalsRadius->setValue(0.0);
1991 _ui->doubleSpinBox_source_scanNormalsForceGroundUp->setValue(0);
1993 _ui->groupBox_depthFromScan->setChecked(
false);
1994 _ui->groupBox_depthFromScan_fillHoles->setChecked(
true);
1995 _ui->radioButton_depthFromScan_vertical->setChecked(
true);
1996 _ui->radioButton_depthFromScan_horizontal->setChecked(
false);
1997 _ui->checkBox_depthFromScan_fillBorders->setChecked(
false);
1999 else if(groupBox->objectName() ==
_ui->groupBox_rtabmap_basic0->objectName())
2001 _ui->general_doubleSpinBox_timeThr_2->setValue(Parameters::defaultRtabmapTimeThr());
2002 _ui->general_doubleSpinBox_hardThr_2->setValue(Parameters::defaultRtabmapLoopThr());
2003 _ui->doubleSpinBox_similarityThreshold_2->setValue(Parameters::defaultMemRehearsalSimilarity());
2004 _ui->general_spinBox_imagesBufferSize_2->setValue(Parameters::defaultRtabmapImageBufferSize());
2005 _ui->general_spinBox_maxStMemSize_2->setValue(Parameters::defaultMemSTMSize());
2006 _ui->general_checkBox_publishStats_2->setChecked(Parameters::defaultRtabmapPublishStats());
2007 _ui->general_checkBox_activateRGBD_2->setChecked(Parameters::defaultRGBDEnabled());
2008 _ui->general_checkBox_SLAM_mode_2->setChecked(Parameters::defaultMemIncrementalMemory());
2009 _ui->general_doubleSpinBox_detectionRate_2->setValue(Parameters::defaultRtabmapDetectionRate());
2011 _ui->general_doubleSpinBox_timeThr->setValue(Parameters::defaultRtabmapTimeThr());
2012 _ui->general_doubleSpinBox_hardThr->setValue(Parameters::defaultRtabmapLoopThr());
2013 _ui->doubleSpinBox_similarityThreshold->setValue(Parameters::defaultMemRehearsalSimilarity());
2014 _ui->general_spinBox_imagesBufferSize->setValue(Parameters::defaultRtabmapImageBufferSize());
2015 _ui->general_spinBox_maxStMemSize->setValue(Parameters::defaultMemSTMSize());
2016 _ui->general_doubleSpinBox_detectionRate->setValue(Parameters::defaultRtabmapDetectionRate());
2020 QObjectList children = groupBox->children();
2023 for(
int i=0; i<children.size(); ++i)
2025 key = children.at(i)->objectName().toStdString();
2028 if(key.compare(Parameters::kRtabmapWorkingDirectory().c_str()) == 0)
2036 if(qobject_cast<const QGroupBox*>(children.at(i)))
2041 else if(qobject_cast<const QGroupBox*>(children.at(i)))
2045 else if(qobject_cast<const QStackedWidget*>(children.at(i)))
2047 QStackedWidget * stackedWidget = (QStackedWidget*)children.at(i);
2048 for(
int j=0; j<stackedWidget->count(); ++j)
2050 const QObjectList & children2 = stackedWidget->widget(j)->children();
2051 for(
int k=0; k<children2.size(); ++k)
2053 if(qobject_cast<QGroupBox *>(children2.at(k)))
2062 if(groupBox->findChild<QLineEdit*>(
_ui->lineEdit_kp_roi->objectName()))
2067 if(groupBox->objectName() ==
_ui->groupBox_odometry1->objectName())
2069 _ui->odom_registration->setCurrentIndex(3);
2070 _ui->odom_f2m_gravitySigma->setValue(-1);
2078 if(panelNumber >= 0 && panelNumber < boxes.size())
2082 else if(panelNumber == -1)
2084 for(QList<QGroupBox*>::iterator iter = boxes.begin(); iter!=boxes.end(); ++iter)
2091 ULOGGER_WARN(
"panel number and the number of stacked widget doesn't match");
2098 return _ui->lineEdit_workingDirectory->text();
2103 QString privatePath = QDir::homePath() +
"/.rtabmap";
2104 if(!QDir(privatePath).exists())
2106 QDir::home().mkdir(
".rtabmap");
2108 return privatePath +
"/rtabmap.ini";
2118 QString path = QFileDialog::getOpenFileName(
this, tr(
"Load settings..."), this->
getWorkingDirectory(),
"*.ini");
2136 QStandardItem * parentItem =
_indexModel->invisibleRootItem();
2139 for(
int i=1; i<parentItem->rowCount(); ++i)
2141 parentItem->child(i)->setEnabled(
false);
2144 _ui->radioButton_basic->setEnabled(
false);
2145 _ui->radioButton_advanced->setEnabled(
false);
2150 QStandardItem * parentItem =
_indexModel->invisibleRootItem();
2153 for(
int i=0; i<parentItem->rowCount(); ++i)
2155 parentItem->child(i)->setEnabled(
true);
2158 _ui->radioButton_basic->setEnabled(
true);
2159 _ui->radioButton_advanced->setEnabled(
true);
2166 if(!filePath.isEmpty())
2170 QSettings settings(path, QSettings::IniFormat);
2171 settings.beginGroup(
"Gui");
2172 settings.beginGroup(
"General");
2173 _ui->general_checkBox_imagesKept->setChecked(settings.value(
"imagesKept",
_ui->general_checkBox_imagesKept->isChecked()).toBool());
2174 _ui->general_checkBox_cloudsKept->setChecked(settings.value(
"cloudsKept",
_ui->general_checkBox_cloudsKept->isChecked()).toBool());
2175 _ui->comboBox_loggerLevel->setCurrentIndex(settings.value(
"loggerLevel",
_ui->comboBox_loggerLevel->currentIndex()).toInt());
2176 _ui->comboBox_loggerEventLevel->setCurrentIndex(settings.value(
"loggerEventLevel",
_ui->comboBox_loggerEventLevel->currentIndex()).toInt());
2177 _ui->comboBox_loggerPauseLevel->setCurrentIndex(settings.value(
"loggerPauseLevel",
_ui->comboBox_loggerPauseLevel->currentIndex()).toInt());
2178 _ui->comboBox_loggerType->setCurrentIndex(settings.value(
"loggerType",
_ui->comboBox_loggerType->currentIndex()).toInt());
2179 _ui->checkBox_logger_printTime->setChecked(settings.value(
"loggerPrintTime",
_ui->checkBox_logger_printTime->isChecked()).toBool());
2180 _ui->checkBox_logger_printThreadId->setChecked(settings.value(
"loggerPrintThreadId",
_ui->checkBox_logger_printThreadId->isChecked()).toBool());
2181 _ui->checkBox_verticalLayoutUsed->setChecked(settings.value(
"verticalLayoutUsed",
_ui->checkBox_verticalLayoutUsed->isChecked()).toBool());
2182 _ui->checkBox_imageRejectedShown->setChecked(settings.value(
"imageRejectedShown",
_ui->checkBox_imageRejectedShown->isChecked()).toBool());
2183 _ui->checkBox_imageHighestHypShown->setChecked(settings.value(
"imageHighestHypShown",
_ui->checkBox_imageHighestHypShown->isChecked()).toBool());
2184 _ui->checkBox_beep->setChecked(settings.value(
"beep",
_ui->checkBox_beep->isChecked()).toBool());
2185 _ui->checkBox_stamps->setChecked(settings.value(
"figure_time",
_ui->checkBox_stamps->isChecked()).toBool());
2186 _ui->checkBox_cacheStatistics->setChecked(settings.value(
"figure_cache",
_ui->checkBox_cacheStatistics->isChecked()).toBool());
2187 _ui->checkBox_notifyWhenNewGlobalPathIsReceived->setChecked(settings.value(
"notifyNewGlobalPath",
_ui->checkBox_notifyWhenNewGlobalPathIsReceived->isChecked()).toBool());
2188 _ui->spinBox_odomQualityWarnThr->setValue(settings.value(
"odomQualityThr",
_ui->spinBox_odomQualityWarnThr->value()).toInt());
2189 _ui->checkBox_odom_onlyInliersShown->setChecked(settings.value(
"odomOnlyInliersShown",
_ui->checkBox_odom_onlyInliersShown->isChecked()).toBool());
2190 _ui->radioButton_posteriorGraphView->setChecked(settings.value(
"posteriorGraphView",
_ui->radioButton_posteriorGraphView->isChecked()).toBool());
2191 _ui->radioButton_wordsGraphView->setChecked(settings.value(
"wordsGraphView",
_ui->radioButton_wordsGraphView->isChecked()).toBool());
2192 _ui->radioButton_localizationsGraphView->setChecked(settings.value(
"localizationsGraphView",
_ui->radioButton_localizationsGraphView->isChecked()).toBool());
2193 _ui->radioButton_nochangeGraphView->setChecked(settings.value(
"nochangeGraphView",
_ui->radioButton_nochangeGraphView->isChecked()).toBool());
2194 _ui->checkbox_odomDisabled->setChecked(settings.value(
"odomDisabled",
_ui->checkbox_odomDisabled->isChecked()).toBool());
2195 _ui->odom_registration->setCurrentIndex(settings.value(
"odomRegistration",
_ui->odom_registration->currentIndex()).toInt());
2196 _ui->odom_f2m_gravitySigma->setValue(settings.value(
"odomF2MGravitySigma",
_ui->odom_f2m_gravitySigma->value()).toDouble());
2197 _ui->checkbox_groundTruthAlign->setChecked(settings.value(
"gtAlign",
_ui->checkbox_groundTruthAlign->isChecked()).toBool());
2199 for(
int i=0; i<2; ++i)
2225 _ui->doubleSpinBox_voxel->setValue(settings.value(
"cloudVoxel",
_ui->doubleSpinBox_voxel->value()).toDouble());
2226 _ui->doubleSpinBox_noiseRadius->setValue(settings.value(
"cloudNoiseRadius",
_ui->doubleSpinBox_noiseRadius->value()).toDouble());
2227 _ui->spinBox_noiseMinNeighbors->setValue(settings.value(
"cloudNoiseMinNeighbors",
_ui->spinBox_noiseMinNeighbors->value()).toInt());
2228 _ui->doubleSpinBox_ceilingFilterHeight->setValue(settings.value(
"cloudCeilingHeight",
_ui->doubleSpinBox_ceilingFilterHeight->value()).toDouble());
2229 _ui->doubleSpinBox_floorFilterHeight->setValue(settings.value(
"cloudFloorHeight",
_ui->doubleSpinBox_floorFilterHeight->value()).toDouble());
2230 _ui->spinBox_normalKSearch->setValue(settings.value(
"normalKSearch",
_ui->spinBox_normalKSearch->value()).toInt());
2231 _ui->doubleSpinBox_normalRadiusSearch->setValue(settings.value(
"normalRadiusSearch",
_ui->doubleSpinBox_normalRadiusSearch->value()).toDouble());
2232 _ui->doubleSpinBox_ceilingFilterHeight_scan->setValue(settings.value(
"scanCeilingHeight",
_ui->doubleSpinBox_ceilingFilterHeight_scan->value()).toDouble());
2233 _ui->doubleSpinBox_floorFilterHeight_scan->setValue(settings.value(
"scanFloorHeight",
_ui->doubleSpinBox_floorFilterHeight_scan->value()).toDouble());
2234 _ui->spinBox_normalKSearch_scan->setValue(settings.value(
"scanNormalKSearch",
_ui->spinBox_normalKSearch_scan->value()).toInt());
2235 _ui->doubleSpinBox_normalRadiusSearch_scan->setValue(settings.value(
"scanNormalRadiusSearch",
_ui->doubleSpinBox_normalRadiusSearch_scan->value()).toDouble());
2237 _ui->checkBox_showGraphs->setChecked(settings.value(
"showGraphs",
_ui->checkBox_showGraphs->isChecked()).toBool());
2238 _ui->checkBox_showLabels->setChecked(settings.value(
"showLabels",
_ui->checkBox_showLabels->isChecked()).toBool());
2239 _ui->checkBox_showFrames->setChecked(settings.value(
"showFrames",
_ui->checkBox_showFrames->isChecked()).toBool());
2240 _ui->checkBox_showLandmarks->setChecked(settings.value(
"showLandmarks",
_ui->checkBox_showLandmarks->isChecked()).toBool());
2241 _ui->doubleSpinBox_landmarkSize->setValue(settings.value(
"landmarkSize",
_ui->doubleSpinBox_landmarkSize->value()).toDouble());
2242 _ui->checkBox_showIMUGravity->setChecked(settings.value(
"showIMUGravity",
_ui->checkBox_showIMUGravity->isChecked()).toBool());
2243 _ui->checkBox_showIMUAcc->setChecked(settings.value(
"showIMUAcc",
_ui->checkBox_showIMUAcc->isChecked()).toBool());
2245 _ui->radioButton_noFiltering->setChecked(settings.value(
"noFiltering",
_ui->radioButton_noFiltering->isChecked()).toBool());
2246 _ui->radioButton_nodeFiltering->setChecked(settings.value(
"cloudFiltering",
_ui->radioButton_nodeFiltering->isChecked()).toBool());
2247 _ui->doubleSpinBox_cloudFilterRadius->setValue(settings.value(
"cloudFilteringRadius",
_ui->doubleSpinBox_cloudFilterRadius->value()).toDouble());
2248 _ui->doubleSpinBox_cloudFilterAngle->setValue(settings.value(
"cloudFilteringAngle",
_ui->doubleSpinBox_cloudFilterAngle->value()).toDouble());
2249 _ui->radioButton_subtractFiltering->setChecked(settings.value(
"subtractFiltering",
_ui->radioButton_subtractFiltering->isChecked()).toBool());
2250 _ui->spinBox_subtractFilteringMinPts->setValue(settings.value(
"subtractFilteringMinPts",
_ui->spinBox_subtractFilteringMinPts->value()).toInt());
2251 _ui->doubleSpinBox_subtractFilteringRadius->setValue(settings.value(
"subtractFilteringRadius",
_ui->doubleSpinBox_subtractFilteringRadius->value()).toDouble());
2252 _ui->doubleSpinBox_subtractFilteringAngle->setValue(settings.value(
"subtractFilteringAngle",
_ui->doubleSpinBox_subtractFilteringAngle->value()).toDouble());
2254 _ui->checkBox_map_shown->setChecked(settings.value(
"gridMapShown",
_ui->checkBox_map_shown->isChecked()).toBool());
2255 _ui->doubleSpinBox_map_opacity->setValue(settings.value(
"gridMapOpacity",
_ui->doubleSpinBox_map_opacity->value()).toDouble());
2257 _ui->groupBox_octomap->setChecked(settings.value(
"octomap",
_ui->groupBox_octomap->isChecked()).toBool());
2258 _ui->spinBox_octomap_treeDepth->setValue(settings.value(
"octomap_depth",
_ui->spinBox_octomap_treeDepth->value()).toInt());
2259 _ui->checkBox_octomap_2dgrid->setChecked(settings.value(
"octomap_2dgrid",
_ui->checkBox_octomap_2dgrid->isChecked()).toBool());
2260 _ui->checkBox_octomap_show3dMap->setChecked(settings.value(
"octomap_3dmap",
_ui->checkBox_octomap_show3dMap->isChecked()).toBool());
2261 _ui->comboBox_octomap_renderingType->setCurrentIndex(settings.value(
"octomap_rendering_type",
_ui->comboBox_octomap_renderingType->currentIndex()).toInt());
2262 _ui->spinBox_octomap_pointSize->setValue(settings.value(
"octomap_point_size",
_ui->spinBox_octomap_pointSize->value()).toInt());
2264 _ui->groupBox_organized->setChecked(settings.value(
"meshing",
_ui->groupBox_organized->isChecked()).toBool());
2265 _ui->doubleSpinBox_mesh_angleTolerance->setValue(settings.value(
"meshing_angle",
_ui->doubleSpinBox_mesh_angleTolerance->value()).toDouble());
2266 _ui->checkBox_mesh_quad->setChecked(settings.value(
"meshing_quad",
_ui->checkBox_mesh_quad->isChecked()).toBool());
2267 _ui->checkBox_mesh_texture->setChecked(settings.value(
"meshing_texture",
_ui->checkBox_mesh_texture->isChecked()).toBool());
2268 _ui->spinBox_mesh_triangleSize->setValue(settings.value(
"meshing_triangle_size",
_ui->spinBox_mesh_triangleSize->value()).toInt());
2270 settings.endGroup();
2272 settings.endGroup();
2278 if(!filePath.isEmpty())
2282 QSettings settings(path, QSettings::IniFormat);
2284 settings.beginGroup(
"Camera");
2285 _ui->general_doubleSpinBox_imgRate->setValue(settings.value(
"imgRate",
_ui->general_doubleSpinBox_imgRate->value()).toDouble());
2286 _ui->source_mirroring->setChecked(settings.value(
"mirroring",
_ui->source_mirroring->isChecked()).toBool());
2287 _ui->lineEdit_calibrationFile->setText(settings.value(
"calibrationName",
_ui->lineEdit_calibrationFile->text()).toString());
2288 _ui->comboBox_sourceType->setCurrentIndex(settings.value(
"type",
_ui->comboBox_sourceType->currentIndex()).toInt());
2289 _ui->lineEdit_sourceDevice->setText(settings.value(
"device",
_ui->lineEdit_sourceDevice->text()).toString());
2290 _ui->lineEdit_sourceLocalTransform->setText(settings.value(
"localTransform",
_ui->lineEdit_sourceLocalTransform->text()).toString());
2291 _ui->spinBox_source_imageDecimation->setValue(settings.value(
"imageDecimation",
_ui->spinBox_source_imageDecimation->value()).toInt());
2293 settings.beginGroup(
"rgbd");
2294 _ui->comboBox_cameraRGBD->setCurrentIndex(settings.value(
"driver",
_ui->comboBox_cameraRGBD->currentIndex()).toInt());
2295 _ui->checkbox_rgbd_colorOnly->setChecked(settings.value(
"rgbdColorOnly",
_ui->checkbox_rgbd_colorOnly->isChecked()).toBool());
2296 _ui->lineEdit_source_distortionModel->setText(settings.value(
"distortion_model",
_ui->lineEdit_source_distortionModel->text()).toString());
2297 _ui->groupBox_bilateral->setChecked(settings.value(
"bilateral",
_ui->groupBox_bilateral->isChecked()).toBool());
2298 _ui->doubleSpinBox_bilateral_sigmaS->setValue(settings.value(
"bilateral_sigma_s",
_ui->doubleSpinBox_bilateral_sigmaS->value()).toDouble());
2299 _ui->doubleSpinBox_bilateral_sigmaR->setValue(settings.value(
"bilateral_sigma_r",
_ui->doubleSpinBox_bilateral_sigmaR->value()).toDouble());
2300 settings.endGroup();
2302 settings.beginGroup(
"stereo");
2303 _ui->comboBox_cameraStereo->setCurrentIndex(settings.value(
"driver",
_ui->comboBox_cameraStereo->currentIndex()).toInt());
2304 _ui->checkbox_stereo_depthGenerated->setChecked(settings.value(
"depthGenerated",
_ui->checkbox_stereo_depthGenerated->isChecked()).toBool());
2305 _ui->checkBox_stereo_exposureCompensation->setChecked(settings.value(
"exposureCompensation",
_ui->checkBox_stereo_exposureCompensation->isChecked()).toBool());
2306 settings.endGroup();
2308 settings.beginGroup(
"rgb");
2309 _ui->source_comboBox_image_type->setCurrentIndex(settings.value(
"driver",
_ui->source_comboBox_image_type->currentIndex()).toInt());
2310 _ui->checkBox_rgb_rectify->setChecked(settings.value(
"rectify",
_ui->checkBox_rgb_rectify->isChecked()).toBool());
2311 settings.endGroup();
2313 settings.beginGroup(
"Openni");
2314 _ui->lineEdit_openniOniPath->setText(settings.value(
"oniPath",
_ui->lineEdit_openniOniPath->text()).toString());
2315 settings.endGroup();
2317 settings.beginGroup(
"Openni2");
2318 _ui->openni2_autoWhiteBalance->setChecked(settings.value(
"autoWhiteBalance",
_ui->openni2_autoWhiteBalance->isChecked()).toBool());
2319 _ui->openni2_autoExposure->setChecked(settings.value(
"autoExposure",
_ui->openni2_autoExposure->isChecked()).toBool());
2320 _ui->openni2_exposure->setValue(settings.value(
"exposure",
_ui->openni2_exposure->value()).toInt());
2321 _ui->openni2_gain->setValue(settings.value(
"gain",
_ui->openni2_gain->value()).toInt());
2322 _ui->openni2_mirroring->setChecked(settings.value(
"mirroring",
_ui->openni2_mirroring->isChecked()).toBool());
2323 _ui->openni2_stampsIdsUsed->setChecked(settings.value(
"stampsIdsUsed",
_ui->openni2_stampsIdsUsed->isChecked()).toBool());
2324 _ui->lineEdit_openni2OniPath->setText(settings.value(
"oniPath",
_ui->lineEdit_openni2OniPath->text()).toString());
2325 _ui->openni2_hshift->setValue(settings.value(
"hshift",
_ui->openni2_hshift->value()).toInt());
2326 _ui->openni2_vshift->setValue(settings.value(
"vshift",
_ui->openni2_vshift->value()).toInt());
2327 settings.endGroup();
2329 settings.beginGroup(
"Freenect2");
2330 _ui->comboBox_freenect2Format->setCurrentIndex(settings.value(
"format",
_ui->comboBox_freenect2Format->currentIndex()).toInt());
2331 _ui->doubleSpinBox_freenect2MinDepth->setValue(settings.value(
"minDepth",
_ui->doubleSpinBox_freenect2MinDepth->value()).toDouble());
2332 _ui->doubleSpinBox_freenect2MaxDepth->setValue(settings.value(
"maxDepth",
_ui->doubleSpinBox_freenect2MaxDepth->value()).toDouble());
2333 _ui->checkBox_freenect2BilateralFiltering->setChecked(settings.value(
"bilateralFiltering",
_ui->checkBox_freenect2BilateralFiltering->isChecked()).toBool());
2334 _ui->checkBox_freenect2EdgeAwareFiltering->setChecked(settings.value(
"edgeAwareFiltering",
_ui->checkBox_freenect2EdgeAwareFiltering->isChecked()).toBool());
2335 _ui->checkBox_freenect2NoiseFiltering->setChecked(settings.value(
"noiseFiltering",
_ui->checkBox_freenect2NoiseFiltering->isChecked()).toBool());
2336 _ui->lineEdit_freenect2Pipeline->setText(settings.value(
"pipeline",
_ui->lineEdit_freenect2Pipeline->text()).toString());
2337 settings.endGroup();
2339 settings.beginGroup(
"K4W2");
2340 _ui->comboBox_k4w2Format->setCurrentIndex(settings.value(
"format",
_ui->comboBox_k4w2Format->currentIndex()).toInt());
2341 settings.endGroup();
2343 settings.beginGroup(
"K4A");
2344 _ui->comboBox_k4a_rgb_resolution->setCurrentIndex(settings.value(
"rgb_resolution",
_ui->comboBox_k4a_rgb_resolution->currentIndex()).toInt());
2345 _ui->comboBox_k4a_framerate->setCurrentIndex(settings.value(
"framerate",
_ui->comboBox_k4a_framerate->currentIndex()).toInt());
2346 _ui->comboBox_k4a_depth_resolution->setCurrentIndex(settings.value(
"depth_resolution",
_ui->comboBox_k4a_depth_resolution->currentIndex()).toInt());
2347 _ui->checkbox_k4a_irDepth->setChecked(settings.value(
"ir",
_ui->checkbox_k4a_irDepth->isChecked()).toBool());
2348 _ui->lineEdit_k4a_mkv->setText(settings.value(
"mkvPath",
_ui->lineEdit_k4a_mkv->text()).toString());
2349 _ui->source_checkBox_useMKVStamps->setChecked(settings.value(
"useMkvStamps",
_ui->source_checkBox_useMKVStamps->isChecked()).toBool());
2350 settings.endGroup();
2352 settings.beginGroup(
"RealSense");
2353 _ui->comboBox_realsensePresetRGB->setCurrentIndex(settings.value(
"presetRGB",
_ui->comboBox_realsensePresetRGB->currentIndex()).toInt());
2354 _ui->comboBox_realsensePresetDepth->setCurrentIndex(settings.value(
"presetDepth",
_ui->comboBox_realsensePresetDepth->currentIndex()).toInt());
2355 _ui->checkbox_realsenseOdom->setChecked(settings.value(
"odom",
_ui->checkbox_realsenseOdom->isChecked()).toBool());
2356 _ui->checkbox_realsenseDepthScaledToRGBSize->setChecked(settings.value(
"depthScaled",
_ui->checkbox_realsenseDepthScaledToRGBSize->isChecked()).toBool());
2357 _ui->comboBox_realsenseRGBSource->setCurrentIndex(settings.value(
"rgbSource",
_ui->comboBox_realsenseRGBSource->currentIndex()).toInt());
2358 settings.endGroup();
2360 settings.beginGroup(
"RealSense2");
2361 _ui->checkbox_rs2_emitter->setChecked(settings.value(
"emitter",
_ui->checkbox_rs2_emitter->isChecked()).toBool());
2362 _ui->checkbox_rs2_irMode->setChecked(settings.value(
"ir",
_ui->checkbox_rs2_irMode->isChecked()).toBool());
2363 _ui->checkbox_rs2_irDepth->setChecked(settings.value(
"irdepth",
_ui->checkbox_rs2_irDepth->isChecked()).toBool());
2364 _ui->spinBox_rs2_width->setValue(settings.value(
"width",
_ui->spinBox_rs2_width->value()).toInt());
2365 _ui->spinBox_rs2_height->setValue(settings.value(
"height",
_ui->spinBox_rs2_height->value()).toInt());
2366 _ui->spinBox_rs2_rate->setValue(settings.value(
"rate",
_ui->spinBox_rs2_rate->value()).toInt());
2367 _ui->checkbox_rs2_globalTimeStync->setChecked(settings.value(
"global_time_sync",
_ui->checkbox_rs2_globalTimeStync->isChecked()).toBool());
2368 _ui->checkbox_rs2_dualMode->setChecked(settings.value(
"dual_mode",
_ui->checkbox_rs2_dualMode->isChecked()).toBool());
2369 _ui->lineEdit_rs2_dualModeExtrinsics->setText(settings.value(
"dual_mode_extrinsics",
_ui->lineEdit_rs2_dualModeExtrinsics->text()).toString());
2370 _ui->lineEdit_rs2_jsonFile->setText(settings.value(
"json_preset",
_ui->lineEdit_rs2_jsonFile->text()).toString());
2371 settings.endGroup();
2373 settings.beginGroup(
"RGBDImages");
2374 _ui->lineEdit_cameraRGBDImages_path_rgb->setText(settings.value(
"path_rgb",
_ui->lineEdit_cameraRGBDImages_path_rgb->text()).toString());
2375 _ui->lineEdit_cameraRGBDImages_path_depth->setText(settings.value(
"path_depth",
_ui->lineEdit_cameraRGBDImages_path_depth->text()).toString());
2376 _ui->doubleSpinBox_cameraRGBDImages_scale->setValue(settings.value(
"scale",
_ui->doubleSpinBox_cameraRGBDImages_scale->value()).toDouble());
2377 _ui->spinBox_cameraRGBDImages_startIndex->setValue(settings.value(
"start_index",
_ui->spinBox_cameraRGBDImages_startIndex->value()).toInt());
2378 _ui->spinBox_cameraRGBDImages_maxFrames->setValue(settings.value(
"max_frames",
_ui->spinBox_cameraRGBDImages_maxFrames->value()).toInt());
2379 settings.endGroup();
2381 settings.beginGroup(
"StereoImages");
2382 _ui->lineEdit_cameraStereoImages_path_left->setText(settings.value(
"path_left",
_ui->lineEdit_cameraStereoImages_path_left->text()).toString());
2383 _ui->lineEdit_cameraStereoImages_path_right->setText(settings.value(
"path_right",
_ui->lineEdit_cameraStereoImages_path_right->text()).toString());
2384 _ui->checkBox_stereo_rectify->setChecked(settings.value(
"rectify",
_ui->checkBox_stereo_rectify->isChecked()).toBool());
2385 _ui->spinBox_cameraStereoImages_startIndex->setValue(settings.value(
"start_index",
_ui->spinBox_cameraStereoImages_startIndex->value()).toInt());
2386 _ui->spinBox_cameraStereoImages_maxFrames->setValue(settings.value(
"max_frames",
_ui->spinBox_cameraStereoImages_maxFrames->value()).toInt());
2387 settings.endGroup();
2389 settings.beginGroup(
"StereoVideo");
2390 _ui->lineEdit_cameraStereoVideo_path->setText(settings.value(
"path",
_ui->lineEdit_cameraStereoVideo_path->text()).toString());
2391 _ui->lineEdit_cameraStereoVideo_path_2->setText(settings.value(
"path2",
_ui->lineEdit_cameraStereoVideo_path_2->text()).toString());
2392 _ui->spinBox_stereo_right_device->setValue(settings.value(
"device2",
_ui->spinBox_stereo_right_device->value()).toInt());
2393 settings.endGroup();
2395 settings.beginGroup(
"StereoZed");
2396 _ui->comboBox_stereoZed_resolution->setCurrentIndex(settings.value(
"resolution",
_ui->comboBox_stereoZed_resolution->currentIndex()).toInt());
2397 _ui->comboBox_stereoZed_quality->setCurrentIndex(settings.value(
"quality",
_ui->comboBox_stereoZed_quality->currentIndex()).toInt());
2398 _ui->checkbox_stereoZed_selfCalibration->setChecked(settings.value(
"self_calibration",
_ui->checkbox_stereoZed_selfCalibration->isChecked()).toBool());
2399 _ui->comboBox_stereoZed_sensingMode->setCurrentIndex(settings.value(
"sensing_mode",
_ui->comboBox_stereoZed_sensingMode->currentIndex()).toInt());
2400 _ui->spinBox_stereoZed_confidenceThr->setValue(settings.value(
"confidence_thr",
_ui->spinBox_stereoZed_confidenceThr->value()).toInt());
2401 _ui->spinBox_stereoZed_texturenessConfidenceThr->setValue(settings.value(
"textureness_confidence_thr",
_ui->spinBox_stereoZed_texturenessConfidenceThr->value()).toInt());
2402 _ui->checkbox_stereoZed_odom->setChecked(settings.value(
"odom",
_ui->checkbox_stereoZed_odom->isChecked()).toBool());
2403 _ui->lineEdit_zedSvoPath->setText(settings.value(
"svo_path",
_ui->lineEdit_zedSvoPath->text()).toString());
2404 settings.endGroup();
2406 settings.beginGroup(
"StereoRealSense2");
2407 _ui->checkbox_stereoRealSense2_odom->setChecked(settings.value(
"odom",
_ui->checkbox_stereoRealSense2_odom->isChecked()).toBool());
2408 settings.endGroup();
2410 settings.beginGroup(
"MyntEye");
2411 _ui->checkbox_stereoMyntEye_rectify->setChecked(settings.value(
"rectify",
_ui->checkbox_stereoMyntEye_rectify->isChecked()).toBool());
2412 _ui->checkbox_stereoMyntEye_depth->setChecked(settings.value(
"depth",
_ui->checkbox_stereoMyntEye_depth->isChecked()).toBool());
2413 _ui->checkbox_stereoMyntEye_autoExposure->setChecked(settings.value(
"auto_exposure",
_ui->checkbox_stereoMyntEye_autoExposure->isChecked()).toBool());
2414 _ui->spinBox_stereoMyntEye_gain->setValue(settings.value(
"gain",
_ui->spinBox_stereoMyntEye_gain->value()).toInt());
2415 _ui->spinBox_stereoMyntEye_brightness->setValue(settings.value(
"brightness",
_ui->spinBox_stereoMyntEye_brightness->value()).toInt());
2416 _ui->spinBox_stereoMyntEye_contrast->setValue(settings.value(
"contrast",
_ui->spinBox_stereoMyntEye_contrast->value()).toInt());
2417 _ui->spinBox_stereoMyntEye_irControl->setValue(settings.value(
"ir_control",
_ui->spinBox_stereoMyntEye_irControl->value()).toInt());
2418 settings.endGroup();
2420 settings.beginGroup(
"Images");
2421 _ui->source_images_lineEdit_path->setText(settings.value(
"path",
_ui->source_images_lineEdit_path->text()).toString());
2422 _ui->source_images_spinBox_startPos->setValue(settings.value(
"startPos",
_ui->source_images_spinBox_startPos->value()).toInt());
2423 _ui->source_images_spinBox_maxFrames->setValue(settings.value(
"maxFrames",
_ui->source_images_spinBox_maxFrames->value()).toInt());
2424 _ui->comboBox_cameraImages_bayerMode->setCurrentIndex(settings.value(
"bayerMode",
_ui->comboBox_cameraImages_bayerMode->currentIndex()).toInt());
2426 _ui->checkBox_cameraImages_configForEachFrame->setChecked(settings.value(
"config_each_frame",
_ui->checkBox_cameraImages_configForEachFrame->isChecked()).toBool());
2427 _ui->checkBox_cameraImages_timestamps->setChecked(settings.value(
"filenames_as_stamps",
_ui->checkBox_cameraImages_timestamps->isChecked()).toBool());
2428 _ui->checkBox_cameraImages_syncTimeStamps->setChecked(settings.value(
"sync_stamps",
_ui->checkBox_cameraImages_syncTimeStamps->isChecked()).toBool());
2429 _ui->lineEdit_cameraImages_timestamps->setText(settings.value(
"stamps",
_ui->lineEdit_cameraImages_timestamps->text()).toString());
2430 _ui->lineEdit_cameraImages_path_scans->setText(settings.value(
"path_scans",
_ui->lineEdit_cameraImages_path_scans->text()).toString());
2431 _ui->lineEdit_cameraImages_laser_transform->setText(settings.value(
"scan_transform",
_ui->lineEdit_cameraImages_laser_transform->text()).toString());
2432 _ui->spinBox_cameraImages_max_scan_pts->setValue(settings.value(
"scan_max_pts",
_ui->spinBox_cameraImages_max_scan_pts->value()).toInt());
2433 _ui->lineEdit_cameraImages_odom->setText(settings.value(
"odom_path",
_ui->lineEdit_cameraImages_odom->text()).toString());
2434 _ui->comboBox_cameraImages_odomFormat->setCurrentIndex(settings.value(
"odom_format",
_ui->comboBox_cameraImages_odomFormat->currentIndex()).toInt());
2435 _ui->lineEdit_cameraImages_gt->setText(settings.value(
"gt_path",
_ui->lineEdit_cameraImages_gt->text()).toString());
2436 _ui->comboBox_cameraImages_gtFormat->setCurrentIndex(settings.value(
"gt_format",
_ui->comboBox_cameraImages_gtFormat->currentIndex()).toInt());
2437 _ui->doubleSpinBox_maxPoseTimeDiff->setValue(settings.value(
"max_pose_time_diff",
_ui->doubleSpinBox_maxPoseTimeDiff->value()).toDouble());
2439 _ui->lineEdit_cameraImages_path_imu->setText(settings.value(
"imu_path",
_ui->lineEdit_cameraImages_path_imu->text()).toString());
2440 _ui->lineEdit_cameraImages_imu_transform->setText(settings.value(
"imu_local_transform",
_ui->lineEdit_cameraImages_imu_transform->text()).toString());
2441 _ui->spinBox_cameraImages_max_imu_rate->setValue(settings.value(
"imu_rate",
_ui->spinBox_cameraImages_max_imu_rate->value()).toInt());
2442 settings.endGroup();
2444 settings.beginGroup(
"UsbCam");
2445 _ui->spinBox_usbcam_streamWidth->setValue(settings.value(
"width",
_ui->spinBox_usbcam_streamWidth->value()).toInt());
2446 _ui->spinBox_usbcam_streamHeight->setValue(settings.value(
"height",
_ui->spinBox_usbcam_streamHeight->value()).toInt());
2447 settings.endGroup();
2449 settings.beginGroup(
"Video");
2450 _ui->source_video_lineEdit_path->setText(settings.value(
"path",
_ui->source_video_lineEdit_path->text()).toString());
2451 settings.endGroup();
2453 settings.beginGroup(
"IMU");
2454 _ui->comboBox_imuFilter_strategy->setCurrentIndex(settings.value(
"strategy",
_ui->comboBox_imuFilter_strategy->currentIndex()).toInt());
2455 _ui->doubleSpinBox_imuFilterMadgwickGain->setValue(settings.value(
"madgwick_gain",
_ui->doubleSpinBox_imuFilterMadgwickGain->value()).toDouble());
2456 _ui->doubleSpinBox_imuFilterMadgwickZeta->setValue(settings.value(
"madgwick_zeta",
_ui->doubleSpinBox_imuFilterMadgwickZeta->value()).toDouble());
2457 _ui->doubleSpinBox_imuFilterComplementaryGainAcc->setValue(settings.value(
"complementary_gain_acc",
_ui->doubleSpinBox_imuFilterComplementaryGainAcc->value()).toDouble());
2458 _ui->doubleSpinBox_imuFilterComplementaryBiasAlpha->setValue(settings.value(
"complementary_bias_alpha",
_ui->doubleSpinBox_imuFilterComplementaryBiasAlpha->value()).toDouble());
2459 _ui->checkBox_imuFilterComplementaryDoAdaptiveGain->setChecked(settings.value(
"complementary_adaptive_gain",
_ui->checkBox_imuFilterComplementaryDoAdaptiveGain->isChecked()).toBool());
2460 _ui->checkBox_imuFilterComplementaryDoBiasEstimation->setChecked(settings.value(
"complementary_biais_estimation",
_ui->checkBox_imuFilterComplementaryDoBiasEstimation->isChecked()).toBool());
2461 _ui->checkbox_publishInterIMU->setChecked(settings.value(
"publish_inter_imu",
_ui->checkbox_publishInterIMU->isChecked()).toBool());
2462 settings.endGroup();
2464 settings.beginGroup(
"Scan");
2465 _ui->checkBox_source_scanFromDepth->setChecked(settings.value(
"fromDepth",
_ui->checkBox_source_scanFromDepth->isChecked()).toBool());
2466 _ui->spinBox_source_scanDownsampleStep->setValue(settings.value(
"downsampleStep",
_ui->spinBox_source_scanDownsampleStep->value()).toInt());
2467 _ui->doubleSpinBox_source_scanRangeMin->setValue(settings.value(
"rangeMin",
_ui->doubleSpinBox_source_scanRangeMin->value()).toDouble());
2468 _ui->doubleSpinBox_source_scanRangeMax->setValue(settings.value(
"rangeMax",
_ui->doubleSpinBox_source_scanRangeMax->value()).toDouble());
2469 _ui->doubleSpinBox_source_scanVoxelSize->setValue(settings.value(
"voxelSize",
_ui->doubleSpinBox_source_scanVoxelSize->value()).toDouble());
2470 _ui->spinBox_source_scanNormalsK->setValue(settings.value(
"normalsK",
_ui->spinBox_source_scanNormalsK->value()).toInt());
2471 _ui->doubleSpinBox_source_scanNormalsRadius->setValue(settings.value(
"normalsRadius",
_ui->doubleSpinBox_source_scanNormalsRadius->value()).toDouble());
2472 _ui->doubleSpinBox_source_scanNormalsForceGroundUp->setValue(settings.value(
"normalsUpF",
_ui->doubleSpinBox_source_scanNormalsForceGroundUp->value()).toDouble());
2473 settings.endGroup();
2475 settings.beginGroup(
"DepthFromScan");
2476 _ui->groupBox_depthFromScan->setChecked(settings.value(
"depthFromScan",
_ui->groupBox_depthFromScan->isChecked()).toBool());
2477 _ui->groupBox_depthFromScan_fillHoles->setChecked(settings.value(
"depthFromScanFillHoles",
_ui->groupBox_depthFromScan_fillHoles->isChecked()).toBool());
2478 _ui->radioButton_depthFromScan_vertical->setChecked(settings.value(
"depthFromScanVertical",
_ui->radioButton_depthFromScan_vertical->isChecked()).toBool());
2479 _ui->radioButton_depthFromScan_horizontal->setChecked(settings.value(
"depthFromScanHorizontal",
_ui->radioButton_depthFromScan_horizontal->isChecked()).toBool());
2480 _ui->checkBox_depthFromScan_fillBorders->setChecked(settings.value(
"depthFromScanFillBorders",
_ui->checkBox_depthFromScan_fillBorders->isChecked()).toBool());
2481 settings.endGroup();
2483 settings.beginGroup(
"Database");
2484 _ui->source_database_lineEdit_path->setText(settings.value(
"path",
_ui->source_database_lineEdit_path->text()).toString());
2485 _ui->source_checkBox_ignoreOdometry->setChecked(settings.value(
"ignoreOdometry",
_ui->source_checkBox_ignoreOdometry->isChecked()).toBool());
2486 _ui->source_checkBox_ignoreGoalDelay->setChecked(settings.value(
"ignoreGoalDelay",
_ui->source_checkBox_ignoreGoalDelay->isChecked()).toBool());
2487 _ui->source_checkBox_ignoreGoals->setChecked(settings.value(
"ignoreGoals",
_ui->source_checkBox_ignoreGoals->isChecked()).toBool());
2488 _ui->source_spinBox_databaseStartId->setValue(settings.value(
"startId",
_ui->source_spinBox_databaseStartId->value()).toInt());
2489 _ui->source_spinBox_databaseStopId->setValue(settings.value(
"stopId",
_ui->source_spinBox_databaseStopId->value()).toInt());
2490 _ui->source_spinBox_database_cameraIndex->setValue(settings.value(
"cameraIndex",
_ui->source_spinBox_database_cameraIndex->value()).toInt());
2491 _ui->source_checkBox_useDbStamps->setChecked(settings.value(
"useDatabaseStamps",
_ui->source_checkBox_useDbStamps->isChecked()).toBool());
2492 settings.endGroup();
2494 settings.endGroup();
2508 if(!filePath.isEmpty())
2513 UDEBUG(
"%s", path.toStdString().c_str());
2515 if(!QFile::exists(path))
2517 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));
2523 for(rtabmap::ParametersMap::const_iterator iter = parameters.begin(); iter!=parameters.end(); ++iter)
2525 std::string value = iter->second;
2526 if(iter->first.compare(Parameters::kRtabmapWorkingDirectory()) == 0)
2533 UWARN(
"Reading config: Not existing working directory \"%s\". Keeping old one (\"%s\").",
2541 UWARN(
"Reading config: Not existing working directory \"%s\". Using default one (\"%s\").",
2543 defaultWorkingDir.c_str());
2544 value = defaultWorkingDir;
2552 if(parameters.find(Parameters::kRtabmapWorkingDirectory()) == parameters.end())
2556 QMessageBox::information(
this,
2557 tr(
"Working directory"),
2558 tr(
"RTAB-Map needs a working directory to put the database.\n\n" 2559 "By default, the directory \"%1\" is used.\n\n" 2560 "The working directory can be changed any time in the " 2572 QString path = QFileDialog::getSaveFileName(
this, tr(
"Save settings..."), this->
getWorkingDirectory()+QDir::separator()+
"config.ini",
"*.ini");
2585 int button = QMessageBox::warning(
this,
2586 tr(
"Reset settings..."),
2587 tr(
"This will reset all settings. Restore all settings to default without saving them first?"),
2588 QMessageBox::Cancel | QMessageBox::Yes | QMessageBox::Save,
2589 QMessageBox::Cancel);
2590 if(button == QMessageBox::Yes ||
2619 if (
_parameters.at(iter->first).compare(iter->second) != 0)
2621 bool different =
true;
2632 UINFO(
"modified %s = %s->%s", iter->first.c_str(),
_parameters.at(iter->first).c_str(), iter->second.c_str());
2645 if(!filePath.isEmpty())
2649 QSettings settings(path, QSettings::IniFormat);
2650 settings.beginGroup(
"Gui");
2652 settings.beginGroup(
"General");
2653 settings.remove(
"");
2654 settings.setValue(
"imagesKept",
_ui->general_checkBox_imagesKept->isChecked());
2655 settings.setValue(
"cloudsKept",
_ui->general_checkBox_cloudsKept->isChecked());
2656 settings.setValue(
"loggerLevel",
_ui->comboBox_loggerLevel->currentIndex());
2657 settings.setValue(
"loggerEventLevel",
_ui->comboBox_loggerEventLevel->currentIndex());
2658 settings.setValue(
"loggerPauseLevel",
_ui->comboBox_loggerPauseLevel->currentIndex());
2659 settings.setValue(
"loggerType",
_ui->comboBox_loggerType->currentIndex());
2660 settings.setValue(
"loggerPrintTime",
_ui->checkBox_logger_printTime->isChecked());
2661 settings.setValue(
"loggerPrintThreadId",
_ui->checkBox_logger_printThreadId->isChecked());
2662 settings.setValue(
"verticalLayoutUsed",
_ui->checkBox_verticalLayoutUsed->isChecked());
2663 settings.setValue(
"imageRejectedShown",
_ui->checkBox_imageRejectedShown->isChecked());
2664 settings.setValue(
"imageHighestHypShown",
_ui->checkBox_imageHighestHypShown->isChecked());
2665 settings.setValue(
"beep",
_ui->checkBox_beep->isChecked());
2666 settings.setValue(
"figure_time",
_ui->checkBox_stamps->isChecked());
2667 settings.setValue(
"figure_cache",
_ui->checkBox_cacheStatistics->isChecked());
2668 settings.setValue(
"notifyNewGlobalPath",
_ui->checkBox_notifyWhenNewGlobalPathIsReceived->isChecked());
2669 settings.setValue(
"odomQualityThr",
_ui->spinBox_odomQualityWarnThr->value());
2670 settings.setValue(
"odomOnlyInliersShown",
_ui->checkBox_odom_onlyInliersShown->isChecked());
2671 settings.setValue(
"posteriorGraphView",
_ui->radioButton_posteriorGraphView->isChecked());
2672 settings.setValue(
"wordsGraphView",
_ui->radioButton_wordsGraphView->isChecked());
2673 settings.setValue(
"localizationsGraphView",
_ui->radioButton_localizationsGraphView->isChecked());
2674 settings.setValue(
"nochangeGraphView",
_ui->radioButton_nochangeGraphView->isChecked());
2675 settings.setValue(
"odomDisabled",
_ui->checkbox_odomDisabled->isChecked());
2676 settings.setValue(
"odomRegistration",
_ui->odom_registration->currentIndex());
2677 settings.setValue(
"odomF2MGravitySigma",
_ui->odom_f2m_gravitySigma->value());
2678 settings.setValue(
"gtAlign",
_ui->checkbox_groundTruthAlign->isChecked());
2680 for(
int i=0; i<2; ++i)
2705 settings.setValue(
"cloudVoxel",
_ui->doubleSpinBox_voxel->value());
2706 settings.setValue(
"cloudNoiseRadius",
_ui->doubleSpinBox_noiseRadius->value());
2707 settings.setValue(
"cloudNoiseMinNeighbors",
_ui->spinBox_noiseMinNeighbors->value());
2708 settings.setValue(
"cloudCeilingHeight",
_ui->doubleSpinBox_ceilingFilterHeight->value());
2709 settings.setValue(
"cloudFloorHeight",
_ui->doubleSpinBox_floorFilterHeight->value());
2710 settings.setValue(
"normalKSearch",
_ui->spinBox_normalKSearch->value());
2711 settings.setValue(
"normalRadiusSearch",
_ui->doubleSpinBox_normalRadiusSearch->value());
2712 settings.setValue(
"scanCeilingHeight",
_ui->doubleSpinBox_ceilingFilterHeight_scan->value());
2713 settings.setValue(
"scanFloorHeight",
_ui->doubleSpinBox_floorFilterHeight_scan->value());
2714 settings.setValue(
"scanNormalKSearch",
_ui->spinBox_normalKSearch_scan->value());
2715 settings.setValue(
"scanNormalRadiusSearch",
_ui->doubleSpinBox_normalRadiusSearch_scan->value());
2717 settings.setValue(
"showGraphs",
_ui->checkBox_showGraphs->isChecked());
2718 settings.setValue(
"showLabels",
_ui->checkBox_showLabels->isChecked());
2719 settings.setValue(
"showFrames",
_ui->checkBox_showFrames->isChecked());
2720 settings.setValue(
"showLandmarks",
_ui->checkBox_showLandmarks->isChecked());
2721 settings.setValue(
"landmarkSize",
_ui->doubleSpinBox_landmarkSize->value());
2722 settings.setValue(
"showIMUGravity",
_ui->checkBox_showIMUGravity->isChecked());
2723 settings.setValue(
"showIMUAcc",
_ui->checkBox_showIMUAcc->isChecked());
2726 settings.setValue(
"noFiltering",
_ui->radioButton_noFiltering->isChecked());
2727 settings.setValue(
"cloudFiltering",
_ui->radioButton_nodeFiltering->isChecked());
2728 settings.setValue(
"cloudFilteringRadius",
_ui->doubleSpinBox_cloudFilterRadius->value());
2729 settings.setValue(
"cloudFilteringAngle",
_ui->doubleSpinBox_cloudFilterAngle->value());
2730 settings.setValue(
"subtractFiltering",
_ui->radioButton_subtractFiltering->isChecked());
2731 settings.setValue(
"subtractFilteringMinPts",
_ui->spinBox_subtractFilteringMinPts->value());
2732 settings.setValue(
"subtractFilteringRadius",
_ui->doubleSpinBox_subtractFilteringRadius->value());
2733 settings.setValue(
"subtractFilteringAngle",
_ui->doubleSpinBox_subtractFilteringAngle->value());
2735 settings.setValue(
"gridMapShown",
_ui->checkBox_map_shown->isChecked());
2736 settings.setValue(
"gridMapOpacity",
_ui->doubleSpinBox_map_opacity->value());
2738 settings.setValue(
"octomap",
_ui->groupBox_octomap->isChecked());
2739 settings.setValue(
"octomap_depth",
_ui->spinBox_octomap_treeDepth->value());
2740 settings.setValue(
"octomap_2dgrid",
_ui->checkBox_octomap_2dgrid->isChecked());
2741 settings.setValue(
"octomap_3dmap",
_ui->checkBox_octomap_show3dMap->isChecked());
2742 settings.setValue(
"octomap_rendering_type",
_ui->comboBox_octomap_renderingType->currentIndex());
2743 settings.setValue(
"octomap_point_size",
_ui->spinBox_octomap_pointSize->value());
2746 settings.setValue(
"meshing",
_ui->groupBox_organized->isChecked());
2747 settings.setValue(
"meshing_angle",
_ui->doubleSpinBox_mesh_angleTolerance->value());
2748 settings.setValue(
"meshing_quad",
_ui->checkBox_mesh_quad->isChecked());
2749 settings.setValue(
"meshing_texture",
_ui->checkBox_mesh_texture->isChecked());
2750 settings.setValue(
"meshing_triangle_size",
_ui->spinBox_mesh_triangleSize->value());
2752 settings.endGroup();
2754 settings.endGroup();
2760 if(!filePath.isEmpty())
2764 QSettings settings(path, QSettings::IniFormat);
2766 settings.beginGroup(
"Camera");
2767 settings.remove(
"");
2768 settings.setValue(
"imgRate",
_ui->general_doubleSpinBox_imgRate->value());
2769 settings.setValue(
"mirroring",
_ui->source_mirroring->isChecked());
2770 settings.setValue(
"calibrationName",
_ui->lineEdit_calibrationFile->text());
2771 settings.setValue(
"type",
_ui->comboBox_sourceType->currentIndex());
2772 settings.setValue(
"device",
_ui->lineEdit_sourceDevice->text());
2773 settings.setValue(
"localTransform",
_ui->lineEdit_sourceLocalTransform->text());
2774 settings.setValue(
"imageDecimation",
_ui->spinBox_source_imageDecimation->value());
2776 settings.beginGroup(
"rgbd");
2777 settings.setValue(
"driver",
_ui->comboBox_cameraRGBD->currentIndex());
2778 settings.setValue(
"rgbdColorOnly",
_ui->checkbox_rgbd_colorOnly->isChecked());
2779 settings.setValue(
"distortion_model",
_ui->lineEdit_source_distortionModel->text());
2780 settings.setValue(
"bilateral",
_ui->groupBox_bilateral->isChecked());
2781 settings.setValue(
"bilateral_sigma_s",
_ui->doubleSpinBox_bilateral_sigmaS->value());
2782 settings.setValue(
"bilateral_sigma_r",
_ui->doubleSpinBox_bilateral_sigmaR->value());
2783 settings.endGroup();
2785 settings.beginGroup(
"stereo");
2786 settings.setValue(
"driver",
_ui->comboBox_cameraStereo->currentIndex());
2787 settings.setValue(
"depthGenerated",
_ui->checkbox_stereo_depthGenerated->isChecked());
2788 settings.setValue(
"exposureCompensation",
_ui->checkBox_stereo_exposureCompensation->isChecked());
2789 settings.endGroup();
2791 settings.beginGroup(
"rgb");
2792 settings.setValue(
"driver",
_ui->source_comboBox_image_type->currentIndex());
2793 settings.setValue(
"rectify",
_ui->checkBox_rgb_rectify->isChecked());
2794 settings.endGroup();
2796 settings.beginGroup(
"Openni");
2797 settings.setValue(
"oniPath",
_ui->lineEdit_openniOniPath->text());
2798 settings.endGroup();
2800 settings.beginGroup(
"Openni2");
2801 settings.setValue(
"autoWhiteBalance",
_ui->openni2_autoWhiteBalance->isChecked());
2802 settings.setValue(
"autoExposure",
_ui->openni2_autoExposure->isChecked());
2803 settings.setValue(
"exposure",
_ui->openni2_exposure->value());
2804 settings.setValue(
"gain",
_ui->openni2_gain->value());
2805 settings.setValue(
"mirroring",
_ui->openni2_mirroring->isChecked());
2806 settings.setValue(
"stampsIdsUsed",
_ui->openni2_stampsIdsUsed->isChecked());
2807 settings.setValue(
"oniPath",
_ui->lineEdit_openni2OniPath->text());
2808 settings.setValue(
"hshift",
_ui->openni2_hshift->value());
2809 settings.setValue(
"vshift",
_ui->openni2_vshift->value());
2810 settings.endGroup();
2812 settings.beginGroup(
"Freenect2");
2813 settings.setValue(
"format",
_ui->comboBox_freenect2Format->currentIndex());
2814 settings.setValue(
"minDepth",
_ui->doubleSpinBox_freenect2MinDepth->value());
2815 settings.setValue(
"maxDepth",
_ui->doubleSpinBox_freenect2MaxDepth->value());
2816 settings.setValue(
"bilateralFiltering",
_ui->checkBox_freenect2BilateralFiltering->isChecked());
2817 settings.setValue(
"edgeAwareFiltering",
_ui->checkBox_freenect2EdgeAwareFiltering->isChecked());
2818 settings.setValue(
"noiseFiltering",
_ui->checkBox_freenect2NoiseFiltering->isChecked());
2819 settings.setValue(
"pipeline",
_ui->lineEdit_freenect2Pipeline->text());
2820 settings.endGroup();
2822 settings.beginGroup(
"K4W2");
2823 settings.setValue(
"format",
_ui->comboBox_k4w2Format->currentIndex());
2824 settings.endGroup();
2826 settings.beginGroup(
"K4A");
2827 settings.setValue(
"rgb_resolution",
_ui->comboBox_k4a_rgb_resolution->currentIndex());
2828 settings.setValue(
"framerate",
_ui->comboBox_k4a_framerate->currentIndex());
2829 settings.setValue(
"depth_resolution",
_ui->comboBox_k4a_depth_resolution->currentIndex());
2830 settings.setValue(
"ir",
_ui->checkbox_k4a_irDepth->isChecked());
2831 settings.setValue(
"mkvPath",
_ui->lineEdit_k4a_mkv->text());
2832 settings.setValue(
"useMkvStamps",
_ui->source_checkBox_useMKVStamps->isChecked());
2833 settings.endGroup();
2835 settings.beginGroup(
"RealSense");
2836 settings.setValue(
"presetRGB",
_ui->comboBox_realsensePresetRGB->currentIndex());
2837 settings.setValue(
"presetDepth",
_ui->comboBox_realsensePresetDepth->currentIndex());
2838 settings.setValue(
"odom",
_ui->checkbox_realsenseOdom->isChecked());
2839 settings.setValue(
"depthScaled",
_ui->checkbox_realsenseDepthScaledToRGBSize->isChecked());
2840 settings.setValue(
"rgbSource",
_ui->comboBox_realsenseRGBSource->currentIndex());
2841 settings.endGroup();
2843 settings.beginGroup(
"RealSense2");
2844 settings.setValue(
"emitter",
_ui->checkbox_rs2_emitter->isChecked());
2845 settings.setValue(
"ir",
_ui->checkbox_rs2_irMode->isChecked());
2846 settings.setValue(
"irdepth",
_ui->checkbox_rs2_irDepth->isChecked());
2847 settings.setValue(
"width",
_ui->spinBox_rs2_width->value());
2848 settings.setValue(
"height",
_ui->spinBox_rs2_height->value());
2849 settings.setValue(
"rate",
_ui->spinBox_rs2_rate->value());
2850 settings.setValue(
"global_time_sync",
_ui->checkbox_rs2_globalTimeStync->isChecked());
2851 settings.setValue(
"dual_mode",
_ui->checkbox_rs2_dualMode->isChecked());
2852 settings.setValue(
"dual_mode_extrinsics",
_ui->lineEdit_rs2_dualModeExtrinsics->text());
2853 settings.setValue(
"json_preset",
_ui->lineEdit_rs2_jsonFile->text());
2854 settings.endGroup();
2856 settings.beginGroup(
"RGBDImages");
2857 settings.setValue(
"path_rgb",
_ui->lineEdit_cameraRGBDImages_path_rgb->text());
2858 settings.setValue(
"path_depth",
_ui->lineEdit_cameraRGBDImages_path_depth->text());
2859 settings.setValue(
"scale",
_ui->doubleSpinBox_cameraRGBDImages_scale->value());
2860 settings.setValue(
"start_index",
_ui->spinBox_cameraRGBDImages_startIndex->value());
2861 settings.setValue(
"max_frames",
_ui->spinBox_cameraRGBDImages_maxFrames->value());
2862 settings.endGroup();
2864 settings.beginGroup(
"StereoImages");
2865 settings.setValue(
"path_left",
_ui->lineEdit_cameraStereoImages_path_left->text());
2866 settings.setValue(
"path_right",
_ui->lineEdit_cameraStereoImages_path_right->text());
2867 settings.setValue(
"rectify",
_ui->checkBox_stereo_rectify->isChecked());
2868 settings.setValue(
"start_index",
_ui->spinBox_cameraStereoImages_startIndex->value());
2869 settings.setValue(
"max_frames",
_ui->spinBox_cameraStereoImages_maxFrames->value());
2870 settings.endGroup();
2872 settings.beginGroup(
"StereoVideo");
2873 settings.setValue(
"path",
_ui->lineEdit_cameraStereoVideo_path->text());
2874 settings.setValue(
"path2",
_ui->lineEdit_cameraStereoVideo_path_2->text());
2875 settings.setValue(
"device2",
_ui->spinBox_stereo_right_device->value());
2876 settings.endGroup();
2878 settings.beginGroup(
"StereoZed");
2879 settings.setValue(
"resolution",
_ui->comboBox_stereoZed_resolution->currentIndex());
2880 settings.setValue(
"quality",
_ui->comboBox_stereoZed_quality->currentIndex());
2881 settings.setValue(
"self_calibration",
_ui->checkbox_stereoZed_selfCalibration->isChecked());
2882 settings.setValue(
"sensing_mode",
_ui->comboBox_stereoZed_sensingMode->currentIndex());
2883 settings.setValue(
"confidence_thr",
_ui->spinBox_stereoZed_confidenceThr->value());
2884 settings.setValue(
"textureness_confidence_thr",
_ui->spinBox_stereoZed_texturenessConfidenceThr->value());
2885 settings.setValue(
"odom",
_ui->checkbox_stereoZed_odom->isChecked());
2886 settings.setValue(
"svo_path",
_ui->lineEdit_zedSvoPath->text());
2887 settings.endGroup();
2889 settings.beginGroup(
"StereoRealSense2");
2890 settings.setValue(
"odom",
_ui->checkbox_stereoRealSense2_odom->isChecked());
2891 settings.endGroup();
2893 settings.beginGroup(
"MyntEye");
2894 settings.setValue(
"rectify",
_ui->checkbox_stereoMyntEye_rectify->isChecked());
2895 settings.setValue(
"depth",
_ui->checkbox_stereoMyntEye_depth->isChecked());
2896 settings.setValue(
"auto_exposure",
_ui->checkbox_stereoMyntEye_autoExposure->isChecked());
2897 settings.setValue(
"gain",
_ui->spinBox_stereoMyntEye_gain->value());
2898 settings.setValue(
"brightness",
_ui->spinBox_stereoMyntEye_brightness->value());
2899 settings.setValue(
"contrast",
_ui->spinBox_stereoMyntEye_contrast->value());
2900 settings.setValue(
"ir_control",
_ui->spinBox_stereoMyntEye_irControl->value());
2901 settings.endGroup();
2903 settings.beginGroup(
"Images");
2904 settings.setValue(
"path",
_ui->source_images_lineEdit_path->text());
2905 settings.setValue(
"startPos",
_ui->source_images_spinBox_startPos->value());
2906 settings.setValue(
"maxFrames",
_ui->source_images_spinBox_maxFrames->value());
2907 settings.setValue(
"bayerMode",
_ui->comboBox_cameraImages_bayerMode->currentIndex());
2908 settings.setValue(
"config_each_frame",
_ui->checkBox_cameraImages_configForEachFrame->isChecked());
2909 settings.setValue(
"filenames_as_stamps",
_ui->checkBox_cameraImages_timestamps->isChecked());
2910 settings.setValue(
"sync_stamps",
_ui->checkBox_cameraImages_syncTimeStamps->isChecked());
2911 settings.setValue(
"stamps",
_ui->lineEdit_cameraImages_timestamps->text());
2912 settings.setValue(
"path_scans",
_ui->lineEdit_cameraImages_path_scans->text());
2913 settings.setValue(
"scan_transform",
_ui->lineEdit_cameraImages_laser_transform->text());
2914 settings.setValue(
"scan_max_pts",
_ui->spinBox_cameraImages_max_scan_pts->value());
2915 settings.setValue(
"odom_path",
_ui->lineEdit_cameraImages_odom->text());
2916 settings.setValue(
"odom_format",
_ui->comboBox_cameraImages_odomFormat->currentIndex());
2917 settings.setValue(
"gt_path",
_ui->lineEdit_cameraImages_gt->text());
2918 settings.setValue(
"gt_format",
_ui->comboBox_cameraImages_gtFormat->currentIndex());
2919 settings.setValue(
"max_pose_time_diff",
_ui->doubleSpinBox_maxPoseTimeDiff->value());
2920 settings.setValue(
"imu_path",
_ui->lineEdit_cameraImages_path_imu->text());
2921 settings.setValue(
"imu_local_transform",
_ui->lineEdit_cameraImages_imu_transform->text());
2922 settings.setValue(
"imu_rate",
_ui->spinBox_cameraImages_max_imu_rate->value());
2923 settings.endGroup();
2925 settings.beginGroup(
"UsbCam");
2926 settings.setValue(
"width",
_ui->spinBox_usbcam_streamWidth->value());
2927 settings.setValue(
"height",
_ui->spinBox_usbcam_streamHeight->value());
2928 settings.endGroup();
2930 settings.beginGroup(
"Video");
2931 settings.setValue(
"path",
_ui->source_video_lineEdit_path->text());
2932 settings.endGroup();
2934 settings.beginGroup(
"IMU");
2935 settings.setValue(
"strategy",
_ui->comboBox_imuFilter_strategy->currentIndex());
2936 settings.setValue(
"madgwick_gain",
_ui->doubleSpinBox_imuFilterMadgwickGain->value());
2937 settings.setValue(
"madgwick_zeta",
_ui->doubleSpinBox_imuFilterMadgwickZeta->value());
2938 settings.setValue(
"complementary_gain_acc",
_ui->doubleSpinBox_imuFilterComplementaryGainAcc->value());
2939 settings.setValue(
"complementary_bias_alpha",
_ui->doubleSpinBox_imuFilterComplementaryBiasAlpha->value());
2940 settings.setValue(
"complementary_adaptive_gain",
_ui->checkBox_imuFilterComplementaryDoAdaptiveGain->isChecked());
2941 settings.setValue(
"complementary_biais_estimation",
_ui->checkBox_imuFilterComplementaryDoBiasEstimation->isChecked());
2942 settings.setValue(
"publish_inter_imu",
_ui->checkbox_publishInterIMU->isChecked());
2943 settings.endGroup();
2945 settings.beginGroup(
"Scan");
2946 settings.setValue(
"fromDepth",
_ui->checkBox_source_scanFromDepth->isChecked());
2947 settings.setValue(
"downsampleStep",
_ui->spinBox_source_scanDownsampleStep->value());
2948 settings.setValue(
"rangeMin",
_ui->doubleSpinBox_source_scanRangeMin->value());
2949 settings.setValue(
"rangeMax",
_ui->doubleSpinBox_source_scanRangeMax->value());
2950 settings.setValue(
"voxelSize",
_ui->doubleSpinBox_source_scanVoxelSize->value());
2951 settings.setValue(
"normalsK",
_ui->spinBox_source_scanNormalsK->value());
2952 settings.setValue(
"normalsRadius",
_ui->doubleSpinBox_source_scanNormalsRadius->value());
2953 settings.setValue(
"normalsUpF",
_ui->doubleSpinBox_source_scanNormalsForceGroundUp->value());
2954 settings.endGroup();
2956 settings.beginGroup(
"DepthFromScan");
2957 settings.setValue(
"depthFromScan",
_ui->groupBox_depthFromScan->isChecked());
2958 settings.setValue(
"depthFromScanFillHoles",
_ui->groupBox_depthFromScan_fillHoles->isChecked());
2959 settings.setValue(
"depthFromScanVertical",
_ui->radioButton_depthFromScan_vertical->isChecked());
2960 settings.setValue(
"depthFromScanHorizontal",
_ui->radioButton_depthFromScan_horizontal->isChecked());
2961 settings.setValue(
"depthFromScanFillBorders",
_ui->checkBox_depthFromScan_fillBorders->isChecked());
2962 settings.endGroup();
2964 settings.beginGroup(
"Database");
2965 settings.setValue(
"path",
_ui->source_database_lineEdit_path->text());
2966 settings.setValue(
"ignoreOdometry",
_ui->source_checkBox_ignoreOdometry->isChecked());
2967 settings.setValue(
"ignoreGoalDelay",
_ui->source_checkBox_ignoreGoalDelay->isChecked());
2968 settings.setValue(
"ignoreGoals",
_ui->source_checkBox_ignoreGoals->isChecked());
2969 settings.setValue(
"startId",
_ui->source_spinBox_databaseStartId->value());
2970 settings.setValue(
"stopId",
_ui->source_spinBox_databaseStopId->value());
2971 settings.setValue(
"cameraIndex",
_ui->source_spinBox_database_cameraIndex->value());
2972 settings.setValue(
"useDatabaseStamps",
_ui->source_checkBox_useDbStamps->isChecked());
2973 settings.endGroup();
2975 settings.endGroup();
2983 if(!filePath.isEmpty())
2993 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) 2994 #ifndef RTABMAP_NONFREE 2997 if(
_ui->comboBox_detector_strategy->currentIndex() <= 1 ||
_ui->comboBox_detector_strategy->currentIndex() == 12)
2999 QMessageBox::warning(
this, tr(
"Parameter warning"),
3000 tr(
"Selected feature type (SURF/SIFT) is not available. RTAB-Map is not built " 3001 "with the nonfree module from OpenCV. ORB is set instead for the bag-of-words dictionary."));
3005 if(
_ui->vis_feature_detector->currentIndex() <= 1 ||
_ui->vis_feature_detector->currentIndex() == 12)
3007 QMessageBox::warning(
this, tr(
"Parameter warning"),
3008 tr(
"Selected feature type (SURF/SIFT) is not available. RTAB-Map is not built " 3009 "with the nonfree module from OpenCV. Fast/Brief is set instead for the re-extraction " 3010 "of features on loop closure."));
3014 #else //>= 4.4.0 >= 3.4.11 3015 #ifndef RTABMAP_NONFREE 3018 if(
_ui->comboBox_detector_strategy->currentIndex() < 1 ||
_ui->comboBox_detector_strategy->currentIndex() == 12)
3020 QMessageBox::warning(
this, tr(
"Parameter warning"),
3021 tr(
"Selected feature type (SURF) is not available. RTAB-Map is not built " 3022 "with the nonfree module from OpenCV. SIFT is set instead for the bag-of-words dictionary."));
3026 if(
_ui->vis_feature_detector->currentIndex() < 1 ||
_ui->vis_feature_detector->currentIndex() == 12)
3028 QMessageBox::warning(
this, tr(
"Parameter warning"),
3029 tr(
"Selected feature type (SURF) is not available. RTAB-Map is not built " 3030 "with the nonfree module from OpenCV. Fast/Brief is set instead for the re-extraction " 3031 "of features on loop closure."));
3037 #if CV_MAJOR_VERSION < 3 3040 #ifdef RTABMAP_NONFREE 3041 QMessageBox::warning(
this, tr(
"Parameter warning"),
3042 tr(
"Selected feature type (KAZE) is not available on OpenCV2. SURF is set instead " 3043 "for the bag-of-words dictionary."));
3046 QMessageBox::warning(
this, tr(
"Parameter warning"),
3047 tr(
"Selected feature type (KAZE) is not available on OpenCV2. ORB is set instead " 3048 "for the bag-of-words dictionary."));
3054 #ifdef RTABMAP_NONFREE 3055 QMessageBox::warning(
this, tr(
"Parameter warning"),
3056 tr(
"Selected feature type (KAZE) is not available on OpenCV2. SURF is set instead " 3057 "for the re-extraction of features on loop closure."));
3060 QMessageBox::warning(
this, tr(
"Parameter warning"),
3061 tr(
"Selected feature type (KAZE) is not available on OpenCV2. ORB is set instead " 3062 "for the re-extraction of features on loop closure."));
3068 #ifndef RTABMAP_ORB_OCTREE 3071 QMessageBox::warning(
this, tr(
"Parameter warning"),
3072 tr(
"Selected feature type (ORB Octree) is not available. ORB is set instead " 3073 "for the bag-of-words dictionary."));
3078 QMessageBox::warning(
this, tr(
"Parameter warning"),
3079 tr(
"Selected feature type (ORB Octree) is not available on OpenCV2. ORB is set instead " 3080 "for the re-extraction of features on loop closure."));
3090 QMessageBox::warning(
this, tr(
"Parameter warning"),
3091 tr(
"Selected graph optimization strategy (TORO) is not available. RTAB-Map is not built " 3092 "with TORO. GTSAM is set instead for graph optimization strategy."));
3095 #ifndef RTABMAP_ORB_SLAM2 3098 QMessageBox::warning(
this, tr(
"Parameter warning"),
3099 tr(
"Selected graph optimization strategy (TORO) is not available. RTAB-Map is not built " 3100 "with TORO. g2o is set instead for graph optimization strategy."));
3105 #ifdef RTABMAP_ORB_SLAM2 3106 if(
_ui->graphOptimization_type->currentIndex() == 1)
3113 QMessageBox::warning(
this, tr(
"Parameter warning"),
3114 tr(
"Selected graph optimization strategy (g2o) is not available. RTAB-Map is not built " 3115 "with g2o. GTSAM is set instead for graph optimization strategy."));
3120 QMessageBox::warning(
this, tr(
"Parameter warning"),
3121 tr(
"Selected graph optimization strategy (g2o) is not available. RTAB-Map is not built " 3122 "with g2o. TORO is set instead for graph optimization strategy."));
3128 #ifndef RTABMAP_ORB_SLAM2 3131 QMessageBox::warning(
this, tr(
"Parameter warning"),
3132 tr(
"Selected graph optimization strategy (GTSAM) is not available. RTAB-Map is not built " 3133 "with GTSAM. g2o is set instead for graph optimization strategy."));
3140 QMessageBox::warning(
this, tr(
"Parameter warning"),
3141 tr(
"Selected graph optimization strategy (GTSAM) is not available. RTAB-Map is not built " 3142 "with GTSAM. TORO is set instead for graph optimization strategy."));
3150 QMessageBox::warning(
this, tr(
"Parameter warning"),
3151 tr(
"Selected visual registration bundle adjustment optimization strategy (g2o) is not available. RTAB-Map is not built " 3152 "with g2o. Bundle adjustment is disabled."));
3153 _ui->loopClosure_bundle->setCurrentIndex(0);
3157 QMessageBox::warning(
this, tr(
"Parameter warning"),
3158 tr(
"Selected visual registration bundle adjustment optimization strategy (cvsba) is not available. RTAB-Map is not built " 3159 "with cvsba. Bundle adjustment is disabled."));
3160 _ui->loopClosure_bundle->setCurrentIndex(0);
3164 QMessageBox::warning(
this, tr(
"Parameter warning"),
3165 tr(
"Selected visual registration bundle adjustment optimization strategy (Ceres) is not available. RTAB-Map is not built " 3166 "with cERES. Bundle adjustment is disabled."));
3167 _ui->loopClosure_bundle->setCurrentIndex(0);
3173 QMessageBox::warning(
this, tr(
"Parameter warning"),
3174 tr(
"Selected odometry local bundle adjustment optimization strategy (g2o) is not available. RTAB-Map is not built " 3175 "with g2o. Bundle adjustment is disabled."));
3176 _ui->odom_f2m_bundleStrategy->setCurrentIndex(0);
3180 QMessageBox::warning(
this, tr(
"Parameter warning"),
3181 tr(
"Selected odometry local bundle adjustment optimization strategy (cvsba) is not available. RTAB-Map is not built " 3182 "with cvsba. Bundle adjustment is disabled."));
3183 _ui->odom_f2m_bundleStrategy->setCurrentIndex(0);
3187 QMessageBox::warning(
this, tr(
"Parameter warning"),
3188 tr(
"Selected odometry local bundle adjustment optimization strategy (Ceres) is not available. RTAB-Map is not built " 3189 "with Ceres. Bundle adjustment is disabled."));
3190 _ui->odom_f2m_bundleStrategy->setCurrentIndex(0);
3194 if(
_ui->graphOptimization_robust->isChecked() &&
_ui->graphOptimization_maxError->value()>0.0)
3196 QMessageBox::warning(
this, tr(
"Parameter warning"),
3197 tr(
"Robust graph optimization and maximum optimization error threshold cannot be " 3198 "both used at the same time. Disabling robust optimization."));
3199 _ui->graphOptimization_robust->setChecked(
false);
3206 QMessageBox::warning(
this, tr(
"Parameter warning"),
3207 tr(
"With the selected feature type (SURF or SIFT), parameter \"Visual word->Nearest Neighbor\" " 3208 "cannot be LSH (used for binary descriptor). KD-tree is set instead for the bag-of-words dictionary."));
3215 QMessageBox::warning(
this, tr(
"Parameter warning"),
3216 tr(
"With the selected feature type (SURF or SIFT), parameter \"Visual word->Nearest Neighbor\" " 3217 "cannot be LSH (used for binary descriptor). KD-tree is set instead for the re-extraction " 3218 "of features on loop closure."));
3222 if(
_ui->doubleSpinBox_freenect2MinDepth->value() >=
_ui->doubleSpinBox_freenect2MaxDepth->value())
3224 QMessageBox::warning(
this, tr(
"Parameter warning"),
3225 tr(
"Freenect2 minimum depth (%1 m) should be lower than maximum depth (%2 m). Setting maximum depth to %3 m.")
3226 .arg(
_ui->doubleSpinBox_freenect2MinDepth->value())
3227 .arg(
_ui->doubleSpinBox_freenect2MaxDepth->value())
3228 .arg(
_ui->doubleSpinBox_freenect2MaxDepth->value()+1));
3229 _ui->doubleSpinBox_freenect2MaxDepth->setValue(
_ui->doubleSpinBox_freenect2MaxDepth->value()+1);
3232 if(
_ui->surf_doubleSpinBox_maxDepth->value() > 0.0 &&
3233 _ui->surf_doubleSpinBox_minDepth->value() >=
_ui->surf_doubleSpinBox_maxDepth->value())
3235 QMessageBox::warning(
this, tr(
"Parameter warning"),
3236 tr(
"Visual word minimum depth (%1 m) should be lower than maximum depth (%2 m). Setting maximum depth to %3 m.")
3237 .arg(
_ui->surf_doubleSpinBox_minDepth->value())
3238 .arg(
_ui->surf_doubleSpinBox_maxDepth->value())
3239 .arg(
_ui->surf_doubleSpinBox_maxDepth->value()+1));
3240 _ui->doubleSpinBox_freenect2MinDepth->setValue(0);
3243 if(
_ui->loopClosure_bowMaxDepth->value() > 0.0 &&
3244 _ui->loopClosure_bowMinDepth->value() >=
_ui->loopClosure_bowMaxDepth->value())
3246 QMessageBox::warning(
this, tr(
"Parameter warning"),
3247 tr(
"Visual registration word minimum depth (%1 m) should be lower than maximum depth (%2 m). Setting maximum depth to %3 m.")
3248 .arg(
_ui->loopClosure_bowMinDepth->value())
3249 .arg(
_ui->loopClosure_bowMaxDepth->value())
3250 .arg(
_ui->loopClosure_bowMaxDepth->value()+1));
3251 _ui->loopClosure_bowMinDepth->setValue(0);
3254 if(
_ui->fastThresholdMax->value() <
_ui->fastThresholdMin->value())
3256 QMessageBox::warning(
this, tr(
"Parameter warning"),
3257 tr(
"FAST minimum threshold cannot be lower than maximum threshold. Setting minimum to 1."));
3258 _ui->fastThresholdMin->setValue(1);
3260 if(
_ui->fastThreshold->value() >
_ui->fastThresholdMax->value())
3262 QMessageBox::warning(
this, tr(
"Parameter warning"),
3263 tr(
"FAST threshold cannot be higher than maximum threshold. Maximum value set to current threshold."));
3264 _ui->fastThresholdMax->setValue(
_ui->fastThreshold->value());
3266 if(
_ui->fastThreshold->value() <
_ui->fastThresholdMin->value())
3268 QMessageBox::warning(
this, tr(
"Parameter warning"),
3269 tr(
"FAST threshold cannot be lower than minimum threshold. Minimum value set to current threshold."));
3270 _ui->fastThresholdMin->setValue(
_ui->fastThreshold->value());
3273 if(
_ui->checkbox_odomDisabled->isChecked() &&
3274 _ui->general_checkBox_SLAM_mode->isChecked() &&
3275 _ui->general_checkBox_activateRGBD->isChecked())
3277 QMessageBox::warning(
this, tr(
"Parameter warning"),
3278 tr(
"Odometry is disabled but incremental RGB-D SLAM is activated! Re-enabling odometry."));
3279 _ui->checkbox_odomDisabled->setChecked(
false);
3282 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION <4 || (CV_MINOR_VERSION ==4 && CV_SUBMINOR_VERSION<2))) 3283 if(
_ui->ArucoDictionary->currentIndex()>=17)
3285 QMessageBox::warning(
this, tr(
"Parameter warning"),
3286 tr(
"ArUco dictionary: cannot select AprilTag dictionary, OpenCV version should be at least 3.4.2. Setting back to 0."));
3287 _ui->ArucoDictionary->setCurrentIndex(0);
3296 return tr(
"Reading parameters from the configuration file...");
3304 _ui->lineEdit_dictionaryPath->setEnabled(
false);
3305 _ui->toolButton_dictionaryPath->setEnabled(
false);
3306 _ui->label_dictionaryPath->setEnabled(
false);
3308 _ui->groupBox_source0->setEnabled(
false);
3309 _ui->groupBox_odometry1->setEnabled(
false);
3311 this->setWindowTitle(tr(
"Preferences [Monitoring mode]"));
3315 _ui->lineEdit_dictionaryPath->setEnabled(
true);
3316 _ui->toolButton_dictionaryPath->setEnabled(
true);
3317 _ui->label_dictionaryPath->setEnabled(
true);
3319 _ui->groupBox_source0->setEnabled(
true);
3320 _ui->groupBox_odometry1->setEnabled(
true);
3322 this->setWindowTitle(tr(
"Preferences"));
3328 std::set<std::string> threadsCheckedSet(threadsChecked.begin(), threadsChecked.end());
3329 _ui->comboBox_loggerFilter->clear();
3330 for(std::map<std::string, unsigned long>::iterator iter=threads.begin(); iter!=threads.end(); ++iter)
3332 if(threadsCheckedSet.find(iter->first.c_str()) != threadsCheckedSet.end())
3334 _ui->comboBox_loggerFilter->addItem(QString(iter->first.c_str()), QVariant(
true));
3338 _ui->comboBox_loggerFilter->addItem(QString(iter->first.c_str()), QVariant(
false));
3356 QApplication::processEvents();
3361 if(this->isVisible())
3374 if(!window->objectName().isEmpty() && !window->isMaximized())
3377 settings.beginGroup(
"Gui");
3378 settings.beginGroup(window->objectName());
3379 settings.setValue(
"geometry", window->saveGeometry());
3380 settings.endGroup();
3381 settings.endGroup();
3384 settingsTmp.beginGroup(
"Gui");
3385 settingsTmp.beginGroup(window->objectName());
3386 settingsTmp.setValue(
"geometry", window->saveGeometry());
3387 settingsTmp.endGroup();
3388 settingsTmp.endGroup();
3394 if(!window->objectName().isEmpty())
3398 settings.beginGroup(
"Gui");
3399 settings.beginGroup(window->objectName());
3400 bytes = settings.value(
"geometry", QByteArray()).toByteArray();
3401 if(!bytes.isEmpty())
3403 window->restoreGeometry(bytes);
3405 settings.endGroup();
3406 settings.endGroup();
3409 settingsTmp.beginGroup(
"Gui");
3410 settingsTmp.beginGroup(window->objectName());
3411 settingsTmp.setValue(
"geometry", window->saveGeometry());
3412 settingsTmp.endGroup();
3413 settingsTmp.endGroup();
3419 if(!mainWindow->objectName().isEmpty())
3424 settings.beginGroup(
"Gui");
3425 settings.beginGroup(mainWindow->objectName());
3426 settings.setValue(
"state", mainWindow->saveState());
3427 settings.setValue(
"maximized", mainWindow->isMaximized());
3428 settings.setValue(
"status_bar", mainWindow->statusBar()->isVisible());
3429 settings.endGroup();
3430 settings.endGroup();
3433 settingsTmp.beginGroup(
"Gui");
3434 settingsTmp.beginGroup(mainWindow->objectName());
3435 settingsTmp.setValue(
"state", mainWindow->saveState());
3436 settingsTmp.setValue(
"maximized", mainWindow->isMaximized());
3437 settingsTmp.setValue(
"status_bar", mainWindow->statusBar()->isVisible());
3438 settingsTmp.endGroup();
3439 settingsTmp.endGroup();
3445 if(!mainWindow->objectName().isEmpty())
3451 settings.beginGroup(
"Gui");
3452 settings.beginGroup(mainWindow->objectName());
3453 bytes = settings.value(
"state", QByteArray()).toByteArray();
3454 if(!bytes.isEmpty())
3456 mainWindow->restoreState(bytes);
3458 maximized = settings.value(
"maximized",
false).toBool();
3459 statusBarShown = settings.value(
"status_bar",
false).toBool();
3460 mainWindow->statusBar()->setVisible(statusBarShown);
3461 settings.endGroup();
3462 settings.endGroup();
3465 settingsTmp.beginGroup(
"Gui");
3466 settingsTmp.beginGroup(mainWindow->objectName());
3467 settingsTmp.setValue(
"state", mainWindow->saveState());
3468 settingsTmp.setValue(
"maximized", maximized);
3469 settingsTmp.setValue(
"status_bar", statusBarShown);
3470 settingsTmp.endGroup();
3471 settingsTmp.endGroup();
3477 if(!widget->objectName().isEmpty())
3480 settings.beginGroup(
"Gui");
3481 settings.beginGroup(widget->objectName());
3484 settingsTmp.beginGroup(
"Gui");
3485 settingsTmp.beginGroup(widget->objectName());
3503 imageView->saveSettings(settings);
3504 imageView->saveSettings(settingsTmp);
3506 else if(exportCloudsDialog)
3508 exportCloudsDialog->saveSettings(settings);
3509 exportCloudsDialog->saveSettings(settingsTmp);
3511 else if(exportBundlerDialog)
3513 exportBundlerDialog->saveSettings(settings);
3514 exportBundlerDialog->saveSettings(settingsTmp);
3516 else if(postProcessingDialog)
3518 postProcessingDialog->saveSettings(settings);
3519 postProcessingDialog->saveSettings(settingsTmp);
3521 else if(graphViewer)
3523 graphViewer->saveSettings(settings);
3524 graphViewer->saveSettings(settingsTmp);
3526 else if(calibrationDialog)
3528 calibrationDialog->saveSettings(settings);
3529 calibrationDialog->saveSettings(settingsTmp);
3531 else if(depthCalibrationDialog)
3533 depthCalibrationDialog->saveSettings(settings);
3534 depthCalibrationDialog->saveSettings(settingsTmp);
3538 UERROR(
"Widget \"%s\" cannot be exported in config file.", widget->objectName().toStdString().c_str());
3541 settings.endGroup();
3542 settings.endGroup();
3543 settingsTmp.endGroup();
3544 settingsTmp.endGroup();
3550 if(!widget->objectName().isEmpty())
3554 settings.beginGroup(
"Gui");
3555 settings.beginGroup(widget->objectName());
3558 settingsTmp.beginGroup(
"Gui");
3559 settingsTmp.beginGroup(widget->objectName());
3577 imageView->loadSettings(settings);
3578 imageView->saveSettings(settingsTmp);
3580 else if(exportCloudsDialog)
3582 exportCloudsDialog->loadSettings(settings);
3583 exportCloudsDialog->saveSettings(settingsTmp);
3585 else if(exportBundlerDialog)
3587 exportBundlerDialog->loadSettings(settings);
3588 exportBundlerDialog->saveSettings(settingsTmp);
3590 else if(postProcessingDialog)
3592 postProcessingDialog->loadSettings(settings);
3593 postProcessingDialog->saveSettings(settingsTmp);
3595 else if(graphViewer)
3597 graphViewer->loadSettings(settings);
3598 graphViewer->saveSettings(settingsTmp);
3600 else if(calibrationDialog)
3602 calibrationDialog->loadSettings(settings);
3603 calibrationDialog->saveSettings(settingsTmp);
3605 else if(depthCalibrationDialog)
3607 depthCalibrationDialog->loadSettings(settings);
3608 depthCalibrationDialog->saveSettings(settingsTmp);
3612 UERROR(
"Widget \"%s\" cannot be loaded from config file.", widget->objectName().toStdString().c_str());
3615 settings.endGroup();
3616 settings.endGroup();
3617 settingsTmp.endGroup();
3618 settingsTmp.endGroup();
3626 settings.beginGroup(
"Gui");
3627 settings.beginGroup(section);
3628 settings.setValue(key, value);
3629 settings.endGroup();
3630 settings.endGroup();
3633 settingsTmp.beginGroup(
"Gui");
3634 settingsTmp.beginGroup(section);
3635 settingsTmp.setValue(key, value);
3636 settingsTmp.endGroup();
3637 settingsTmp.endGroup();
3644 settings.beginGroup(
"Gui");
3645 settings.beginGroup(section);
3646 value = settings.value(key, QString()).toString();
3647 settings.endGroup();
3648 settings.endGroup();
3651 settingsTmp.beginGroup(
"Gui");
3652 settingsTmp.beginGroup(section);
3653 settingsTmp.setValue(key, value);
3654 settingsTmp.endGroup();
3655 settingsTmp.endGroup();
3685 if(parameters.size())
3687 for(rtabmap::ParametersMap::const_iterator iter = parameters.begin(); iter!=parameters.end(); ++iter)
3691 if(setOtherParametersToDefault)
3697 if(parameters.find(iter->first) == parameters.end() &&
3698 iter->first.compare(Parameters::kRtabmapWorkingDirectory())!=0)
3704 if(!this->isVisible())
3715 _ui->comboBox_sourceType->setCurrentIndex(0);
3716 _ui->comboBox_cameraRGBD->setCurrentIndex(src -
kSrcRGBD);
3719 _ui->lineEdit_openniOniPath->clear();
3723 _ui->lineEdit_openni2OniPath->clear();
3727 _ui->lineEdit_k4a_mkv->clear();
3732 _ui->comboBox_sourceType->setCurrentIndex(1);
3733 _ui->comboBox_cameraStereo->setCurrentIndex(src -
kSrcStereo);
3737 _ui->comboBox_sourceType->setCurrentIndex(2);
3738 _ui->source_comboBox_image_type->setCurrentIndex(src -
kSrcRGB);
3742 _ui->comboBox_sourceType->setCurrentIndex(3);
3765 QString dir =
_ui->source_database_lineEdit_path->text();
3770 QStringList paths = QFileDialog::getOpenFileNames(
this, tr(
"Select file"), dir, tr(
"RTAB-Map database files (*.db)"));
3773 int r = QMessageBox::question(
this, tr(
"Odometry in database..."), tr(
"Use odometry saved in database (if some saved)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
3774 _ui->source_checkBox_ignoreOdometry->setChecked(r != QMessageBox::Yes);
3776 if (
_ui->general_doubleSpinBox_detectionRate->value() != 0 &&
_ui->general_spinBox_imagesBufferSize->value() != 0)
3778 r = QMessageBox::question(
this, tr(
"Detection rate..."),
3779 tr(
"Do you want to process all frames? \n\nClicking \"Yes\" will set " 3780 "RTAB-Map's detection rate (%1 Hz) and buffer size (%2) to 0 to make " 3781 "sure that all frames are processed.")
3782 .arg(
_ui->general_doubleSpinBox_detectionRate->value())
3783 .arg(
_ui->general_spinBox_imagesBufferSize->value()),
3784 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
3785 if (r == QMessageBox::Yes)
3787 _ui->general_doubleSpinBox_detectionRate->setValue(0.0);
3788 _ui->general_spinBox_imagesBufferSize->setValue(0);
3792 if(paths.size() > 1)
3794 std::vector<std::string> vFileNames(paths.size());
3795 for(
int i=0; i<paths.size(); ++i)
3797 vFileNames[i] = paths[i].toStdString();
3799 std::sort(vFileNames.begin(), vFileNames.end(),
sortCallback);
3800 for(
int i=0; i<paths.size(); ++i)
3802 paths[i] = vFileNames[i].c_str();
3806 _ui->source_database_lineEdit_path->setText(paths.size()==1?paths.front():paths.join(
";"));
3807 _ui->source_spinBox_databaseStartId->setValue(0);
3808 _ui->source_spinBox_databaseStopId->setValue(0);
3809 _ui->source_spinBox_database_cameraIndex->setValue(-1);
3816 viewer->setWindowModality(Qt::WindowModal);
3817 viewer->setAttribute(Qt::WA_DeleteOnClose,
true);
3831 if(!
_ui->lineEdit_source_distortionModel->text().isEmpty() &&
3832 QFileInfo(
_ui->lineEdit_source_distortionModel->text()).exists())
3835 model.
load(
_ui->lineEdit_source_distortionModel->text().toStdString());
3839 QString name = QFileInfo(
_ui->lineEdit_source_distortionModel->text()).baseName()+
".png";
3840 cv::imwrite(name.toStdString(), img);
3841 QDesktopServices::openUrl(QUrl::fromLocalFile(name));
3845 QMessageBox::warning(
this, tr(
"Distortion Model"), tr(
"Model loaded from \"%1\" is not valid!").arg(
_ui->lineEdit_source_distortionModel->text()));
3850 QMessageBox::warning(
this, tr(
"Distortion Model"), tr(
"File \"%1\" doesn't exist!").arg(
_ui->lineEdit_source_distortionModel->text()));
3856 QString dir =
_ui->lineEdit_calibrationFile->text();
3861 else if(!dir.contains(
'.'))
3865 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Calibration file (*.yaml)"));
3868 _ui->lineEdit_calibrationFile->setText(path);
3874 QString dir =
_ui->lineEdit_cameraImages_timestamps->text();
3879 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Timestamps file (*.txt)"));
3882 _ui->lineEdit_cameraImages_timestamps->setText(path);
3888 QString dir =
_ui->lineEdit_cameraRGBDImages_path_rgb->text();
3893 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select RGB images directory"), dir);
3896 _ui->lineEdit_cameraRGBDImages_path_rgb->setText(path);
3903 QString dir =
_ui->lineEdit_cameraImages_path_scans->text();
3908 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select scans directory"), dir);
3911 _ui->lineEdit_cameraImages_path_scans->setText(path);
3917 QString dir =
_ui->lineEdit_cameraImages_path_imu->text();
3922 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file "), dir, tr(
"EuRoC IMU file (*.csv)"));
3925 _ui->lineEdit_cameraImages_path_imu->setText(path);
3932 QString dir =
_ui->lineEdit_cameraRGBDImages_path_depth->text();
3937 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select depth images directory"), dir);
3940 _ui->lineEdit_cameraRGBDImages_path_depth->setText(path);
3946 QString dir =
_ui->lineEdit_cameraImages_odom->text();
3951 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Odometry (*.txt *.log *.toro *.g2o *.csv)"));
3955 for(
int i=0; i<
_ui->comboBox_cameraImages_odomFormat->count(); ++i)
3957 list.push_back(
_ui->comboBox_cameraImages_odomFormat->itemText(i));
3959 QString item = QInputDialog::getItem(
this, tr(
"Odometry Format"), tr(
"Format:"), list,
_ui->comboBox_cameraImages_odomFormat->currentIndex(),
false);
3962 _ui->lineEdit_cameraImages_odom->setText(path);
3963 _ui->comboBox_cameraImages_odomFormat->setCurrentIndex(
_ui->comboBox_cameraImages_odomFormat->findText(item));
3970 QString dir =
_ui->lineEdit_cameraImages_gt->text();
3975 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Ground Truth (*.txt *.log *.toro *.g2o *.csv)"));
3979 for(
int i=0; i<
_ui->comboBox_cameraImages_gtFormat->count(); ++i)
3981 list.push_back(
_ui->comboBox_cameraImages_gtFormat->itemText(i));
3983 QString item = QInputDialog::getItem(
this, tr(
"Ground Truth Format"), tr(
"Format:"), list,
_ui->comboBox_cameraImages_gtFormat->currentIndex(),
false);
3986 _ui->lineEdit_cameraImages_gt->setText(path);
3987 _ui->comboBox_cameraImages_gtFormat->setCurrentIndex(
_ui->comboBox_cameraImages_gtFormat->findText(item));
3994 QString dir =
_ui->lineEdit_cameraStereoImages_path_left->text();
3999 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select left images directory"), dir);
4002 _ui->lineEdit_cameraStereoImages_path_left->setText(path);
4008 QString dir =
_ui->lineEdit_cameraStereoImages_path_right->text();
4013 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select right images directory"), dir);
4016 _ui->lineEdit_cameraStereoImages_path_right->setText(path);
4022 QString dir =
_ui->source_images_lineEdit_path->text();
4027 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Select images directory"),
_ui->source_images_lineEdit_path->text());
4030 _ui->source_images_lineEdit_path->setText(path);
4031 _ui->source_images_spinBox_startPos->setValue(0);
4032 _ui->source_images_spinBox_maxFrames->setValue(0);
4038 QString dir =
_ui->source_video_lineEdit_path->text();
4043 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Videos (*.avi *.mpg *.mp4 *.mov *.mkv)"));
4046 _ui->source_video_lineEdit_path->setText(path);
4052 QString dir =
_ui->lineEdit_cameraStereoVideo_path->text();
4057 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Videos (*.avi *.mpg *.mp4 *.mov *.mkv)"));
4060 _ui->lineEdit_cameraStereoVideo_path->setText(path);
4066 QString dir =
_ui->lineEdit_cameraStereoVideo_path_2->text();
4071 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Videos (*.avi *.mpg *.mp4 *.mov *.mkv)"));
4074 _ui->lineEdit_cameraStereoVideo_path_2->setText(path);
4080 QString dir =
_ui->lineEdit_source_distortionModel->text();
4085 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"Distortion model (*.bin *.txt)"));
4088 _ui->lineEdit_source_distortionModel->setText(path);
4094 QString dir =
_ui->lineEdit_openniOniPath->text();
4099 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"OpenNI (*.oni)"));
4102 _ui->lineEdit_openniOniPath->setText(path);
4108 QString dir =
_ui->lineEdit_openni2OniPath->text();
4113 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"OpenNI (*.oni)"));
4116 _ui->lineEdit_openni2OniPath->setText(path);
4122 QString dir =
_ui->lineEdit_k4a_mkv->text();
4127 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"K4A recording (*.mkv)"));
4128 if (!path.isEmpty())
4130 _ui->lineEdit_k4a_mkv->setText(path);
4136 QString dir =
_ui->lineEdit_zedSvoPath->text();
4141 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), dir, tr(
"ZED (*.svo)"));
4144 _ui->lineEdit_zedSvoPath->setText(path);
4150 QString dir =
_ui->lineEdit_rs2_jsonFile->text();
4155 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select RealSense2 preset"), dir, tr(
"JSON (*.json)"));
4158 _ui->lineEdit_rs2_jsonFile->setText(path);
4164 UDEBUG(
"%s=%s", key.c_str(), value.c_str());
4165 QWidget * obj =
_ui->stackedWidget->findChild<QWidget*>(key.c_str());
4170 QSpinBox * spin = qobject_cast<QSpinBox *>(obj);
4171 QDoubleSpinBox * doubleSpin = qobject_cast<QDoubleSpinBox *>(obj);
4172 QComboBox * combo = qobject_cast<QComboBox *>(obj);
4173 QCheckBox * check = qobject_cast<QCheckBox *>(obj);
4174 QRadioButton * radio = qobject_cast<QRadioButton *>(obj);
4175 QLineEdit * lineEdit = qobject_cast<QLineEdit *>(obj);
4176 QGroupBox * groupBox = qobject_cast<QGroupBox *>(obj);
4180 spin->setValue(QString(value.c_str()).toInt(&ok));
4183 UERROR(
"Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
4188 doubleSpin->setValue(QString(value.c_str()).toDouble(&ok));
4191 UERROR(
"Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
4196 int valueInt = QString(value.c_str()).toInt(&ok);
4199 UERROR(
"Conversion failed from \"%s\" for parameter %s", value.c_str(), key.c_str());
4203 #ifndef RTABMAP_NONFREE 4205 (combo->objectName().toStdString().compare(Parameters::kKpDetectorStrategy()) == 0 ||
4206 combo->objectName().toStdString().compare(Parameters::kVisFeatureType()) == 0))
4208 UWARN(
"Trying to set \"%s\" to SURF but RTAB-Map isn't built " 4209 "with the nonfree module from OpenCV. Keeping default combo value: %s.",
4210 combo->objectName().toStdString().c_str(),
4211 combo->currentText().toStdString().c_str());
4214 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) 4216 (combo->objectName().toStdString().compare(Parameters::kKpDetectorStrategy()) == 0 ||
4217 combo->objectName().toStdString().compare(Parameters::kVisFeatureType()) == 0))
4219 UWARN(
"Trying to set \"%s\" to SIFT but RTAB-Map isn't built " 4220 "with the nonfree module from OpenCV. Keeping default combo value: %s.",
4221 combo->objectName().toStdString().c_str(),
4222 combo->currentText().toStdString().c_str());
4227 #ifndef RTABMAP_ORB_SLAM2 4231 if(valueInt==1 && combo->objectName().toStdString().compare(Parameters::kOptimizerStrategy()) == 0)
4233 UWARN(
"Trying to set \"%s\" to g2o but RTAB-Map isn't built " 4234 "with g2o. Keeping default combo value: %s.",
4235 combo->objectName().toStdString().c_str(),
4236 combo->currentText().toStdString().c_str());
4242 if(valueInt==2 && combo->objectName().toStdString().compare(Parameters::kOptimizerStrategy()) == 0)
4244 UWARN(
"Trying to set \"%s\" to GTSAM but RTAB-Map isn't built " 4245 "with GTSAM. Keeping default combo value: %s.",
4246 combo->objectName().toStdString().c_str(),
4247 combo->currentText().toStdString().c_str());
4253 combo->setCurrentIndex(valueInt);
4260 _ui->checkBox_useOdomFeatures->blockSignals(
true);
4261 check->setChecked(
uStr2Bool(value.c_str()));
4262 _ui->checkBox_useOdomFeatures->blockSignals(
false);
4266 radio->setChecked(
uStr2Bool(value.c_str()));
4270 lineEdit->setText(value.c_str());
4274 groupBox->setChecked(
uStr2Bool(value.c_str()));
4278 ULOGGER_WARN(
"QObject called %s can't be cast to a supported widget", key.c_str());
4283 ULOGGER_WARN(
"Can't find the related QObject for parameter %s", key.c_str());
4295 ULOGGER_ERROR(
"This slot must be triggered by a signal, not a direct call...");
4307 ULOGGER_ERROR(
"This slot must be triggered by a signal, not a direct call...");
4319 ULOGGER_ERROR(
"This slot must be triggered by a signal, not a direct call...");
4331 ULOGGER_ERROR(
"This slot must be triggered by a signal, not a direct call...");
4339 const QComboBox * comboBox = qobject_cast<
const QComboBox*>(object);
4340 const QSpinBox * spinbox = qobject_cast<
const QSpinBox*>(object);
4341 if(comboBox || spinbox)
4344 UDEBUG(
"modify param %s=%s", object->objectName().toStdString().c_str(),
uNumber2Str(value).c_str());
4349 UWARN(
"Undefined object \"%s\"", object->objectName().toStdString().c_str());
4363 const QCheckBox * checkbox = qobject_cast<
const QCheckBox*>(object);
4364 const QRadioButton * radio = qobject_cast<
const QRadioButton*>(object);
4365 const QGroupBox * groupBox = qobject_cast<
const QGroupBox*>(object);
4366 if(checkbox || radio || groupBox)
4369 UDEBUG(
"modify param %s=%s", object->objectName().toStdString().c_str(),
uBool2Str(value).c_str());
4374 UWARN(
"Undefined object \"%s\"", object->objectName().toStdString().c_str());
4388 UDEBUG(
"modify param %s=%f", object->objectName().toStdString().c_str(), value);
4401 UDEBUG(
"modify param %s=%s", object->objectName().toStdString().c_str(), value.toStdString().c_str());
4413 for(
int i=0; i<children.size(); ++i)
4415 const QSpinBox * spin = qobject_cast<
const QSpinBox *>(children[i]);
4416 const QDoubleSpinBox * doubleSpin = qobject_cast<
const QDoubleSpinBox *>(children[i]);
4417 const QComboBox * combo = qobject_cast<
const QComboBox *>(children[i]);
4418 const QCheckBox * check = qobject_cast<
const QCheckBox *>(children[i]);
4419 const QRadioButton * radio = qobject_cast<
const QRadioButton *>(children[i]);
4420 const QLineEdit * lineEdit = qobject_cast<
const QLineEdit *>(children[i]);
4421 const QGroupBox * groupBox = qobject_cast<
const QGroupBox *>(children[i]);
4422 const QStackedWidget * stackedWidget = qobject_cast<
const QStackedWidget *>(children[i]);
4449 if(groupBox->isCheckable())
4458 else if(stackedWidget)
4471 for(
int i=0; i<stackedWidget->count(); ++i)
4473 const QObjectList & children = stackedWidget->widget(i)->children();
4479 UASSERT(panel<stackedWidget->count());
4480 const QObjectList & children = stackedWidget->widget(panel)->children();
4490 const QObjectList & children = box->children();
4500 if(sender() ==
_ui->general_doubleSpinBox_timeThr_2)
4502 _ui->general_doubleSpinBox_timeThr->setValue(
_ui->general_doubleSpinBox_timeThr_2->value());
4504 else if(sender() ==
_ui->general_doubleSpinBox_hardThr_2)
4506 _ui->general_doubleSpinBox_hardThr->setValue(
_ui->general_doubleSpinBox_hardThr_2->value());
4508 else if(sender() ==
_ui->general_doubleSpinBox_detectionRate_2)
4510 _ui->general_doubleSpinBox_detectionRate->setValue(
_ui->general_doubleSpinBox_detectionRate_2->value());
4512 else if(sender() ==
_ui->general_spinBox_imagesBufferSize_2)
4514 _ui->general_spinBox_imagesBufferSize->setValue(
_ui->general_spinBox_imagesBufferSize_2->value());
4516 else if(sender() ==
_ui->general_spinBox_maxStMemSize_2)
4518 _ui->general_spinBox_maxStMemSize->setValue(
_ui->general_spinBox_maxStMemSize_2->value());
4520 else if(sender() ==
_ui->groupBox_publishing)
4522 _ui->general_checkBox_publishStats_2->setChecked(
_ui->groupBox_publishing->isChecked());
4524 else if(sender() ==
_ui->general_checkBox_publishStats_2)
4526 _ui->groupBox_publishing->setChecked(
_ui->general_checkBox_publishStats_2->isChecked());
4528 else if(sender() ==
_ui->doubleSpinBox_similarityThreshold_2)
4530 _ui->doubleSpinBox_similarityThreshold->setValue(
_ui->doubleSpinBox_similarityThreshold_2->value());
4532 else if(sender() ==
_ui->general_checkBox_activateRGBD)
4534 _ui->general_checkBox_activateRGBD_2->setChecked(
_ui->general_checkBox_activateRGBD->isChecked());
4536 else if(sender() ==
_ui->general_checkBox_activateRGBD_2)
4538 _ui->general_checkBox_activateRGBD->setChecked(
_ui->general_checkBox_activateRGBD_2->isChecked());
4540 else if(sender() ==
_ui->general_checkBox_SLAM_mode)
4542 _ui->general_checkBox_SLAM_mode_2->setChecked(
_ui->general_checkBox_SLAM_mode->isChecked());
4544 else if(sender() ==
_ui->general_checkBox_SLAM_mode_2)
4546 _ui->general_checkBox_SLAM_mode->setChecked(
_ui->general_checkBox_SLAM_mode_2->isChecked());
4551 _ui->general_doubleSpinBox_timeThr->setValue(
_ui->general_doubleSpinBox_timeThr_2->value());
4552 _ui->general_doubleSpinBox_hardThr->setValue(
_ui->general_doubleSpinBox_hardThr_2->value());
4553 _ui->general_doubleSpinBox_detectionRate->setValue(
_ui->general_doubleSpinBox_detectionRate_2->value());
4554 _ui->general_spinBox_imagesBufferSize->setValue(
_ui->general_spinBox_imagesBufferSize_2->value());
4555 _ui->general_spinBox_maxStMemSize->setValue(
_ui->general_spinBox_maxStMemSize_2->value());
4556 _ui->doubleSpinBox_similarityThreshold->setValue(
_ui->doubleSpinBox_similarityThreshold_2->value());
4585 QList<QGroupBox*> boxes;
4586 for(
int i=0; i<
_ui->stackedWidget->count(); ++i)
4589 const QObjectList & children =
_ui->stackedWidget->widget(i)->children();
4590 for(
int j=0; j<children.size(); ++j)
4592 if((gb = qobject_cast<QGroupBox *>(children.at(j))))
4604 ULOGGER_ERROR(
"A QGroupBox must be included in the first level of children in stacked widget, index=%d", i);
4612 QStringList values =
_ui->lineEdit_bayes_predictionLC->text().simplified().split(
' ');
4613 if(values.size() < 2)
4615 UERROR(
"Error parsing prediction (must have at least 2 items) : %s",
4616 _ui->lineEdit_bayes_predictionLC->text().toStdString().c_str());
4619 QVector<qreal> dataX((values.size()-2)*2 + 1);
4620 QVector<qreal> dataY((values.size()-2)*2 + 1);
4626 int loopClosureIndex = (dataX.size()-1)/2;
4627 for(
int i=0; i<values.size(); ++i)
4629 value = values.at(i).toDouble(&ok);
4632 UERROR(
"Error parsing prediction : \"%s\"", values.at(i).toStdString().c_str());
4642 dataY[loopClosureIndex] = value;
4643 dataX[loopClosureIndex] = 0;
4647 dataY[loopClosureIndex-lvl] = value;
4648 dataX[loopClosureIndex-lvl] = -lvl;
4649 dataY[loopClosureIndex+lvl] = value;
4650 dataX[loopClosureIndex+lvl] = lvl;
4655 _ui->label_prediction_sum->setNum(sum);
4658 _ui->label_prediction_sum->setText(QString(
"<font color=#FF0000>") +
_ui->label_prediction_sum->text() +
"</font>");
4662 _ui->label_prediction_sum->setText(QString(
"<font color=#00FF00>") +
_ui->label_prediction_sum->text() +
"</font>");
4666 _ui->label_prediction_sum->setText(QString(
"<font color=#FFa500>") +
_ui->label_prediction_sum->text() +
"</font>");
4670 _ui->label_prediction_sum->setText(QString(
"<font color=#000000>") +
_ui->label_prediction_sum->text() +
"</font>");
4673 _ui->predictionPlot->removeCurves();
4674 _ui->predictionPlot->addCurve(
new UPlotCurve(
"Prediction", dataX, dataY,
_ui->predictionPlot));
4679 QStringList strings =
_ui->lineEdit_kp_roi->text().split(
' ');
4680 if(strings.size()!=4)
4682 UERROR(
"ROI must have 4 values (%s)",
_ui->lineEdit_kp_roi->text().toStdString().c_str());
4685 _ui->doubleSpinBox_kp_roi0->setValue(strings[0].toDouble()*100.0);
4686 _ui->doubleSpinBox_kp_roi1->setValue(strings[1].toDouble()*100.0);
4687 _ui->doubleSpinBox_kp_roi2->setValue(strings[2].toDouble()*100.0);
4688 _ui->doubleSpinBox_kp_roi3->setValue(strings[3].toDouble()*100.0);
4693 QStringList strings;
4694 strings.append(QString::number(
_ui->doubleSpinBox_kp_roi0->value()/100.0));
4695 strings.append(QString::number(
_ui->doubleSpinBox_kp_roi1->value()/100.0));
4696 strings.append(QString::number(
_ui->doubleSpinBox_kp_roi2->value()/100.0));
4697 strings.append(QString::number(
_ui->doubleSpinBox_kp_roi3->value()/100.0));
4698 _ui->lineEdit_kp_roi->setText(strings.join(
" "));
4704 _ui->checkbox_stereo_depthGenerated->setVisible(
4706 _ui->comboBox_stereoZed_quality->currentIndex() == 0);
4707 _ui->label_stereo_depthGenerated->setVisible(
4709 _ui->comboBox_stereoZed_quality->currentIndex() == 0);
4711 _ui->checkBox_stereo_rectify->setEnabled(
4718 _ui->checkBox_stereo_rectify->setVisible(
_ui->checkBox_stereo_rectify->isEnabled());
4719 _ui->label_stereo_rectify->setVisible(
_ui->checkBox_stereo_rectify->isEnabled());
4724 _ui->groupBox_pymatcher->setVisible(
_ui->reextract_nn->currentIndex() == 6);
4725 _ui->groupBox_gms->setVisible(
_ui->reextract_nn->currentIndex() == 7);
4730 if(this->isVisible() &&
_ui->checkBox_useOdomFeatures->isChecked())
4732 int r = QMessageBox::question(
this, tr(
"Using odometry features for vocabulary..."),
4733 tr(
"Do you want to match vocabulary feature parameters " 4734 "with corresponding ones used for odometry?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
4736 if(r == QMessageBox::Yes)
4738 _ui->comboBox_detector_strategy->setCurrentIndex(
_ui->vis_feature_detector->currentIndex());
4739 _ui->surf_doubleSpinBox_maxDepth->setValue(
_ui->loopClosure_bowMaxDepth->value());
4740 _ui->surf_doubleSpinBox_minDepth->setValue(
_ui->loopClosure_bowMinDepth->value());
4741 _ui->surf_spinBox_wordsPerImageTarget->setValue(
_ui->reextract_maxFeatures->value());
4742 _ui->spinBox_KPGridRows->setValue(
_ui->reextract_gridrows->value());
4743 _ui->spinBox_KPGridCols->setValue(
_ui->reextract_gridcols->value());
4744 _ui->lineEdit_kp_roi->setText(
_ui->loopClosure_roi->text());
4745 _ui->subpix_winSize_kp->setValue(
_ui->subpix_winSize->value());
4746 _ui->subpix_iterations_kp->setValue(
_ui->subpix_iterations->value());
4747 _ui->subpix_eps_kp->setValue(
_ui->subpix_eps->value());
4754 QString directory = QFileDialog::getExistingDirectory(
this, tr(
"Working directory"),
_ui->lineEdit_workingDirectory->text());
4755 if(!directory.isEmpty())
4757 ULOGGER_DEBUG(
"New working directory = %s", directory.toStdString().c_str());
4758 _ui->lineEdit_workingDirectory->setText(directory);
4765 if(
_ui->lineEdit_dictionaryPath->text().isEmpty())
4767 path = QFileDialog::getOpenFileName(
this, tr(
"Dictionary"), this->
getWorkingDirectory(), tr(
"Dictionary (*.txt *.db)"));
4771 path = QFileDialog::getOpenFileName(
this, tr(
"Dictionary"),
_ui->lineEdit_dictionaryPath->text(), tr(
"Dictionary (*.txt *.db)"));
4775 _ui->lineEdit_dictionaryPath->setText(path);
4782 if(
_ui->lineEdit_OdomORBSLAM2VocPath->text().isEmpty())
4784 path = QFileDialog::getOpenFileName(
this, tr(
"ORBSLAM2 Vocabulary"), this->
getWorkingDirectory(), tr(
"Vocabulary (*.txt)"));
4788 path = QFileDialog::getOpenFileName(
this, tr(
"ORBSLAM2 Vocabulary"),
_ui->lineEdit_OdomORBSLAM2VocPath->text(), tr(
"Vocabulary (*.txt)"));
4792 _ui->lineEdit_OdomORBSLAM2VocPath->setText(path);
4799 if(
_ui->lineEdit_OdomOkvisPath->text().isEmpty())
4801 path = QFileDialog::getOpenFileName(
this, tr(
"OKVIS Config"), this->
getWorkingDirectory(), tr(
"OKVIS config (*.yaml)"));
4805 path = QFileDialog::getOpenFileName(
this, tr(
"OKVIS Config"),
_ui->lineEdit_OdomOkvisPath->text(), tr(
"OKVIS config (*.yaml)"));
4809 _ui->lineEdit_OdomOkvisPath->setText(path);
4816 if(
_ui->lineEdit_OdomVinsPath->text().isEmpty())
4818 path = QFileDialog::getOpenFileName(
this, tr(
"VINS-Fusion Config"), this->
getWorkingDirectory(), tr(
"VINS-Fusion config (*.yaml)"));
4822 path = QFileDialog::getOpenFileName(
this, tr(
"VINS-Fusion Config"),
_ui->lineEdit_OdomVinsPath->text(), tr(
"VINS-Fusion config (*.yaml)"));
4826 _ui->lineEdit_OdomVinsPath->setText(path);
4833 if(
_ui->lineEdit_IcpPMConfigPath->text().isEmpty())
4835 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), this->
getWorkingDirectory(), tr(
"libpointmatcher (*.yaml)"));
4839 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"),
_ui->lineEdit_IcpPMConfigPath->text(), tr(
"libpointmatcher (*.yaml)"));
4843 _ui->lineEdit_IcpPMConfigPath->setText(path);
4850 if(
_ui->lineEdit_sptorch_path->text().isEmpty())
4852 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), this->
getWorkingDirectory(), tr(
"SuperPoint weights (*.pt)"));
4856 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"),
_ui->lineEdit_sptorch_path->text(), tr(
"SuperPoint weights (*.pt)"));
4860 _ui->lineEdit_sptorch_path->setText(path);
4867 if(
_ui->lineEdit_pymatcher_path->text().isEmpty())
4869 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), this->
getWorkingDirectory(), tr(
"Python wrapper (*.py)"));
4873 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"),
_ui->lineEdit_pymatcher_path->text(), tr(
"Python wrapper (*.py)"));
4877 _ui->lineEdit_pymatcher_path->setText(path);
4884 if(
_ui->lineEdit_pymatcher_model->text().isEmpty())
4886 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"), this->
getWorkingDirectory(), tr(
"PyTorch model (*.pth, *.pt)"));
4890 path = QFileDialog::getOpenFileName(
this, tr(
"Select file"),
_ui->lineEdit_pymatcher_model->text(), tr(
"PyTorch model (*.pth, *.pt)"));
4894 _ui->lineEdit_pymatcher_model->setText(path);
4900 _ui->groupBox_sourceRGBD->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0);
4901 _ui->groupBox_sourceStereo->setVisible(
_ui->comboBox_sourceType->currentIndex() == 1);
4902 _ui->groupBox_sourceRGB->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2);
4903 _ui->groupBox_sourceDatabase->setVisible(
_ui->comboBox_sourceType->currentIndex() == 3);
4905 _ui->checkBox_source_scanFromDepth->setVisible(
_ui->comboBox_sourceType->currentIndex() <= 1 ||
_ui->comboBox_sourceType->currentIndex() == 3);
4906 _ui->label_source_scanFromDepth->setVisible(
_ui->comboBox_sourceType->currentIndex() <= 1 ||
_ui->comboBox_sourceType->currentIndex() == 3);
4908 _ui->stackedWidget_rgbd->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
4917 _ui->groupBox_openni2->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcOpenNI2-
kSrcRGBD);
4918 _ui->groupBox_freenect2->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcFreenect2-
kSrcRGBD);
4919 _ui->groupBox_k4w2->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcK4W2 -
kSrcRGBD);
4920 _ui->groupBox_k4a->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcK4A -
kSrcRGBD);
4921 _ui->groupBox_realsense->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcRealSense -
kSrcRGBD);
4922 _ui->groupBox_realsense2->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcRealSense2 -
kSrcRGBD);
4923 _ui->groupBox_cameraRGBDImages->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcRGBDImages-
kSrcRGBD);
4924 _ui->groupBox_openni->setVisible(
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcOpenNI_PCL -
kSrcRGBD);
4926 _ui->stackedWidget_stereo->setVisible(
_ui->comboBox_sourceType->currentIndex() == 1 &&
4934 _ui->groupBox_cameraStereoVideo->setVisible(
_ui->comboBox_sourceType->currentIndex() == 1 &&
_ui->comboBox_cameraStereo->currentIndex() ==
kSrcStereoVideo -
kSrcStereo);
4935 _ui->groupBox_cameraStereoUsb->setVisible(
_ui->comboBox_sourceType->currentIndex() == 1 &&
_ui->comboBox_cameraStereo->currentIndex() ==
kSrcStereoUsb -
kSrcStereo);
4936 _ui->groupBox_cameraStereoZed->setVisible(
_ui->comboBox_sourceType->currentIndex() == 1 &&
_ui->comboBox_cameraStereo->currentIndex() ==
kSrcStereoZed -
kSrcStereo);
4940 _ui->stackedWidget_image->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2 &&
4944 _ui->source_groupBox_images->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcImages-
kSrcRGB);
4945 _ui->source_groupBox_video->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcVideo-
kSrcRGB);
4946 _ui->source_groupBox_usbcam->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcUsbDevice-
kSrcRGB);
4948 _ui->groupBox_sourceImages_optional->setVisible(
4951 (
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcImages-
kSrcRGB));
4953 _ui->groupBox_depthImageFiltering->setEnabled(
4954 _ui->comboBox_sourceType->currentIndex() == 0 ||
4955 _ui->comboBox_sourceType->currentIndex() == 3);
4956 _ui->groupBox_depthImageFiltering->setVisible(
_ui->groupBox_depthImageFiltering->isEnabled());
4958 _ui->groupBox_imuFiltering->setEnabled(
4961 (
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcImages-
kSrcRGB) ||
4963 (
_ui->comboBox_sourceType->currentIndex() == 0 &&
_ui->comboBox_cameraRGBD->currentIndex() ==
kSrcK4A -
kSrcRGBD) ||
4968 _ui->stackedWidget_imuFilter->setVisible(
_ui->comboBox_imuFilter_strategy->currentIndex() > 0);
4969 _ui->groupBox_madgwickfilter->setVisible(
_ui->comboBox_imuFilter_strategy->currentIndex() == 1);
4970 _ui->groupBox_complementaryfilter->setVisible(
_ui->comboBox_imuFilter_strategy->currentIndex() == 2);
4971 _ui->groupBox_imuFiltering->setVisible(
_ui->groupBox_imuFiltering->isEnabled());
4975 _ui->groupBox_depthFromScan->setVisible(
_ui->comboBox_sourceType->currentIndex() == 2 &&
_ui->source_comboBox_image_type->currentIndex() ==
kSrcImages-
kSrcRGB);
4982 return _ui->comboBox_loggerLevel->currentIndex();
4986 return _ui->comboBox_loggerEventLevel->currentIndex();
4990 return _ui->comboBox_loggerPauseLevel->currentIndex();
4994 return _ui->comboBox_loggerType->currentIndex();
4998 return _ui->checkBox_logger_printTime->isChecked();
5002 return _ui->checkBox_logger_printThreadId->isChecked();
5006 std::vector<std::string> threads;
5007 for(
int i=0; i<
_ui->comboBox_loggerFilter->count(); ++i)
5009 if(
_ui->comboBox_loggerFilter->itemData(i).toBool())
5011 threads.push_back(
_ui->comboBox_loggerFilter->itemText(i).toStdString());
5018 return _ui->checkBox_verticalLayoutUsed->isChecked();
5022 return _ui->checkBox_imageRejectedShown->isChecked();
5026 return _ui->checkBox_imageHighestHypShown->isChecked();
5030 return _ui->checkBox_beep->isChecked();
5034 return _ui->checkBox_stamps->isChecked();
5038 return _ui->checkBox_cacheStatistics->isChecked();
5042 return _ui->checkBox_notifyWhenNewGlobalPathIsReceived->isChecked();
5046 return _ui->spinBox_odomQualityWarnThr->value();
5050 return _ui->checkBox_odom_onlyInliersShown->isChecked();
5054 return _ui->radioButton_posteriorGraphView->isChecked();
5058 return _ui->radioButton_wordsGraphView->isChecked();
5062 return _ui->radioButton_localizationsGraphView->isChecked();
5066 return _ui->checkbox_odomDisabled->isChecked();
5070 return _ui->odom_registration->currentIndex();
5074 return _ui->odom_f2m_gravitySigma->value();
5078 return _ui->checkbox_groundTruthAlign->isChecked();
5083 UASSERT(index >= 0 && index <= 1);
5088 #ifdef RTABMAP_OCTOMAP 5089 return _ui->groupBox_octomap->isChecked();
5095 #ifdef RTABMAP_OCTOMAP 5096 return _ui->groupBox_octomap->isChecked() &&
_ui->checkBox_octomap_show3dMap->isChecked();
5102 return _ui->comboBox_octomap_renderingType->currentIndex();
5106 #ifdef RTABMAP_OCTOMAP 5107 return _ui->groupBox_octomap->isChecked() &&
_ui->checkBox_octomap_2dgrid->isChecked();
5113 return _ui->spinBox_octomap_treeDepth->value();
5117 return _ui->spinBox_octomap_pointSize->value();
5122 return _ui->doubleSpinBox_voxel->value();
5126 return _ui->doubleSpinBox_noiseRadius->value();
5130 return _ui->spinBox_noiseMinNeighbors->value();
5134 return _ui->doubleSpinBox_ceilingFilterHeight->value();
5138 return _ui->doubleSpinBox_floorFilterHeight->value();
5142 return _ui->spinBox_normalKSearch->value();
5146 return _ui->doubleSpinBox_normalRadiusSearch->value();
5150 return _ui->doubleSpinBox_ceilingFilterHeight_scan->value();
5154 return _ui->doubleSpinBox_floorFilterHeight_scan->value();
5158 return _ui->spinBox_normalKSearch_scan->value();
5162 return _ui->doubleSpinBox_normalRadiusSearch_scan->value();
5167 return _ui->checkBox_showGraphs->isChecked();
5171 return _ui->checkBox_showLabels->isChecked();
5175 return _ui->checkBox_showFrames->isChecked();
5179 return _ui->checkBox_showLandmarks->isChecked();
5183 return _ui->doubleSpinBox_landmarkSize->value();
5187 UASSERT(index >= 0 && index <= 1);
5192 UASSERT(index >= 0 && index <= 1);
5197 return _ui->checkBox_showIMUAcc->isChecked();
5201 return _ui->RGBDMarkerDetection->isChecked();
5205 return _ui->ArucoMarkerLength->value();
5209 return _ui->groupBox_organized->isChecked();
5213 return _ui->doubleSpinBox_mesh_angleTolerance->value()*
M_PI/180.0;
5217 return _ui->checkBox_mesh_quad->isChecked();
5221 return _ui->checkBox_mesh_texture->isChecked();
5225 return _ui->spinBox_mesh_triangleSize->value();
5229 UASSERT(index >= 0 && index <= 1);
5234 UASSERT(index >= 0 && index <= 1);
5239 UASSERT(index >= 0 && index <= 1);
5244 UASSERT(index >= 0 && index <= 1);
5245 std::vector<float> roiRatios;
5249 if(values.size() == 4)
5251 roiRatios.resize(4);
5252 for(
int i=0; i<values.size(); ++i)
5254 roiRatios[i] =
uStr2Float(values[i].toStdString().c_str());
5262 UASSERT(index >= 0 && index <= 1);
5267 UASSERT(index >= 0 && index <= 1);
5272 UASSERT(index >= 0 && index <= 1);
5278 UASSERT(index >= 0 && index <= 1);
5283 UASSERT(index >= 0 && index <= 1);
5288 UASSERT(index >= 0 && index <= 1);
5293 UASSERT(index >= 0 && index <= 1);
5298 UASSERT(index >= 0 && index <= 1);
5303 UASSERT(index >= 0 && index <= 1);
5308 UASSERT(index >= 0 && index <= 1);
5313 UASSERT(index >= 0 && index <= 1);
5319 UASSERT(index >= 0 && index <= 1);
5324 UASSERT(index >= 0 && index <= 1);
5329 UASSERT(index >= 0 && index <= 1);
5335 return _ui->radioButton_nodeFiltering->isChecked();
5339 return _ui->radioButton_subtractFiltering->isChecked();
5343 return _ui->doubleSpinBox_cloudFilterRadius->value();
5347 return _ui->doubleSpinBox_cloudFilterAngle->value();
5351 return _ui->spinBox_subtractFilteringMinPts->value();
5355 return _ui->doubleSpinBox_subtractFilteringRadius->value();
5359 return _ui->doubleSpinBox_subtractFilteringAngle->value()*
M_PI/180.0;
5363 return _ui->checkBox_map_shown->isChecked();
5367 return _ui->groupBox_grid_fromDepthImage->isChecked();
5371 return _ui->checkBox_grid_projMapFrame->isChecked();
5375 return _ui->doubleSpinBox_grid_maxGroundAngle->value()*
M_PI/180.0;
5379 return _ui->doubleSpinBox_grid_maxGroundHeight->value();
5383 return _ui->spinBox_grid_minClusterSize->value();
5387 return _ui->doubleSpinBox_grid_maxObstacleHeight->value();
5391 return _ui->checkBox_grid_flatObstaclesDetected->isChecked();
5395 return _ui->doubleSpinBox_map_opacity->value();
5402 return _ui->general_doubleSpinBox_imgRate->value();
5406 return _ui->source_mirroring->isChecked();
5410 int index =
_ui->comboBox_sourceType->currentIndex();
5455 return _ui->comboBox_cameraRGBD->currentText();
5459 return _ui->comboBox_cameraStereo->currentText();
5463 return _ui->source_comboBox_image_type->currentText();
5474 return _ui->lineEdit_sourceDevice->text();
5499 return _ui->lineEdit_cameraImages_path_imu->text();
5512 return _ui->spinBox_cameraImages_max_imu_rate->value();
5517 return _ui->source_checkBox_useDbStamps->isChecked();
5521 return _ui->checkbox_rgbd_colorOnly->isChecked();
5525 return _ui->comboBox_imuFilter_strategy->currentIndex();
5529 return _ui->groupBox_depthImageFiltering->isEnabled();
5533 return _ui->lineEdit_source_distortionModel->text();
5537 return _ui->groupBox_bilateral->isChecked();
5541 return _ui->doubleSpinBox_bilateral_sigmaS->value();
5545 return _ui->doubleSpinBox_bilateral_sigmaR->value();
5549 return _ui->spinBox_source_imageDecimation->value();
5553 return _ui->checkbox_stereo_depthGenerated->isChecked();
5557 return _ui->checkBox_stereo_exposureCompensation->isChecked();
5561 return _ui->checkBox_source_scanFromDepth->isChecked();
5565 return _ui->spinBox_source_scanDownsampleStep->value();
5569 return _ui->doubleSpinBox_source_scanRangeMin->value();
5573 return _ui->doubleSpinBox_source_scanRangeMax->value();
5577 return _ui->doubleSpinBox_source_scanVoxelSize->value();
5581 return _ui->spinBox_source_scanNormalsK->value();
5585 return _ui->doubleSpinBox_source_scanNormalsRadius->value();
5589 return _ui->doubleSpinBox_source_scanNormalsForceGroundUp->value();
5601 QMessageBox::warning(
this, tr(
"Calibration"),
5602 tr(
"Using raw images for \"OpenNI\" driver is not yet supported. " 5603 "Factory calibration loaded from OpenNI is used."), QMessageBox::Ok);
5609 _ui->lineEdit_openniOniPath->text().isEmpty()?this->
getSourceDevice().toStdString():
_ui->lineEdit_openniOniPath->text().toStdString(),
5617 _ui->lineEdit_openni2OniPath->text().isEmpty()?this->
getSourceDevice().toStdString():
_ui->lineEdit_openni2OniPath->text().toStdString(),
5635 QMessageBox::warning(
this, tr(
"Calibration"),
5636 tr(
"Using raw images for \"OpenNI\" driver is not yet supported. " 5637 "Factory calibration loaded from OpenNI is used."), QMessageBox::Ok);
5655 _ui->doubleSpinBox_freenect2MinDepth->value(),
5656 _ui->doubleSpinBox_freenect2MaxDepth->value(),
5657 _ui->checkBox_freenect2BilateralFiltering->isChecked(),
5658 _ui->checkBox_freenect2EdgeAwareFiltering->isChecked(),
5659 _ui->checkBox_freenect2NoiseFiltering->isChecked(),
5660 _ui->lineEdit_freenect2Pipeline->text().toStdString());
5672 if (!
_ui->lineEdit_k4a_mkv->text().isEmpty())
5676 _ui->lineEdit_k4a_mkv->text().toStdString().c_str(),
5688 ((
CameraK4A*)camera)->setIRDepthFormat(
_ui->checkbox_k4a_irDepth->isChecked());
5689 ((
CameraK4A*)camera)->setPreferences(
_ui->comboBox_k4a_rgb_resolution->currentIndex(),
5690 _ui->comboBox_k4a_framerate->currentIndex(),
5691 _ui->comboBox_k4a_depth_resolution->currentIndex());
5695 if(useRawImages &&
_ui->comboBox_realsenseRGBSource->currentIndex()!=2)
5697 QMessageBox::warning(
this, tr(
"Calibration"),
5698 tr(
"Using raw images for \"RealSense\" driver is not yet supported for color and infrared streams. " 5699 "Factory calibration loaded from RealSense is used."), QMessageBox::Ok);
5706 _ui->comboBox_realsensePresetRGB->currentIndex(),
5707 _ui->comboBox_realsensePresetDepth->currentIndex(),
5708 _ui->checkbox_realsenseOdom->isChecked(),
5719 QMessageBox::warning(
this, tr(
"Calibration"),
5720 tr(
"Using raw images for \"RealSense\" driver is not yet supported. " 5721 "Factory calibration loaded from RealSense2 is used."), QMessageBox::Ok);
5733 ((
CameraRealSense2*)camera)->setImagesRectified(
_ui->checkBox_stereo_rectify->isChecked() && !useRawImages);
5734 ((
CameraRealSense2*)camera)->setOdomProvided(
_ui->checkbox_stereoRealSense2_odom->isChecked());
5739 ((
CameraRealSense2*)camera)->setIRFormat(
_ui->checkbox_rs2_irMode->isChecked(),
_ui->checkbox_rs2_irDepth->isChecked());
5740 ((
CameraRealSense2*)camera)->setResolution(
_ui->spinBox_rs2_width->value(),
_ui->spinBox_rs2_height->value(),
_ui->spinBox_rs2_rate->value());
5741 ((
CameraRealSense2*)camera)->setGlobalTimeSync(
_ui->checkbox_rs2_globalTimeStync->isChecked());
5743 ((
CameraRealSense2*)camera)->setJsonConfig(
_ui->lineEdit_rs2_jsonFile->text().toStdString());
5751 QMessageBox::warning(
this, tr(
"Calibration"),
5752 tr(
"Using raw images for \"RealSense\" driver is not yet supported. " 5753 "Factory calibration loaded from RealSense2 is used."), QMessageBox::Ok);
5760 _ui->checkbox_stereoMyntEye_rectify->isChecked(),
5761 _ui->checkbox_stereoMyntEye_depth->isChecked(),
5765 if(
_ui->checkbox_stereoMyntEye_autoExposure->isChecked())
5772 _ui->spinBox_stereoMyntEye_gain->value(),
5773 _ui->spinBox_stereoMyntEye_brightness->value(),
5774 _ui->spinBox_stereoMyntEye_contrast->value());
5777 _ui->spinBox_stereoMyntEye_irControl->value());
5783 _ui->lineEdit_cameraRGBDImages_path_rgb->text().append(QDir::separator()).toStdString(),
5784 _ui->lineEdit_cameraRGBDImages_path_depth->text().append(QDir::separator()).toStdString(),
5785 _ui->doubleSpinBox_cameraRGBDImages_scale->value(),
5789 ((
CameraRGBDImages*)camera)->setMaxFrames(
_ui->spinBox_cameraRGBDImages_maxFrames->value());
5790 ((
CameraRGBDImages*)camera)->setBayerMode(
_ui->comboBox_cameraImages_bayerMode->currentIndex()-1);
5791 ((
CameraRGBDImages*)camera)->setOdometryPath(
_ui->lineEdit_cameraImages_odom->text().toStdString(),
_ui->comboBox_cameraImages_odomFormat->currentIndex());
5792 ((
CameraRGBDImages*)camera)->setGroundTruthPath(
_ui->lineEdit_cameraImages_gt->text().toStdString(),
_ui->comboBox_cameraImages_gtFormat->currentIndex());
5793 ((
CameraRGBDImages*)camera)->setMaxPoseTimeDiff(
_ui->doubleSpinBox_maxPoseTimeDiff->value());
5795 _ui->lineEdit_cameraImages_path_scans->text().isEmpty()?
"":
_ui->lineEdit_cameraImages_path_scans->text().append(QDir::separator()).toStdString(),
5796 _ui->spinBox_cameraImages_max_scan_pts->value(),
5799 _ui->checkBox_cameraImages_timestamps->isChecked(),
5800 _ui->lineEdit_cameraImages_timestamps->text().toStdString(),
5801 _ui->checkBox_cameraImages_syncTimeStamps->isChecked());
5802 ((
CameraRGBDImages*)camera)->setConfigForEachFrame(
_ui->checkBox_cameraImages_configForEachFrame->isChecked());
5814 QMessageBox::warning(
this, tr(
"Calibration"),
5815 tr(
"Using raw images for \"FlyCapture2\" driver is not yet supported. " 5816 "Factory calibration loaded from FlyCapture2 is used."), QMessageBox::Ok);
5829 _ui->lineEdit_cameraStereoImages_path_left->text().append(QDir::separator()).toStdString(),
5830 _ui->lineEdit_cameraStereoImages_path_right->text().append(QDir::separator()).toStdString(),
5831 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5836 ((
CameraStereoImages*)camera)->setBayerMode(
_ui->comboBox_cameraImages_bayerMode->currentIndex()-1);
5837 ((
CameraStereoImages*)camera)->setOdometryPath(
_ui->lineEdit_cameraImages_odom->text().toStdString(),
_ui->comboBox_cameraImages_odomFormat->currentIndex());
5838 ((
CameraStereoImages*)camera)->setGroundTruthPath(
_ui->lineEdit_cameraImages_gt->text().toStdString(),
_ui->comboBox_cameraImages_gtFormat->currentIndex());
5841 _ui->lineEdit_cameraImages_path_scans->text().isEmpty()?
"":
_ui->lineEdit_cameraImages_path_scans->text().append(QDir::separator()).toStdString(),
5842 _ui->spinBox_cameraImages_max_scan_pts->value(),
5845 _ui->checkBox_cameraImages_timestamps->isChecked(),
5846 _ui->lineEdit_cameraImages_timestamps->text().toStdString(),
5847 _ui->checkBox_cameraImages_syncTimeStamps->isChecked());
5848 ((
CameraRGBDImages*)camera)->setConfigForEachFrame(
_ui->checkBox_cameraImages_configForEachFrame->isChecked());
5853 if(
_ui->spinBox_stereo_right_device->value()>=0)
5857 _ui->spinBox_stereo_right_device->value(),
5858 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5866 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5873 if(!
_ui->lineEdit_cameraStereoVideo_path_2->text().isEmpty())
5877 _ui->lineEdit_cameraStereoVideo_path->text().toStdString(),
5878 _ui->lineEdit_cameraStereoVideo_path_2->text().toStdString(),
5879 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5887 _ui->lineEdit_cameraStereoVideo_path->text().toStdString(),
5888 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5899 _ui->checkBox_stereo_rectify->isChecked() && !useRawImages,
5908 if(!
_ui->lineEdit_zedSvoPath->text().isEmpty())
5911 _ui->lineEdit_zedSvoPath->text().toStdString(),
5912 _ui->comboBox_stereoZed_quality->currentIndex(),
5913 _ui->comboBox_stereoZed_sensingMode->currentIndex(),
5914 _ui->spinBox_stereoZed_confidenceThr->value(),
5915 _ui->checkbox_stereoZed_odom->isChecked(),
5918 _ui->checkbox_stereoZed_selfCalibration->isChecked(),
5919 _ui->loopClosure_bowForce2D->isChecked(),
5920 _ui->spinBox_stereoZed_texturenessConfidenceThr->value());
5926 _ui->comboBox_stereoZed_resolution->currentIndex(),
5927 _ui->comboBox_stereoZed_quality->currentIndex(),
5928 _ui->comboBox_stereoZed_sensingMode->currentIndex(),
5929 _ui->spinBox_stereoZed_confidenceThr->value(),
5930 _ui->checkbox_stereoZed_odom->isChecked(),
5933 _ui->checkbox_stereoZed_selfCalibration->isChecked(),
5934 _ui->loopClosure_bowForce2D->isChecked(),
5935 _ui->spinBox_stereoZed_texturenessConfidenceThr->value());
5943 _ui->checkBox_rgb_rectify->isChecked() && !useRawImages,
5951 _ui->source_video_lineEdit_path->text().toStdString(),
5952 _ui->checkBox_rgb_rectify->isChecked() && !useRawImages,
5959 _ui->source_images_lineEdit_path->text().toStdString(),
5964 ((
CameraImages*)camera)->setMaxFrames(
_ui->source_images_spinBox_maxFrames->value());
5965 ((
CameraImages*)camera)->setImagesRectified(
_ui->checkBox_rgb_rectify->isChecked() && !useRawImages);
5967 ((
CameraImages*)camera)->setBayerMode(
_ui->comboBox_cameraImages_bayerMode->currentIndex()-1);
5969 _ui->lineEdit_cameraImages_odom->text().toStdString(),
5970 _ui->comboBox_cameraImages_odomFormat->currentIndex());
5972 _ui->lineEdit_cameraImages_gt->text().toStdString(),
5973 _ui->comboBox_cameraImages_gtFormat->currentIndex());
5974 ((
CameraImages*)camera)->setMaxPoseTimeDiff(
_ui->doubleSpinBox_maxPoseTimeDiff->value());
5976 _ui->lineEdit_cameraImages_path_scans->text().isEmpty()?
"":
_ui->lineEdit_cameraImages_path_scans->text().append(QDir::separator()).toStdString(),
5977 _ui->spinBox_cameraImages_max_scan_pts->value(),
5980 _ui->groupBox_depthFromScan->isChecked(),
5981 !
_ui->groupBox_depthFromScan_fillHoles->isChecked()?0:
_ui->radioButton_depthFromScan_vertical->isChecked()?1:-1,
5982 _ui->checkBox_depthFromScan_fillBorders->isChecked());
5984 _ui->checkBox_cameraImages_timestamps->isChecked(),
5985 _ui->lineEdit_cameraImages_timestamps->text().toStdString(),
5986 _ui->checkBox_cameraImages_syncTimeStamps->isChecked());
5987 ((
CameraRGBDImages*)camera)->setConfigForEachFrame(
_ui->checkBox_cameraImages_configForEachFrame->isChecked());
5991 camera =
new DBReader(
_ui->source_database_lineEdit_path->text().toStdString(),
5993 _ui->source_checkBox_ignoreOdometry->isChecked(),
5994 _ui->source_checkBox_ignoreGoalDelay->isChecked(),
5995 _ui->source_checkBox_ignoreGoals->isChecked(),
5996 _ui->source_spinBox_databaseStartId->value(),
5997 _ui->source_spinBox_database_cameraIndex->value(),
5998 _ui->source_spinBox_databaseStopId->value());
6002 UFATAL(
"Source driver undefined (%d)!", driver);
6009 QString calibrationFile =
_ui->lineEdit_calibrationFile->text();
6012 calibrationFile.remove(
"_left.yaml").remove(
"_right.yaml").remove(
"_pose.yaml").remove(
"_rgb.yaml").remove(
"_depth.yaml");
6014 QString name = QFileInfo(calibrationFile.remove(
".yaml")).baseName();
6015 if(!
_ui->lineEdit_calibrationFile->text().isEmpty())
6017 QDir
d = QFileInfo(
_ui->lineEdit_calibrationFile->text()).dir();
6018 if(!
_ui->lineEdit_calibrationFile->text().remove(QFileInfo(
_ui->lineEdit_calibrationFile->text()).baseName()).isEmpty())
6020 dir = d.absolutePath();
6025 if(!camera->
init(useRawImages?
"":dir.toStdString(), name.toStdString()))
6027 UWARN(
"init camera failed... ");
6028 QMessageBox::warning(
this,
6030 tr(
"Camera initialization failed..."));
6039 ((
CameraOpenNI2*)camera)->setAutoWhiteBalance(
_ui->openni2_autoWhiteBalance->isChecked());
6040 ((
CameraOpenNI2*)camera)->setAutoExposure(
_ui->openni2_autoExposure->isChecked());
6041 ((
CameraOpenNI2*)camera)->setMirroring(
_ui->openni2_mirroring->isChecked());
6042 ((
CameraOpenNI2*)camera)->setOpenNI2StampsAndIDsUsed(
_ui->openni2_stampsIdsUsed->isChecked());
6048 ((
CameraOpenNI2*)camera)->setIRDepthShift(
_ui->openni2_hshift->value(),
_ui->openni2_vshift->value());
6049 ((
CameraOpenNI2*)camera)->setMirroring(
_ui->openni2_mirroring->isChecked());
6060 return _ui->groupBox_publishing->isChecked();
6064 return _ui->general_doubleSpinBox_hardThr->value();
6068 return _ui->general_doubleSpinBox_vp->value();
6072 return _ui->doubleSpinBox_similarityThreshold->value();
6076 return _ui->odom_strategy->currentIndex();
6080 return _ui->odom_dataBufferSize->value();
6090 return _ui->general_checkBox_imagesKept->isChecked();
6094 return _ui->general_checkBox_cloudsKept->isChecked();
6098 return _ui->general_doubleSpinBox_timeThr->value();
6102 return _ui->general_doubleSpinBox_detectionRate->value();
6106 return _ui->general_checkBox_SLAM_mode->isChecked();
6110 return _ui->general_checkBox_activateRGBD->isChecked();
6114 return _ui->surf_spinBox_wordsPerImageTarget->value();
6118 return _ui->graphOptimization_priorsIgnored->isChecked();
6125 if(
_ui->general_doubleSpinBox_imgRate->value() != value)
6127 _ui->general_doubleSpinBox_imgRate->setValue(value);
6142 if(
_ui->general_doubleSpinBox_detectionRate->value() != value)
6144 _ui->general_doubleSpinBox_detectionRate->setValue(value);
6159 if(
_ui->general_doubleSpinBox_timeThr->value() != value)
6161 _ui->general_doubleSpinBox_timeThr->setValue(value);
6176 if(
_ui->general_checkBox_SLAM_mode->isChecked() != enabled)
6178 _ui->general_checkBox_SLAM_mode->setChecked(enabled);
6202 !
_ui->lineEdit_cameraImages_path_imu->text().isEmpty())
6208 QMessageBox::warning(
this, tr(
"Source IMU Path"),
6209 tr(
"IMU path is set but odometry chosen doesn't support IMU, ignoring IMU..."), QMessageBox::Ok);
6214 if(!imuThread->
init(
_ui->lineEdit_cameraImages_path_imu->text().toStdString()))
6216 QMessageBox::warning(
this, tr(
"Source IMU Path"),
6217 tr(
"Initialization of IMU data has failed! Path=%1.").arg(
_ui->lineEdit_cameraImages_path_imu->text()), QMessageBox::Ok);
6231 int odomStrategy = Parameters::defaultOdomStrategy();
6233 if(odomStrategy != 1)
6236 parameters.erase(Parameters::kVisCorType());
6243 _ui->odom_dataBufferSize->value());
6247 _ui->spinBox_decimation_odom->value(),
6249 _ui->doubleSpinBox_maxDepth_odom->value(),
6253 odomViewer->setWindowTitle(tr(
"Odometry viewer"));
6254 odomViewer->resize(1280, 480+QPushButton().minimumHeight());
6264 _ui->checkBox_source_scanFromDepth->isChecked(),
6265 _ui->spinBox_source_scanDownsampleStep->value(),
6266 _ui->doubleSpinBox_source_scanRangeMin->value(),
6267 _ui->doubleSpinBox_source_scanRangeMax->value(),
6268 _ui->doubleSpinBox_source_scanVoxelSize->value(),
6269 _ui->spinBox_source_scanNormalsK->value(),
6270 _ui->doubleSpinBox_source_scanNormalsRadius->value(),
6271 (float)
_ui->doubleSpinBox_source_scanNormalsForceGroundUp->value());
6272 if(
_ui->comboBox_imuFilter_strategy->currentIndex()>0 &&
dynamic_cast<DBReader*
>(camera) == 0)
6278 if(
_ui->groupBox_bilateral->isChecked())
6281 _ui->doubleSpinBox_bilateral_sigmaS->value(),
6282 _ui->doubleSpinBox_bilateral_sigmaR->value());
6284 if(!
_ui->lineEdit_source_distortionModel->text().isEmpty())
6299 cameraThread.
start();
6311 imuThread->
join(
true);
6314 cameraThread.
join(
true);
6315 odomThread.join(
true);
6321 window->setWindowTitle(tr(
"Camera viewer"));
6322 window->resize(1280, 480+QPushButton().minimumHeight());
6335 _ui->checkBox_source_scanFromDepth->isChecked(),
6336 _ui->spinBox_source_scanDownsampleStep->value(),
6337 _ui->doubleSpinBox_source_scanRangeMin->value(),
6338 _ui->doubleSpinBox_source_scanRangeMax->value(),
6339 _ui->doubleSpinBox_source_scanVoxelSize->value(),
6340 _ui->spinBox_source_scanNormalsK->value(),
6341 _ui->doubleSpinBox_source_scanNormalsRadius->value(),
6342 (float)
_ui->doubleSpinBox_source_scanNormalsForceGroundUp->value());
6343 if(
_ui->comboBox_imuFilter_strategy->currentIndex()>0 &&
dynamic_cast<DBReader*
>(camera) == 0)
6349 if(
_ui->groupBox_bilateral->isChecked())
6352 _ui->doubleSpinBox_bilateral_sigmaS->value(),
6353 _ui->doubleSpinBox_bilateral_sigmaR->value());
6355 if(!
_ui->lineEdit_source_distortionModel->text().isEmpty())
6362 cameraThread.
start();
6365 cameraThread.
join(
true);
6377 QMessageBox::warning(
this,
6379 tr(
"Cannot calibrate database source!"));
6389 if(!dir.mkpath(this->getCameraInfoDir()))
6391 UWARN(
"Could create camera_info directory: \"%s\"", this->
getCameraInfoDir().toStdString().c_str());
6400 QMessageBox::StandardButton button = QMessageBox::question(
this, tr(
"Calibration"),
6401 tr(
"With \"%1\" driver, Color and IR cameras cannot be streamed at the " 6402 "same time. A 3-steps calibration is required (Color -> IR -> extrinsics). We will " 6403 "start with the Color camera calibration. Do you want to continue?").arg(this->
getSourceDriverStr()),
6404 QMessageBox::Yes | QMessageBox::No | QMessageBox::Ignore, QMessageBox::Yes);
6406 if(button == QMessageBox::Yes || button == QMessageBox::Ignore)
6413 if(button != QMessageBox::Ignore)
6426 cameraThread.
start();
6429 cameraThread.
join(
true);
6433 button = QMessageBox::question(
this, tr(
"Calibration"),
6434 tr(
"We will now calibrate the IR camera. Hide the IR projector with a Post-It and " 6435 "make sure you have enough ambient IR light (e.g., external IR source or sunlight!) to see the " 6436 "checkboard with the IR camera. Do you want to continue?"),
6437 QMessageBox::Yes | QMessageBox::No | QMessageBox::Ignore, QMessageBox::Yes);
6438 if(button == QMessageBox::Yes || button == QMessageBox::Ignore)
6441 if(button != QMessageBox::Ignore)
6454 cameraThread.
start();
6457 cameraThread.
join(
true);
6461 button = QMessageBox::question(
this, tr(
"Calibration"),
6462 tr(
"We will now calibrate the extrinsics. Important: Make sure " 6463 "the cameras and the checkboard don't move and that both " 6464 "cameras can see the checkboard. We will repeat this " 6465 "multiple times. Each time, you will have to move the camera (or " 6466 "checkboard) for a different point of view. Do you want to " 6468 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
6471 int totalSamples = 0;
6472 if(button == QMessageBox::Yes)
6474 totalSamples = QInputDialog::getInt(
this, tr(
"Calibration"), tr(
"Samples: "), 3, 1, 99, 1, &ok);
6488 for(;count < totalSamples && button == QMessageBox::Yes; )
6519 if(count < totalSamples)
6521 button = QMessageBox::question(
this, tr(
"Calibration"),
6522 tr(
"A stereo pair has been taken (total=%1/%2). Move the checkboard or " 6523 "camera to another position. Press \"Yes\" when you are ready " 6524 "for the next capture.").arg(count).arg(totalSamples),
6525 QMessageBox::Yes | QMessageBox::Abort, QMessageBox::Yes);
6530 button = QMessageBox::question(
this, tr(
"Calibration"),
6531 tr(
"Could not detect the checkboard on both images or " 6532 "the point of view didn't change enough. Try again?"),
6533 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
6538 button = QMessageBox::question(
this, tr(
"Calibration"),
6539 tr(
"Failed to start the camera. Try again?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
6542 if(count == totalSamples && button == QMessageBox::Yes)
6545 stereoModel.
setName(stereoModel.
name(),
"depth",
"rgb");
6548 QMessageBox::warning(
this, tr(
"Calibration"),
6549 tr(
"Extrinsic calibration has failed! Look on the terminal " 6550 "for possible error messages. Make sure corresponding calibration files exist " 6551 "in \"%1\" folder for camera \"%2\" or calibration name set. If not, re-do " 6552 "step 1 and 2 and make sure to export the calibration files.").arg(this->
getCameraInfoDir()).arg(serial.c_str()), QMessageBox::Ok);
6556 QMessageBox::information(
this, tr(
"Calibration"),
6557 tr(
"Calibration is completed! Extrinsics have been saved to \"%1/%2_pose.yaml\"").arg(this->
getCameraInfoDir()).arg(stereoModel.
name().c_str()), QMessageBox::Ok);
6583 cameraThread.
start();
6588 cameraThread.
join(
true);
int getOctomapTreeDepth() const
double getCloudFilteringAngle() const
int getCloudColorScheme(int index) const
static bool parse(const ParametersMap ¶meters, const std::string &key, bool &value)
bool isSourceDatabaseStampsUsed() const
void selectSourceImagesPathScans()
int getIMUFilteringStrategy() const
void processImages(const cv::Mat &imageLeft, const cv::Mat &imageRight, const QString &cameraName)
int getNoiseMinNeighbors() const
QVector< QSpinBox * > _3dRenderingDownsamplingScan
void setParameter(const std::string &key, const std::string &value)
Camera * createCamera(bool useRawImages=false, bool useColor=true)
int projMinClusterSize() const
double getScanMinRange(int index) const
void saveMainWindowState(const QMainWindow *mainWindow)
int getGeneralLoggerPauseLevel() const
void updateParameters(const ParametersMap ¶meters, bool setOtherParametersToDefault=false)
QString getIMUPath() const
int getScanNormalKSearch() const
static void createPipe(const UEventsSender *sender, const UEventsHandler *receiver, const std::string &eventName)
bool isOdomOnlyInliersShown() const
bool getGridMapShown() const
void setStereoExposureCompensation(bool enabled)
rtabmap::ParametersMap _parameters
static bool isCSparseAvailable()
bool isCloudMeshingQuad() const
double getSubtractFilteringRadius() const
bool init(const std::string &path)
int getGeneralLoggerLevel() const
double getCeilingFilteringHeight() const
bool isIMUGravityShown(int index) const
double UTILITE_EXP uStr2Double(const std::string &str)
double getIMUGravityLength(int index) const
rtabmap::ParametersMap getAllParameters() const
double getMarkerLength() const
void selectSourceImagesPathOdom()
void changeOdometryOKVISConfigPath()
Transform stereoTransform() const
virtual void readCameraSettings(const QString &filePath=QString())
void setSLAMMode(bool enabled)
CalibrationDialog * _calibrationDialog
void selectSourceSvoPath()
int uStrNumCmp(const std::string &a, const std::string &b)
void setDepthScaledToRGBSize(bool enabled)
double getSourceScanForceGroundNormalsUp() const
virtual ~PreferencesDialog()
void changeOdometryORBSLAM2Vocabulary()
void changeOdometryVINSConfigPath()
double getSourceScanRangeMin() const
double getSourceScanRangeMax() const
void loadSettings(QSettings &settings, const QString &group="")
std::pair< std::string, std::string > ParametersPair
cv::Mat visualize(const std::string &path="") const
int getKpMaxFeatures() const
bool imageHighestHypShown() const
bool UTILITE_EXP uStr2Bool(const char *str)
PreferencesDialog::Src getSourceType() const
bool isStatisticsPublished() const
virtual QString getIniFilePath() const
void setTimeLimit(float value)
void updatePredictionPlot()
void enableBilateralFiltering(float sigmaS, float sigmaR)
Transform getLaserLocalTransform() const
static std::map< std::string, unsigned long > getRegisteredThreads()
QStandardItemModel * _indexModel
QString getWorkingDirectory() const
int getOctomapRenderingType() const
bool isSourceRGBDColorOnly() const
float UTILITE_EXP uStr2Float(const std::string &str)
std::vector< float > getCloudRoiRatios(int index) const
std::map< std::string, std::string > ParametersMap
std::string UTILITE_EXP uBool2Str(bool boolean)
double getGeneralInputRate() const
void readSettings(const QString &filePath=QString())
int getCloudMeshingTriangleSize()
static bool isCholmodAvailable()
static void writeINI(const std::string &configFile, const ParametersMap ¶meters)
void makeObsoleteCloudRenderingPanel()
int getSourceScanDownsampleStep() const
Some conversion functions.
bool isLocalizationsCountGraphView() const
void setSwitchedImages(bool switched)
virtual void readGuiSettings(const QString &filePath=QString())
double getScanMaxRange(int index) const
bool isGraphsShown() const
std::vector< std::string > getGeneralLoggerThreads() const
void selectSourceMKVPath()
const cv::Mat & imageRaw() const
void addParameter(int value)
static bool isAvailable(Optimizer::Type type)
bool parseModel(QList< QGroupBox * > &boxes, QStandardItem *parentItem, int currentLevel, int &absoluteIndex)
bool isGroundTruthAligned() const
double projMaxGroundAngle() const
double getCloudVoxelSizeScan(int index) const
bool isLandmarksShown() const
Transform getIMULocalTransform() const
bool isOdomDisabled() const
double getCloudOpacity(int index) const
void loadMainWindowState(QMainWindow *mainWindow, bool &maximized, bool &statusBarShown)
void selectSourceImagesPathGt()
QVector< QCheckBox * > _3dRenderingGravity
void updateBasicParameter()
virtual bool readCoreSettings(const QString &filePath=QString())
QVector< QSpinBox * > _3dRenderingPtSize
int getGeneralLoggerEventLevel() const
bool isSubtractFiltering() const
virtual void closeEvent(QCloseEvent *event)
QVector< QDoubleSpinBox * > _3dRenderingVoxelSizeScan
void changeIcpPMConfigPath()
QVector< QCheckBox * > _3dRenderingShowFrustums
virtual std::string getSerial() const =0
PreferencesDialog::Src getSourceDriver() const
void saveCustomConfig(const QString §ion, const QString &key, const QString &value)
void setSavingDirectory(const QString &savingDirectory)
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")=0
void selectSourceImagesStamps()
#define UASSERT(condition)
QString getSourceDistortionModel() const
void setColorOnly(bool colorOnly)
double landmarkVisSize() const
SensorData takeImage(CameraInfo *info=0)
void updateSourceGrpVisibility()
Wrappers of STL for convenient functions.
double getSourceScanNormalsRadius() const
bool isSourceMirroring() const
void selectSourceStereoVideoPath()
int getStereoPairs() const
double getFloorFilteringHeight() const
float getDetectionRate() const
void selectSourceDriver(Src src)
void selectSourceVideoPath()
bool isBilateralFiltering() const
QVector< QSpinBox * > _3dRenderingPtSizeFeatures
#define ULOGGER_DEBUG(...)
void visualizeDistortionModel()
static Odometry * create(const ParametersMap ¶meters=ParametersMap())
bool isPosteriorGraphView() const
virtual void setStartIndex(int index)
bool isSourceStereoDepthGenerated() const
void setDetectionRate(double value)
QVector< QSpinBox * > _3dRenderingPtSizeScan
double getScanNormalRadiusSearch() const
bool isTimeUsedInFigures() const
void saveSettings(QSettings &settings, const QString &group="") const
double getCloudFilteringRadius() const
void setScanParameters(bool fromDepth, int downsampleStep=1, float rangeMin=0.0f, float rangeMax=0.0f, float voxelSize=0.0f, int normalsK=0, int normalsRadius=0.0f, float groundNormalsUp=0.0f)
bool isLabelsShown() const
double getNoiseRadius() const
int getDownsamplingStepScan(int index) const
bool isCloudMeshingTexture() const
double getSourceScanVoxelSize() const
void setCameraInfoDir(const QString &folder)
QVector< QLineEdit * > _3dRenderingRoiRatios
QList< QGroupBox * > getGroupBoxes()
int getCloudDecimation(int index) const
QVector< QDoubleSpinBox * > _3dRenderingGravityLength
virtual void writeGuiSettings(const QString &filePath=QString()) const
bool isWordsCountGraphView() const
bool saveStereoTransform(const std::string &directory) const
int getScanPointSize(int index) const
int getOctomapPointSize() const
bool isIMUAccShown() const
void updateFeatureMatchingVisibility()
bool isSourceStereoExposureCompensation() const
virtual void setStartIndex(int index)
int getSourceImageDecimation() const
bool isMarkerDetection() const
bool isCloudMeshing() const
Ui_preferencesDialog * _ui
void saveWindowGeometry(const QWidget *window)
bool isCacheSavedInFigures() const
bool isFeaturesShown(int index) const
void selectSourceStereoVideoPath2()
int getCloudPointSize(int index) const
QVector< QDoubleSpinBox * > _3dRenderingOpacity
void setDistortionModel(const std::string &path)
virtual void showEvent(QShowEvent *event)
QVector< QSpinBox * > _3dRenderingDecimation
bool openDatabase(const QString &path)
int getSubtractFilteringMinPts() const
bool isScansShown(int index) const
virtual void writeCameraSettings(const QString &filePath=QString()) const
void setMirroringEnabled(bool enabled)
bool uContains(const std::list< V > &list, const V &value)
double getCloudMeshingAngle() const
void load(const std::string &path)
void selectSourceStereoImagesPathRight()
bool isFrustumsShown(int index) const
double getScanCeilingFilteringHeight() const
void selectSourceRGBDImagesPathRGB()
void selectCalibrationPath()
virtual void writeCoreSettings(const QString &filePath=QString()) const
void setImageDecimation(int decimation)
int getNormalKSearch() const
QVector< QDoubleSpinBox * > _3dRenderingMaxDepth
bool isVerticalLayoutUsed() const
void registerToEventsManager()
QVector< QCheckBox * > _3dRenderingShowFeatures
static std::string getType(const std::string ¶mKey)
void closeDialog(QAbstractButton *button)
double getScanOpacity(int index) const
void changePyMatcherModel()
void changeDictionaryPath()
QVector< QSpinBox * > _3dRenderingColorSchemeScan
void publishInterIMU(bool enabled)
static const ParametersMap & getDefaultParameters()
void openDatabaseViewer()
double getOdomF2MGravitySigma() const
void resetSettings(int panelNumber)
QString loadCustomConfig(const QString §ion, const QString &key)
const std::vector< CameraModel > & cameraModels() const
std::string getParameter(const std::string &key) const
QVector< QDoubleSpinBox * > _3dRenderingOpacityScan
void selectSourceOniPath()
bool isGridMapFrom3DCloud() const
void setStereoToDepth(bool enabled)
void setStereoMode(bool stereo, const QString &leftSuffix="left", const QString &rightSuffix="right")
bool isSourceScanFromDepth() const
virtual QString getDefaultWorkingDirectory() const
void setProgressVisibility(bool visible)
void saveWidgetState(const QWidget *widget)
QString getSourceDevice() const
double projMaxObstaclesHeight() const
bool getGeneralLoggerPrintThreadId() const
void selectSourceStereoImagesPathLeft()
int getFeaturesPointSize(int index) const
void showCloseButton(bool visible=true)
void loadSettings(QSettings &settings, const QString &group="")
void selectSourceRealsense2JsonPath()
void makeObsoleteLoggingPanel()
double getNormalRadiusSearch() const
QVector< QDoubleSpinBox * > _3dRenderingMinDepth
bool isCloudsKept() const
PANEL_FLAGS _obsoletePanels
QString getSourceDriverStr() const
bool isOctomapUpdated() const
#define ULOGGER_WARN(...)
void setCurrentPanelToSource()
virtual void setStartIndex(int index)
ULogger class and convenient macros.
void selectSourceRGBDImagesPathDepth()
void loadWindowGeometry(QWidget *window)
PreferencesDialog(QWidget *parent=0)
double getBilateralSigmaR() const
bool projFlatObstaclesDetected() const
void setInputRate(double value)
void setName(const std::string &name, const std::string &leftSuffix="left", const std::string &rightSuffix="right")
void settingsChanged(PreferencesDialog::PANEL_FLAGS)
void makeObsoleteGeneralPanel()
bool isPriorIgnored() const
bool getGeneralLoggerPrintTime() const
bool isFramesShown() const
void writeSettings(const QString &filePath=QString())
bool isCloudFiltering() const
bool isImagesKept() const
bool isOctomapShown() const
static void readINI(const std::string &configFile, ParametersMap ¶meters, bool modifiedOnly=false)
void updateStereoDisparityVisibility()
const QString & cameraName() const
int getOdomStrategy() const
QProgressDialog * _progressDialog
double getBilateralSigmaS() const
QString getCameraInfoDir() const
double getScanFloorFilteringHeight() const
void resetApply(QAbstractButton *button)
bool isDepthFilteringAvailable() const
virtual QString getParamMessage()
bool sortCallback(const std::string &a, const std::string &b)
double getLoopThr() const
void unregisterFromEventsManager()
QVector< QDoubleSpinBox * > _3dRenderingMinRange
void clicked(const QModelIndex ¤t, const QModelIndex &previous)
void changeSuperPointModelPath()
bool projMapFrame() const
void join(bool killFirst=false)
void saveSettings(QSettings &settings, const QString &group="") const
QVector< QCheckBox * > _3dRenderingShowScans
void selectSourceImagesPathIMU()
double getSubtractFilteringAngle() const
void changePyMatcherPath()
double getCloudMaxDepth(int index) const
static bool exposureGainAvailable()
#define ULOGGER_ERROR(...)
void setCameraName(const QString &name)
QVector< QSpinBox * > _3dRenderingColorScheme
QVector< QDoubleSpinBox * > _3dRenderingMaxRange
void loadWidgetState(QWidget *widget)
void changeWorkingDirectory()
void publishInterIMU(bool enabled)
void setResolution(int width, int height)
int getGeneralLoggerType() const
int getSourceScanNormalsK() const
void selectSourceDatabase()
rtabmap::ParametersMap _modifiedParameters
bool isCloudsShown(int index) const
bool notifyWhenNewGlobalPathIsReceived() const
int getOdomRegistrationApproach() const
std::string UTILITE_EXP uNumber2Str(unsigned int number)
void addParameters(const QObjectList &children)
int getScanColorScheme(int index) const
bool isOctomap2dGrid() const
int getOdomQualityWarnThr() const
double projMaxGroundHeight() const
virtual QString getTmpIniFilePath() const
void selectSourceOni2Path()
void setFisheyeImages(bool enabled)
static std::string createDefaultWorkingDirectory()
bool imageRejectedShown() const
void selectSourceDistortionModel()
int getOdomBufferSize() const
float getTimeLimit() const
double getGridMapOpacity() const
QVector< QCheckBox * > _3dRenderingShowClouds
double getCloudMinDepth(int index) const
void uInsert(std::map< K, V > &map, const std::pair< K, V > &pair)
void selectSourceImagesPath()
StereoCameraModel stereoCalibration(const CameraModel &left, const CameraModel &right, bool ignoreStereoRectification) const
const std::string & name() const
void makeObsoleteSourcePanel()
void enableIMUFiltering(int filteringStrategy=1, const ParametersMap ¶meters=ParametersMap())
Transform getSourceLocalTransform() const
CreateSimpleCalibrationDialog * _createCalibrationDialog