Skip to content

Commit 210aadb

Browse files
committed
RGBD/LinearUpdate and RGBD/AngularUpdate: updated description and now require both to be 0 to skip motion check.
1 parent 1def668 commit 210aadb

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

corelib/include/rtabmap/core/Parameters.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ class RTABMAP_CORE_EXPORT Parameters
362362

363363
// RGB-D SLAM
364364
RTABMAP_PARAM(RGBD, Enabled, bool, true, "Activate metric SLAM. If set to false, classic RTAB-Map loop closure detection is done using only images and without any metric information.");
365-
RTABMAP_PARAM(RGBD, LinearUpdate, float, 0.1, "Minimum linear displacement (m) to update the map. Rehearsal is done prior to this, so weights are still updated.");
366-
RTABMAP_PARAM(RGBD, AngularUpdate, float, 0.1, "Minimum angular displacement (rad) to update the map. Rehearsal is done prior to this, so weights are still updated.");
365+
RTABMAP_PARAM(RGBD, LinearUpdate, float, 0.1, uFormat("Minimum linear displacement (m) to update the map. Rehearsal is done prior to this, so weights are still updated. To update the map when not moving, both %s and %s should be set to 0.", Parameters::kRGBDLinearUpdate().c_str(), Parameters::kRGBDAngularUpdate().c_str()));
366+
RTABMAP_PARAM(RGBD, AngularUpdate, float, 0.1, uFormat("Minimum angular displacement (rad) to update the map. Rehearsal is done prior to this, so weights are still updated. To update the map when not moving, both %s and %s should be set to 0.", Parameters::kRGBDLinearUpdate().c_str(), Parameters::kRGBDAngularUpdate().c_str()));
367367
RTABMAP_PARAM(RGBD, LinearSpeedUpdate, float, 0.0, "Maximum linear speed (m/s) to update the map (0 means not limit).");
368368
RTABMAP_PARAM(RGBD, AngularSpeedUpdate, float, 0.0, "Maximum angular speed (rad/s) to update the map (0 means not limit).");
369369
RTABMAP_PARAM(RGBD, AggressiveLoopThr, float, 0.05, uFormat("Loop closure threshold used (overriding %s) when a new mapping session is not yet linked to a map of the highest loop closure hypothesis. In localization mode, this threshold is used when there are no loop closure constraints with any map in the cache (%s). In all cases, the goal is to aggressively loop on a previous map in the database. Only used when %s is enabled. Set 1 to disable.", kRtabmapLoopThr().c_str(), kRGBDMaxOdomCacheSize().c_str(), kRGBDEnabled().c_str()));

corelib/src/Rtabmap.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,9 +1544,10 @@ bool Rtabmap::process(
15441544
{
15451545
float x,y,z, roll,pitch,yaw;
15461546
t.getTranslationAndEulerAngles(x,y,z, roll,pitch,yaw);
1547-
bool isMoving = fabs(x) > _rgbdLinearUpdate ||
1548-
fabs(y) > _rgbdLinearUpdate ||
1549-
fabs(z) > _rgbdLinearUpdate ||
1547+
bool isMoving = (_rgbdLinearUpdate > 0.0f) && (
1548+
fabs(x) > _rgbdLinearUpdate ||
1549+
fabs(y) > _rgbdLinearUpdate ||
1550+
fabs(z) > _rgbdLinearUpdate) ||
15501551
(_rgbdAngularUpdate>0.0f && (
15511552
fabs(roll) > _rgbdAngularUpdate ||
15521553
fabs(pitch) > _rgbdAngularUpdate ||

corelib/src/optimizer/OptimizerG2O.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ std::map<int, Transform> OptimizerG2O::optimize(
216216
outputCovariance = cv::Mat::eye(6,6,CV_64FC1);
217217
std::map<int, Transform> optimizedPoses;
218218
#ifdef RTABMAP_G2O
219-
UDEBUG("Optimizing graph...");
219+
UDEBUG("Optimizing graph... (rootId=%d)", rootId);
220220

221221
#ifndef RTABMAP_VERTIGO
222222
if(this->isRobust())
@@ -348,6 +348,9 @@ std::map<int, Transform> OptimizerG2O::optimize(
348348
{
349349
if(!priorsIgnored() && iter->second.type() == Link::kPosePrior)
350350
{
351+
if(rootId!=0) {
352+
UDEBUG("Removed rootId=%d because there are priors.");
353+
}
351354
rootId = 0;
352355
break;
353356
}

guilib/src/ui/preferencesDialog.ui

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<property name="geometry">
6464
<rect>
6565
<x>0</x>
66-
<y>-641</y>
66+
<y>0</y>
6767
<width>713</width>
6868
<height>4779</height>
6969
</rect>
@@ -95,7 +95,7 @@
9595
<enum>QFrame::Raised</enum>
9696
</property>
9797
<property name="currentIndex">
98-
<number>5</number>
98+
<number>12</number>
9999
</property>
100100
<widget class="QWidget" name="page_22">
101101
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,0">
@@ -13141,7 +13141,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
1314113141
<item row="0" column="1">
1314213142
<widget class="QLabel" name="label_153">
1314313143
<property name="text">
13144-
<string>Linear update: Minimum linear displacement to update the map. Note that Weight Update is done prior to this, so weights are still updated.</string>
13144+
<string>Linear update: Minimum linear displacement to update the map. Note that Weight Update is done prior to this, so weights are still updated. To update the map when not moving, both linear and angular update parameters should be 0.</string>
1314513145
</property>
1314613146
<property name="wordWrap">
1314713147
<bool>true</bool>
@@ -13231,7 +13231,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
1323113231
<item row="1" column="1">
1323213232
<widget class="QLabel" name="label_152">
1323313233
<property name="text">
13234-
<string>Angular update: Minimum angular displacement to update the map. Note that Weight Update is done prior to this, so weights are still updated.</string>
13234+
<string>Angular update: Minimum angular displacement to update the map. Note that Weight Update is done prior to this, so weights are still updated. To update the map when not moving, both linear and angular update parameters should be 0.</string>
1323513235
</property>
1323613236
<property name="wordWrap">
1323713237
<bool>true</bool>
@@ -13303,7 +13303,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
1330313303
<item row="2" column="1">
1330413304
<widget class="QLabel" name="label_432">
1330513305
<property name="text">
13306-
<string>Maximum linear speed to update the map (0 means not limit).</string>
13306+
<string>Maximum linear speed to update the map (0 means not limit). </string>
1330713307
</property>
1330813308
<property name="wordWrap">
1330913309
<bool>true</bool>

tools/EurocDataset/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void showUsage()
7070
" --Rtabmap/PublishRAMUsage true\\\n"
7171
" --Rtabmap/DetectionRate 2\\\n"
7272
" --RGBD/LinearUpdate 0\\\n"
73+
" --RGBD/AngularUpdate 0\\\n"
7374
" --Mem/STMSize 30\\\n"
7475
" ~/EuRoC/V1_03_difficult\n\n", rtabmap::Parameters::showUsage());
7576
exit(1);

tools/KittiDataset/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ void showUsage()
7373
" --Rtabmap/DetectionRate 2\\\n"
7474
" --Rtabmap/CreateIntermediateNodes true\\\n"
7575
" --RGBD/LinearUpdate 0\\\n"
76+
" --RGBD/AngularUpdate 0\\\n"
7677
" --GFTT/QualityLevel 0.01\\\n"
7778
" --GFTT/MinDistance 7\\\n"
7879
" --OdomF2M/MaxSize 3000\\\n"

tools/RgbdDataset/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ void showUsage()
6666
" --Rtabmap/PublishRAMUsage true\\\n"
6767
" --Rtabmap/DetectionRate 2\\\n"
6868
" --RGBD/LinearUpdate 0\\\n"
69+
" --RGBD/AngularUpdate 0\\\n"
6970
" --Mem/STMSize 30\\\n"
7071
" ~/rgbd_dataset_freiburg3_long_office_household\n\n", rtabmap::Parameters::showUsage());
7172
exit(1);

0 commit comments

Comments
 (0)