Fusion SLAM
Home
  • OVERVIEW AND INTRODUCTION
  • INSTALLING
  • DATASETS
  • TUTORIALS FOR ROVIOLI (ONLINE FRONTEND)
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - BASICS
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - USE-CASES
  • TUTORIALS FOR USING MAPLAB SERVER (ONLINE)
  • HARDWARE INTEGRATION AND SENSOR CALIBRATION
  • TUTORIALS FOR EXTENDING MAPLAB
  • DEVELOPEMENT GUIDELINES
  • ADDITIONAL FORMATS
Project
  • 简体中文
  • English
Home
  • OVERVIEW AND INTRODUCTION
  • INSTALLING
  • DATASETS
  • TUTORIALS FOR ROVIOLI (ONLINE FRONTEND)
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - BASICS
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - USE-CASES
  • TUTORIALS FOR USING MAPLAB SERVER (ONLINE)
  • HARDWARE INTEGRATION AND SENSOR CALIBRATION
  • TUTORIALS FOR EXTENDING MAPLAB
  • DEVELOPEMENT GUIDELINES
  • ADDITIONAL FORMATS
Project
  • 简体中文
  • English
  • OVERVIEW AND INTRODUCTION

    • Introduction to the Maplab Framework
    • Main Papers
    • Additional Citations
    • Related Research
    • FAQ
    • Known Issues
  • INSTALLING

    • Installing on Ubuntu
    • Compilation and Debugging
  • DATASETS
  • TUTORIALS FOR ROVIOLI (ONLINE FRONTEND)

    • ROVIOLI Introduction
    • Running ROVIOLI in VIO mode: calibartion files, rostopics, bag/topic mode, visualization
    • Running ROVIOLI in Localization mode
    • Multi-session mapping with ROVIOLI
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - BASICS

    • Basic Console Usage
    • Parameters (Gflags)
    • Console map management: load, save, basic visualization
    • Inspecting and visualizing a map
    • Map visualization: see your map in RViz!
    • Preparing a single session map: optimization, loop-closure
    • Understanding loop-closure
    • Optimizing VI-Maps
    • Preparing a multi-session map: map anchoring, loop-closure, pose-graph relaxation
    • Dense Reconstruction: attaching resources to map, available reconstruction tools
    • Resource Importer
  • TUTORIALS FOR USING MAPLAB (OFFLINE TOOLS) - USE-CASES

    • Multi-session use case: CLA, multi-floor use-case
    • Map sparsification: make your mapping more efficient
    • Stereo Dense Reconstruction: EuRoC, multi-session reconstruction use-case
    • External Features
  • TUTORIALS FOR USING MAPLAB SERVER (ONLINE)
  • HARDWARE INTEGRATION AND SENSOR CALIBRATION

    • Sensor Calibration Format: ncamera, imu-sigmas
    • Initial sensor calibration with Kalibr
    • Sensor calibration refinement
    • Intel RealSense ZR300
    • VersaVIS
  • TUTORIALS FOR EXTENDING MAPLAB

    • Using the MapManager
    • Using Timing and Statistics
    • /maplab/docs/pages/tutorials-extending-maplab/C_Coding-Examples:-Creating-a-custom-console-plugin.html
    • /maplab/docs/pages/tutorials-extending-maplab/D_Coding-Examples:-Working-with-the-VI-Map.html
    • Console Plugin System
  • DEVELOPEMENT GUIDELINES

    • Importing maplab to Eclipse
    • Contributing to maplab
    • Header Include Guide
    • Debugging applications
    • Expressing frame transformations in code
    • Verbosity Policy
  • ADDITIONAL FORMATS

Running ROVIOLI in Localization mode

In this tutorial, we will run ROVIOLI in Localization mode. This can greatly improve the estimator accuracy and reduce the drift of the estimated trajectory.

Requirements

As in the VIO case, you need to get the three calibration files (camera, IMU maplab, and IMU rovio) for your sensor setup. Furthermore, you also need:

  • A VI map to localize against. This map should be optimized and loop-closed to obtain better results in ROVIOLI.
  • A dataset to run. Alternatively, a live source can be used.

Preparing a localization map

There are two ways to get a localization map:

  • Manually optimize the VI map from running ROVIOLI in VIO mode using the maplab console. See the tutorial about optimizing a map.
  • Alternatively, you can run the rovioli script from the previous tutorial with the --optimize_map_to_localization_map flag set to true:
source ~/maplab_ws/devel/setup.bash
roscore&
rosrun rovioli tutorial_euroc save_folder_loc_map MH_01_easy.bag --optimize_map_to_localization_map

This will save an optimized localization map under save_folder_loc_map_localization:

$ tree save_folder_loc_map_localization
save_folder_loc_map_localization
└── localization_summary_map

You can either use a VI map (full map) or a localization summary map (summarized map with only the relevant information for localization) to localize in ROVIOLI.

Running ROVIOLI with localization

For this tutorial, we use the Machine Hall 02 dataset from the Euroc dataset website. As for localization map, we use an optimized VI map of the Machine Hall 01 dataset that we assume to be saved under save_folder_loc_map_localization. (Alternatively, you can use the unoptimized map from the [[Sample Datasets]] page. Note, however, that this will yield worse performance than when using an optimized map.)

Use the following script:

#!/usr/bin/env bash
LOCALIZATION_MAP_INPUT=$1
LOCALIZATION_MAP_OUTPUT=$2
ROSBAG=$3
NCAMERA_CALIBRATION="$ROVIO_CONFIG_DIR/ncamera-euroc.yaml"
IMU_PARAMETERS_MAPLAB="$ROVIO_CONFIG_DIR/imu-adis16488.yaml"
IMU_PARAMETERS_ROVIO="$ROVIO_CONFIG_DIR/imu-sigmas-rovio.yaml"
REST=$@

rosrun rovioli rovioli \
  --alsologtostderr=1 \
  --v=2 \
  --ncamera_calibration=$NCAMERA_CALIBRATION  \
  --imu_parameters_maplab=$IMU_PARAMETERS_MAPLAB \
  --imu_parameters_rovio=$IMU_PARAMETERS_ROVIO \
  --publish_debug_markers  \
  --datasource_type="rosbag" \
  --optimize_map_to_localization_map=false \
  --vio_localization_map_folder=$LOCALIZATION_MAP_INPUT \
  --save_map_folder=$LOCALIZATION_MAP_OUTPUT \
  --map_builder_save_image_as_resources=false \
  --datasource_rosbag=$ROSBAG $REST

Now, run the script:

# Make sure that your maplab workspace is sourced!
source ~/maplab_ws/devel/setup.bash
roscore&
rosrun rovioli tutorial_euroc_localization save_folder_loc_map_localization save_map_with_localization MH_02_easy.bag

The map under save_folder_loc_map_localization is used as reference map for localization. It can either be a localization summary map (generated with --optimize_map_to_localization_map in ROVIOLI) or a full VI map (generated from ROVIOLI and optimized with the maplab console). If the argument is an empty string, ROVIOLI will fall back to VIO mode, i.e., ROVIOLI will not perform any localization.

After ROVIOLI is finished, the VI map will be stored under save_folder_with_localization. If you do not want the resulting VI map to be saved, you can keep the argument emtpy:

bash run_rovioli_localization "" save_map MH_02_easy.bag

Visualization during ROVIOLI with localization

In addition to the standard ROVIOLI topics (as explained before), localization mode adds the following visualization topics to RViz:

  • /loopclosure_database: Point cloud of all landmarks in the loop closure database.
  • /loop_closures: Lines connecting the current active vertex with all landmarks that have been used for the localization.
  • /loopclosure_inliers: Point cloud with all landmarks that have been used for the last successful localization.
  • /debug_T_G_I_raw_localization: Red points indicating the vertex positions where a successful localization occurred.
Prev
Running ROVIOLI in VIO mode: calibartion files, rostopics, bag/topic mode, visualization
Next
Multi-session mapping with ROVIOLI