updating missing param in gui

This commit is contained in:
matlabbe
2026-06-01 22:09:40 -07:00
parent fe7c536be4
commit e2add4ac70
3 changed files with 149 additions and 117 deletions
+19 -17
View File
@@ -54,12 +54,17 @@ std::string testDataPath(const std::string & basename)
// Output DB path named after the running test so manual inspection is easy
// (rtabmap-databaseViewer <tempdir>/rtabmap_integration_<TestName>.db). The
// file is overwritten on each run and NOT deleted at teardown.
std::string workDbForCurrentTest()
std::string workDbForCurrentTest(const std::string & suffix = "")
{
const ::testing::TestInfo * info =
::testing::UnitTest::GetInstance()->current_test_info();
const std::string testName = info != nullptr ? info->name() : "unknown";
return test::tempPath(uFormat("rtabmap_integration_%s.db", testName.c_str()));
if(suffix.empty())
{
return test::tempPath(uFormat("rtabmap_integration_%s.db", testName.c_str()));
}
return test::tempPath(uFormat("rtabmap_integration_%s_%s.db",
testName.c_str(), suffix.c_str()));
}
// Result bundle populated by replayDatabase(). Extend as the assertions in the
@@ -133,11 +138,8 @@ ReplayResult replayDatabase(
bool useStoredOdomAsGuess = false,
bool passOdomDataToRtabmap = false,
const std::map<double, Transform> * goldenStampedGroundTruth = nullptr,
// When >1, drop (stride-1) frames out of every `stride` reads
// before any odometry/rtabmap work — halves work at stride=2,
// thirds at stride=3, etc. The throttle inside rtabmap still
// applies on top.
int frameStride = 1)
int frameStride = 1,
const std::string & runLabel = "")
{
ReplayResult result;
@@ -158,11 +160,12 @@ ReplayResult replayDatabase(
std::unique_ptr<Odometry> odometry(Odometry::create(odometryParameters));
// Output DB at a discoverable path named after the test. We erase any
// previous run's file so each invocation starts fresh, but we deliberately
// do NOT delete it at the end -- callers can inspect it with
// rtabmap-databaseViewer to verify the run looks sensible.
const std::string workDb = workDbForCurrentTest();
// Output DB at a discoverable path named after the test (with optional
// runLabel suffix to disambiguate per-backend / per-variant runs). We
// erase any previous file so each invocation starts fresh but we
// deliberately do NOT delete it at the end -- callers can inspect it
// with rtabmap-databaseViewer to verify the run looks sensible.
const std::string workDb = workDbForCurrentTest(runLabel);
UFile::erase(workDb);
Rtabmap rtabmap;
rtabmap.init(rtabmapParameters, workDb);
@@ -879,13 +882,12 @@ TEST_F(RtabmapIntegrationFixture, Stereo20Hz)
ParametersMap odomParams = baseOdometryParams();
odomParams[Parameters::kOdomF2MBundleAdjustment()] = strategy;
// passOdomDataToRtabmap=true: rtabmap reuses keypoints/descriptors
// already extracted by odometry (pairs with Mem/UseOdomFeatures).
// useStoredOdomAsGuess=false: this DB has no stored odom — visual
// odom runs from scratch.
const ReplayResult result = replayDatabase(dbPath, rtabmapParams, odomParams,
/*useStoredOdomAsGuess=*/false,
/*passOdomDataToRtabmap=*/true);
/*passOdomDataToRtabmap=*/true,
/*goldenStampedGroundTruth=*/nullptr,
/*frameStride=*/1,
/*runLabel=*/be.name);
EXPECT_GT(result.framesRead, 1000)
<< be.name << ": expected ~1035 frames from stereo_20Hz.db";
+1
View File
@@ -1282,6 +1282,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
_ui->comboBox_g2o_solver->setObjectName(Parameters::kg2oSolver().c_str());
_ui->comboBox_g2o_optimizer->setObjectName(Parameters::kg2oOptimizer().c_str());
_ui->doubleSpinBox_g2o_pixelVariance->setObjectName(Parameters::kOptimizerPixelVariance().c_str());
_ui->doubleSpinBox_optimizer_disparityVariance->setObjectName(Parameters::kOptimizerDisparityVariance().c_str());
_ui->doubleSpinBox_g2o_robustKernelDelta->setObjectName(Parameters::kOptimizerRobustKernelDelta().c_str());
_ui->doubleSpinBox_g2o_baseline->setObjectName(Parameters::kOptimizerBaseline().c_str());
+129 -100
View File
@@ -95,7 +95,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>18</number>
<number>23</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,0">
@@ -25869,6 +25869,134 @@ Lower the ratio -&gt; higher the precision.</string>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_20">
<property name="title">
<string>Bundle Adjustement</string>
</property>
<layout class="QGridLayout" name="gridLayout_84" columnstretch="0,1">
<item row="4" column="1">
<widget class="QLabel" name="label_disparityVariance">
<property name="text">
<string>Disparity variance. Set higher if the depth source is noisier than the feature precision (e.g. stereo block matching at long range); set lower if depth is more accurate than 2d pixel location of the features (e.g. ToF / LiDAR-fused depth).</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_350">
<property name="text">
<string>Robust kernel delta used for bundle adjustment (0 means don't use robust kernel). Observations with chi2 over this threshold will be ignored in the second optimization pass.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_352">
<property name="text">
<string>When doing bundle adjustment with RGB-D data, we can set a fake baseline to do stereo bundle adjustment (if 0, mono bundle adjustment is done). For stereo data, the baseline in the calibration is used directly.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_robustKernelDelta">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>5.991000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_baseline">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.075000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_optimizer_disparityVariance">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.001000000000000</double>
</property>
<property name="maximum">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_pixelVariance">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="maximum">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_148">
<property name="text">
<string>Pixel variance of the feature detection. Set higher if features are noisy (low texture, motion blur); set lower if features are sub-pixel.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxx_g2o">
<property name="title">
@@ -25937,105 +26065,6 @@ Lower the ratio -&gt; higher the precision.</string>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_20">
<property name="title">
<string>Bundle Adjustement</string>
</property>
<layout class="QGridLayout" name="gridLayout_84" columnstretch="0,1">
<item row="0" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_pixelVariance">
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="maximum">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_148">
<property name="text">
<string>Pixel variance used for bundle adjustment.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_robustKernelDelta">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>999.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>5.991000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_350">
<property name="text">
<string>Robust kernel delta used for bundle adjustment (0 means don't use robust kernel). Observations with chi2 over this threshold will be ignored in the second optimization pass.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_g2o_baseline">
<property name="suffix">
<string> m</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.075000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_352">
<property name="text">
<string>When doing bundle adjustment with RGB-D data, we can set a fake baseline to do stereo bundle adjustment (if 0, mono bundle adjustment is done). For stereo data, the baseline in the calibration is used directly.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>