mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added Odom/VarianceFromInliersCount parameter (default false)
This commit is contained in:
@@ -208,6 +208,7 @@ public:
|
||||
double getSimThr() const;
|
||||
int getOdomStrategy() const;
|
||||
int getOdomBufferSize() const;
|
||||
bool getOdomVarianceFromInliersCount() const;
|
||||
QString getCameraInfoDir() const; // "workinfDir/camera_info"
|
||||
|
||||
//
|
||||
|
||||
@@ -2931,7 +2931,7 @@ void MainWindow::startDetection()
|
||||
{
|
||||
odom = new OdometryBOW(parameters);
|
||||
}
|
||||
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize());
|
||||
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize(), _preferencesDialog->getOdomVarianceFromInliersCount());
|
||||
|
||||
UEventsManager::addHandler(_odomThread);
|
||||
UEventsManager::createPipe(_camera, _odomThread, "CameraEvent");
|
||||
@@ -2968,7 +2968,7 @@ void MainWindow::startDetection()
|
||||
{
|
||||
odom = new OdometryBOW(parameters);
|
||||
}
|
||||
_odomThread = new OdometryThread(odom);
|
||||
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize(), _preferencesDialog->getOdomVarianceFromInliersCount());
|
||||
|
||||
UEventsManager::addHandler(_odomThread);
|
||||
_odomThread->start();
|
||||
|
||||
@@ -650,6 +650,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->odom_holonomic->setObjectName(Parameters::kOdomHolonomic().c_str());
|
||||
_ui->odom_fillInfoData->setObjectName(Parameters::kOdomFillInfoData().c_str());
|
||||
_ui->odom_dataBufferSize->setObjectName(Parameters::kOdomImageBufferSize().c_str());
|
||||
_ui->odom_varianceFromInliersCount->setObjectName(Parameters::kOdomVarianceFromInliersCount().c_str());
|
||||
_ui->lineEdit_odom_roi->setObjectName(Parameters::kOdomRoiRatios().c_str());
|
||||
_ui->odom_estimationType->setObjectName(Parameters::kOdomEstimationType().c_str());
|
||||
connect(_ui->odom_estimationType, SIGNAL(currentIndexChanged(int)), _ui->stackedWidget_odomEstimation, SLOT(setCurrentIndex(int)));
|
||||
@@ -3744,6 +3745,10 @@ int PreferencesDialog::getOdomBufferSize() const
|
||||
{
|
||||
return _ui->odom_dataBufferSize->value();
|
||||
}
|
||||
bool PreferencesDialog::getOdomVarianceFromInliersCount() const
|
||||
{
|
||||
return _ui->odom_varianceFromInliersCount->isChecked();
|
||||
}
|
||||
|
||||
QString PreferencesDialog::getCameraInfoDir() const
|
||||
{
|
||||
@@ -3883,7 +3888,8 @@ void PreferencesDialog::testOdometry(int type)
|
||||
|
||||
OdometryThread odomThread(
|
||||
odometry, // take ownership of odometry
|
||||
_ui->odom_dataBufferSize->value());
|
||||
_ui->odom_dataBufferSize->value(),
|
||||
_ui->odom_varianceFromInliersCount->isChecked());
|
||||
odomThread.registerToEventsManager();
|
||||
|
||||
OdometryViewer * odomViewer = new OdometryViewer(10,
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-1094</y>
|
||||
<width>760</width>
|
||||
<height>1655</height>
|
||||
<y>0</y>
|
||||
<width>755</width>
|
||||
<height>1715</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>19</number>
|
||||
<number>23</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -8476,7 +8476,7 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_232">
|
||||
<property name="text">
|
||||
<string>Data buffer size (0 means inf).</string>
|
||||
@@ -8522,7 +8522,7 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QSpinBox" name="odom_dataBufferSize">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
@@ -8584,13 +8584,33 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QPushButton" name="pushButton_testOdometry">
|
||||
<property name="text">
|
||||
<string>Test selected odometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_261">
|
||||
<property name="text">
|
||||
<string>Set variance as the inverse of the number of inliers. Otherwise, the variance is computed as the average 3D position error of the inliers.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="odom_varianceFromInliersCount">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
Reference in New Issue
Block a user