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

Sensor calibration refinement

Refining the calibration using the optimization

An accurate calibration is necessary to obtain high-quality odometry estimates and to successfully refine the maps during the subsequent batch optimization. In most cases, maplab uses an (initial) sensor calibration estimated using external calibration tools such as Kalibr.

Optionally, the visual-inertial batch optimization can jointly estimate the intrinsics and extrinsics of the camera(s) together with the trajectory and the structure.

When running optvi, you can unfix certain parts of the calibration using the following flags:

  • --ba_fix_ncamera_intrinsics=false
  • --ba_fix_ncamera_extrinsics_rotation=false
  • --ba_fix_ncamera_extrinsics_translation=false

These flags are all set to true by default. When starting from an inaccurate initial guess you may want to to unfix only some of them (e.g. extrinsics first), perform the optimization, unfix some others, optimize, etc. Unfortunately, this process requires some experimentation.

Note: Usually, you will need a good initial estimate for the calibration refinement to work. Additionally, your map should be long enough, contain enough excitation and preferably loopclose (using the lc command) to yield a good calibration.

Inspecting and saving the calibration

After the optimization, you can inspect the calibration using the command:

print_camera_calibrations

This will print an output similar to:

Camera(54812562fa109c40fe90b29a59dd7798): cam0
  line delay: 0
  image (cols,rows): 752, 480
  focal length (cols,rows): 458.655, 457.297
  optical center (cols,rows): 367.216, 248.375
  distortion: 
Distortion: (RadTanDistortion) 
  k1 (radial):     -0.283408
  k2 (radial):     0.0739591
  p1 (tangential): 0.000193595
  p2 (tangential): 1.76187e-05
T_C_B:
 0.0148655   0.999557 -0.0257744  0.0652229
 -0.999881  0.0149672 0.00375619 -0.0207064
 0.0041403  0.0257155   0.999661 -0.0080546
         0          0          0          1

While it's impossible to tell if the calibration is accurate based on this output, you can easily detect that something went wrong as the calibration typically:

  • has similar x-y focal length values, e.g. 458.655 vs 457.297),
  • has the optical center located roughly in the middle of the image, e.g. (367.216, 248.375) for a (752, 480) image size,
  • has a reasonable translation between the camera and the base/IMU frame (last column of T_C_B), compare it with manually measured values.

If you're happy with the results, you can export the calibration using the command:

export_ncamera_calibration --ncamera_calibration_export_folder your_folder

and use it in the future.

Prev
Initial sensor calibration with Kalibr
Next
Intel RealSense ZR300