mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Updating orbslam3 v1 support (#1152)
* Refactoring ORB_SLAM3 integration. Fixed realsense2 inter IMU stamps. * Renamed OdometryORBSLAM -> OdometryORBSLAM2 * revert a change * Fixed build without orb_slam * Source camera: added feature detection option * Fixed jfr2018 docker files
This commit is contained in:
@@ -2835,8 +2835,6 @@ void CloudViewer::setCameraPosition(
|
||||
{
|
||||
renderer->ResetCameraClippingRange(boundingBox);
|
||||
}
|
||||
|
||||
_visualizer->getRenderWindow()->Render ();
|
||||
}
|
||||
|
||||
void CloudViewer::updateCameraTargetPosition(const Transform & pose)
|
||||
@@ -2846,14 +2844,6 @@ void CloudViewer::updateCameraTargetPosition(const Transform & pose)
|
||||
Eigen::Affine3f m = pose.toEigen3f();
|
||||
Eigen::Vector3f pos = m.translation();
|
||||
|
||||
Eigen::Vector3f lastPos(0,0,0);
|
||||
if(_trajectory->size())
|
||||
{
|
||||
lastPos[0]=_trajectory->back().x;
|
||||
lastPos[1]=_trajectory->back().y;
|
||||
lastPos[2]=_trajectory->back().z;
|
||||
}
|
||||
|
||||
_trajectory->push_back(pcl::PointXYZ(pos[0], pos[1], pos[2]));
|
||||
if(_maxTrajectorySize>0)
|
||||
{
|
||||
|
||||
@@ -5774,6 +5774,10 @@ void MainWindow::startDetection()
|
||||
_camera->setColorOnly(_preferencesDialog->isSourceRGBDColorOnly());
|
||||
_camera->setImageDecimation(_preferencesDialog->getSourceImageDecimation());
|
||||
_camera->setHistogramMethod(_preferencesDialog->getSourceHistogramMethod());
|
||||
if(_preferencesDialog->isSourceFeatureDetection())
|
||||
{
|
||||
_camera->enableFeatureDetection(parameters);
|
||||
}
|
||||
_camera->setStereoToDepth(_preferencesDialog->isSourceStereoDepthGenerated());
|
||||
_camera->setStereoExposureCompensation(_preferencesDialog->isSourceStereoExposureCompensation());
|
||||
_camera->setScanParameters(
|
||||
|
||||
@@ -817,6 +817,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->checkbox_rgbd_colorOnly, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_source_imageDecimation, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->comboBox_source_histogramMethod, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkbox_source_feature_detection, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkbox_stereo_depthGenerated, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->checkBox_stereo_exposureCompensation, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->pushButton_calibrate, SIGNAL(clicked()), this, SLOT(calibrate()));
|
||||
@@ -1388,6 +1389,12 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->doubleSpinBox_OdomORBSLAMFps->setObjectName(Parameters::kOdomORBSLAMFps().c_str());
|
||||
_ui->spinBox_OdomORBSLAMMaxFeatures->setObjectName(Parameters::kOdomORBSLAMMaxFeatures().c_str());
|
||||
_ui->spinBox_OdomORBSLAMMapSize->setObjectName(Parameters::kOdomORBSLAMMapSize().c_str());
|
||||
_ui->groupBox_OdomORBSLAMInertial->setObjectName(Parameters::kOdomORBSLAMInertial().c_str());
|
||||
_ui->doubleSpinBox_ORBSLAMGyroNoise->setObjectName(Parameters::kOdomORBSLAMGyroNoise().c_str());
|
||||
_ui->doubleSpinBox_ORBSLAMAccNoise->setObjectName(Parameters::kOdomORBSLAMAccNoise().c_str());
|
||||
_ui->doubleSpinBox_ORBSLAMGyroWalk->setObjectName(Parameters::kOdomORBSLAMGyroWalk().c_str());
|
||||
_ui->doubleSpinBox_ORBSLAMAccWalk->setObjectName(Parameters::kOdomORBSLAMAccWalk().c_str());
|
||||
_ui->doubleSpinBox_ORBSLAMSamplingRate->setObjectName(Parameters::kOdomORBSLAMSamplingRate().c_str());
|
||||
|
||||
// Odometry Okvis
|
||||
_ui->lineEdit_OdomOkvisPath->setObjectName(Parameters::kOdomOKVISConfigPath().c_str());
|
||||
@@ -2052,6 +2059,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->checkbox_rgbd_colorOnly->setChecked(false);
|
||||
_ui->spinBox_source_imageDecimation->setValue(1);
|
||||
_ui->comboBox_source_histogramMethod->setCurrentIndex(0);
|
||||
_ui->checkbox_source_feature_detection->setChecked(false);
|
||||
_ui->checkbox_stereo_depthGenerated->setChecked(false);
|
||||
_ui->checkBox_stereo_exposureCompensation->setChecked(false);
|
||||
_ui->openni2_autoWhiteBalance->setChecked(true);
|
||||
@@ -2487,6 +2495,7 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
_ui->lineEdit_sourceLocalTransform->setText(settings.value("localTransform",_ui->lineEdit_sourceLocalTransform->text()).toString());
|
||||
_ui->spinBox_source_imageDecimation->setValue(settings.value("imageDecimation",_ui->spinBox_source_imageDecimation->value()).toInt());
|
||||
_ui->comboBox_source_histogramMethod->setCurrentIndex(settings.value("histogramMethod", _ui->comboBox_source_histogramMethod->currentIndex()).toInt());
|
||||
_ui->checkbox_source_feature_detection->setChecked(settings.value("featureDetection", _ui->checkbox_source_feature_detection->isChecked()).toBool());
|
||||
// Backward compatibility
|
||||
if(_ui->lineEdit_sourceLocalTransform->text().compare("0 0 1 -1 0 0 0 -1 0") == 0)
|
||||
{
|
||||
@@ -3026,6 +3035,7 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
settings.setValue("localTransform", _ui->lineEdit_sourceLocalTransform->text());
|
||||
settings.setValue("imageDecimation", _ui->spinBox_source_imageDecimation->value());
|
||||
settings.setValue("histogramMethod", _ui->comboBox_source_histogramMethod->currentIndex());
|
||||
settings.setValue("featureDetection", _ui->checkbox_source_feature_detection->isChecked());
|
||||
|
||||
settings.beginGroup("rgbd");
|
||||
settings.setValue("driver", _ui->comboBox_cameraRGBD->currentIndex());
|
||||
@@ -6028,6 +6038,10 @@ int PreferencesDialog::getSourceHistogramMethod() const
|
||||
{
|
||||
return _ui->comboBox_source_histogramMethod->currentIndex();
|
||||
}
|
||||
bool PreferencesDialog::isSourceFeatureDetection() const
|
||||
{
|
||||
return _ui->checkbox_source_feature_detection->isChecked();
|
||||
}
|
||||
bool PreferencesDialog::isSourceStereoDepthGenerated() const
|
||||
{
|
||||
return _ui->checkbox_stereo_depthGenerated->isChecked();
|
||||
@@ -6833,6 +6847,10 @@ void PreferencesDialog::testOdometry()
|
||||
cameraThread.setColorOnly(_ui->checkbox_rgbd_colorOnly->isChecked());
|
||||
cameraThread.setImageDecimation(_ui->spinBox_source_imageDecimation->value());
|
||||
cameraThread.setHistogramMethod(_ui->comboBox_source_histogramMethod->currentIndex());
|
||||
if(_ui->checkbox_source_feature_detection->isChecked())
|
||||
{
|
||||
cameraThread.enableFeatureDetection(this->getAllParameters());
|
||||
}
|
||||
cameraThread.setStereoToDepth(_ui->checkbox_stereo_depthGenerated->isChecked());
|
||||
cameraThread.setStereoExposureCompensation(_ui->checkBox_stereo_exposureCompensation->isChecked());
|
||||
cameraThread.setScanParameters(
|
||||
@@ -6905,6 +6923,10 @@ void PreferencesDialog::testCamera()
|
||||
cameraThread.setColorOnly(_ui->checkbox_rgbd_colorOnly->isChecked());
|
||||
cameraThread.setImageDecimation(_ui->spinBox_source_imageDecimation->value());
|
||||
cameraThread.setHistogramMethod(_ui->comboBox_source_histogramMethod->currentIndex());
|
||||
if(_ui->checkbox_source_feature_detection->isChecked())
|
||||
{
|
||||
cameraThread.enableFeatureDetection(this->getAllParameters());
|
||||
}
|
||||
cameraThread.setStereoToDepth(_ui->checkbox_stereo_depthGenerated->isChecked());
|
||||
cameraThread.setStereoExposureCompensation(_ui->checkBox_stereo_exposureCompensation->isChecked());
|
||||
cameraThread.setScanParameters(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user