mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Ask to set detection rate to 0 when selecting a source database. DBReader: set 9999 covariance for the first odom pose of a database.
This commit is contained in:
@@ -323,11 +323,16 @@ SensorData DBReader::getNextData(CameraInfo * info)
|
|||||||
{
|
{
|
||||||
std::map<int, Link> links;
|
std::map<int, Link> links;
|
||||||
_dbDriver->loadLinks(*_currentId, links, Link::kNeighbor);
|
_dbDriver->loadLinks(*_currentId, links, Link::kNeighbor);
|
||||||
if(links.size())
|
if(links.size() && links.begin()->first < *_currentId)
|
||||||
{
|
{
|
||||||
// assume the first is the backward neighbor, take its variance
|
// assume the first is the backward neighbor, take its variance
|
||||||
infMatrix = links.begin()->second.infMatrix();
|
infMatrix = links.begin()->second.infMatrix();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// first node, set high variance to make rtabmap trigger a new map
|
||||||
|
infMatrix /= 9999.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
|
|||||||
connect(_ui->checkBox_gainLinkedLocationsOnly, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
|
connect(_ui->checkBox_gainLinkedLocationsOnly, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
|
||||||
|
|
||||||
connect(_ui->groupBox_meshing, SIGNAL(clicked(bool)), this, SIGNAL(configChanged()));
|
connect(_ui->groupBox_meshing, SIGNAL(clicked(bool)), this, SIGNAL(configChanged()));
|
||||||
connect(_ui->groupBox_meshing, SIGNAL(toggled(bool)), this, SIGNAL(updateReconstructionFlavor()));
|
connect(_ui->groupBox_meshing, SIGNAL(toggled(bool)), this, SLOT(updateReconstructionFlavor()));
|
||||||
connect(_ui->doubleSpinBox_gp3Radius, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
connect(_ui->doubleSpinBox_gp3Radius, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||||
connect(_ui->doubleSpinBox_gp3Mu, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
connect(_ui->doubleSpinBox_gp3Mu, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||||
connect(_ui->doubleSpinBox_meshDecimationFactor, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
connect(_ui->doubleSpinBox_meshDecimationFactor, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
|
||||||
|
|||||||
@@ -2828,6 +2828,22 @@ void PreferencesDialog::selectSourceDatabase()
|
|||||||
{
|
{
|
||||||
int r = QMessageBox::question(this, tr("Odometry in database..."), tr("Use odometry saved in database (if some saved)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
int r = QMessageBox::question(this, tr("Odometry in database..."), tr("Use odometry saved in database (if some saved)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||||
_ui->source_checkBox_ignoreOdometry->setChecked(r != QMessageBox::Yes);
|
_ui->source_checkBox_ignoreOdometry->setChecked(r != QMessageBox::Yes);
|
||||||
|
|
||||||
|
if (_ui->general_doubleSpinBox_detectionRate->value() != 0 && _ui->general_spinBox_imagesBufferSize->value() != 0)
|
||||||
|
{
|
||||||
|
r = QMessageBox::question(this, tr("Detection rate..."),
|
||||||
|
tr("Do you want to process all frames? \n\nClicking \"Yes\" will set "
|
||||||
|
"RTAB-Map's detection rate (%1 Hz) and buffer size (%2) to 0 to make "
|
||||||
|
"sure that all frames are processed.")
|
||||||
|
.arg(_ui->general_doubleSpinBox_detectionRate->value())
|
||||||
|
.arg(_ui->general_spinBox_imagesBufferSize->value()),
|
||||||
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||||
|
if (r == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
_ui->general_doubleSpinBox_detectionRate->setValue(0.0);
|
||||||
|
_ui->general_spinBox_imagesBufferSize->setValue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
_ui->source_database_lineEdit_path->setText(paths.size()==1?paths.front():paths.join(";"));
|
_ui->source_database_lineEdit_path->setText(paths.size()==1?paths.front():paths.join(";"));
|
||||||
_ui->source_spinBox_databaseStartPos->setValue(0);
|
_ui->source_spinBox_databaseStartPos->setValue(0);
|
||||||
_ui->source_spinBox_database_cameraIndex->setValue(-1);
|
_ui->source_spinBox_database_cameraIndex->setValue(-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user