Skip to content

Commit 2657345

Browse files
committed
Fixed assert on words index <0 when addMoreLoopClosures is called
1 parent af7ff60 commit 2657345

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

corelib/src/Memory.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,8 +4305,7 @@ void Memory::getNodeWordsAndGlobalDescriptors(int nodeId,
43054305
}
43064306
if(!words.empty() && wordsKpts.empty() && _dbDriver)
43074307
{
4308-
std::multimap<int, int> tmpWords;
4309-
_dbDriver->getLocalFeatures(nodeId, tmpWords, wordsKpts, words3, wordsDescriptors);
4308+
_dbDriver->getLocalFeatures(nodeId, words, wordsKpts, words3, wordsDescriptors);
43104309
}
43114310
}
43124311

corelib/src/RegistrationVis.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,12 @@ Transform RegistrationVis::computeTransformationImpl(
333333
UDEBUG("Feature Detector = %d", (int)_detectorFrom->getType());
334334
UDEBUG("guess=%s", guess.prettyPrint().c_str());
335335

336-
UDEBUG("Input(%d): from=%d words, %d 3D words, %d words descriptors, %d kpts, %d kpts3D, %d descriptors, image=%dx%d models=%d stereo=%d",
336+
UDEBUG("Input(%d): from=%d words, %d 3D words, %d words descriptors, %d words kpts, %d kpts, %d kpts3D, %d descriptors, image=%dx%d models=%d stereo=%d",
337337
fromSignature.id(),
338338
(int)fromSignature.getWords().size(),
339339
(int)fromSignature.getWords3().size(),
340340
(int)fromSignature.getWordsDescriptors().rows,
341+
(int)fromSignature.getWordsKpts().size(),
341342
(int)fromSignature.sensorData().keypoints().size(),
342343
(int)fromSignature.sensorData().keypoints3D().size(),
343344
fromSignature.sensorData().descriptors().rows,
@@ -346,11 +347,12 @@ Transform RegistrationVis::computeTransformationImpl(
346347
(int)fromSignature.sensorData().cameraModels().size(),
347348
(int)fromSignature.sensorData().stereoCameraModels().size());
348349

349-
UDEBUG("Input(%d): to=%d words, %d 3D words, %d words descriptors, %d kpts, %d kpts3D, %d descriptors, image=%dx%d models=%d stereo=%d",
350+
UDEBUG("Input(%d): to=%d words, %d 3D words, %d words descriptors, %d words kpts, %d kpts, %d kpts3D, %d descriptors, image=%dx%d models=%d stereo=%d",
350351
toSignature.id(),
351352
(int)toSignature.getWords().size(),
352353
(int)toSignature.getWords3().size(),
353354
(int)toSignature.getWordsDescriptors().rows,
355+
(int)toSignature.getWordsKpts().size(),
354356
(int)toSignature.sensorData().keypoints().size(),
355357
(int)toSignature.sensorData().keypoints3D().size(),
356358
toSignature.sensorData().descriptors().rows,

corelib/src/Rtabmap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5638,6 +5638,7 @@ int Rtabmap::detectMoreLoopClosures(
56385638
const ProgressState * processState,
56395639
float clusterRadiusMin)
56405640
{
5641+
UDEBUG("");
56415642
UASSERT(iterations>0);
56425643

56435644
if(_graphOptimizer->iterations() <= 0)

0 commit comments

Comments
 (0)