Skip to content

Loop closure detection

matlabbe edited this page Nov 23, 2014 · 15 revisions

Introduction

This simple example shows how to use RTAB-Map to process a data set.

Details

  • Open RTAB-Map application. At the first execution, you should see a dialog saying that a working directory is created in your "Documents" folder, click ok. This working directory holds the database and log files.

  • At this point, you should see the main window of RTAB-Map.

  • Clean the working directory. Menu Edit -> "Delete memory (# Mb)". A warning is shown about erasing the database. If you don't need to keep it, click ok. Otherwise, click no, then Menu Edit -> "Show working directory in file browser" and backup the database (LTM.db) and log files (LogI.txt, LogF.txt) before executing the "Delete memory" action.

  • Setup parameters for appearance-based mapping only. Download this file settingsAppearanceDemo.ini, open Edit->Preferences->General settings, click on "Load settings" and select the file you have just downloaded. Here information about which parameters are modified from the default ones:
  • RGBD/Enabled = False (disable metric stuff)
  • Rtabmap/ImageBufferSize = 0 (process all images)
  • Rtabmap/DetectionRate = 0 (go as fast as the camera publishes images)
  • Mem/RehearsalSimilarity = 0.4
  • Mem/STMSize = 15
  • Mem/RehearsalIdUpdatedToNewOne = true
  • Mem/BadSignaturesIgnored = true (ignore images with little or no features)
  • Setup the source of the camera. For this example, download this sample data set and extract it anywhere. Menu Detection -> "Select Source" -> "Images ...". Select the directory containing images just extracted.

  • Click on "Start" button in the toolbox of the main window. You should see briefly an initialization dialog and the detection is paused on the first image. The initialization can be done before starting (Menu Edit -> "Apply settings to the detector"), thus the detection will not be paused when starting the detection.

  • Push button "Pause on match". This will make the detector pause when an accepted loop closure is found.

  • Push button "Pause" to continue the detection. The detection should work until the image 50 is acquired.

  • Colors legend :

  • Blue = feature found in the previous image (when almost all features are blue, this means that the current image is merged with the previous one, increasing the weight).

  • Red = feature found in the dictionary.

  • Green = feature not found in the dictionary (so it is a new feature).

  • Yellow = same as Green, but found more than one time in the image.

  • Pink = feature found in the two images.

  • Push button "Pause on match" to avoid pausing on each loop closure detected.

  • Push button "Pause" to continue the detection to the end of the data set.

  • When the last image (84) is processed, click Menu Window -> "Show view" -> Statistics. This will open a panel showing statistics. For this tutorial, look only information in the top part of the panel. We can see the number of loop closures detected/rejected.

Other data sets

video

  • NFSMW data set

video

video