ORB-SLAM3

The raw address: https://github.com/UZ-SLAMLab/ORB_SLAM3

Update to V1.0

Examples Monocular/Monocular-Inertial is available

V1.0, December 22th, 2021

Authors: Carlos Campos, Richard Elvira, Juan J. Gómez Rodríguez, José M. M. Montiel, Juan D. Tardos.

The Changelog describes the features of each version.

ORB-SLAM3 is the first real-time SLAM library able to perform Visual, Visual-Inertial and Multi-Map SLAM with monocular, stereo and RGB-D cameras, using pin-hole and fisheye lens models. In all sensor configurations, ORB-SLAM3 is as robust as the best systems available in the literature, and significantly more accurate. We provide examples to run ORB-SLAM3 in the EuRoC dataset using stereo or monocular, with or without IMU, and in the TUM-VI dataset using fisheye stereo or monocular, with or without IMU. Videos of some example executions can be found at ORB-SLAM3 channel.

This software is based on ORB-SLAM2 developed by Raul Mur-Artal, Juan D. Tardos, J. M. M. Montiel and Dorian Galvez-Lopez (DBoW2).

ORB-SLAM3

Instructions to Install (solved compile and dependencies problems)

Install Libraries and Dependencies (please follow instructions step by step.)

Git :

    sudo apt install git

C++ :

    sudo apt install g++
    sudo apt install build-essential

Libraries :

    sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
    sudo apt update
    sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
    sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev libjasper-dev
    sudo apt-get install libglew-dev libboost-all-dev libssl-dev
    sudo apt install libeigen3-dev

OpenCV :

    cd ~
    mkdir Dev && cd Dev
    git clone https://github.com/opencv/opencv.git
    cd opencv
    git checkout 4.4.0

Add the next lines to the file : modules/videoio/src/cap_ffmpeg_impl.hpp

#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)

#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER

#define AVFMT_RAWPICTURE 0x0020

    mkdir build
    cd build
    cmake -D CMAKE_BUILD_TYPE=Release -D WITH_CUDA=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ..
    make -j 3
    sudo make install

Eigen 3.2.10 :

    tar -xvf eigen3.2.10.tar.bz2
    cd eigen3.2.10
    mkdir build && cd build
    cmake ..
    make
    sudo make install

Pangolin :

    cd ~/Dev
    git clone https://github.com/stevenlovegrove/Pangolin.git
    cd Pangolin 
    mkdir build 
    cd build 
    cmake .. -D CMAKE_BUILD_TYPE=Release 
    make -j 3 
    sudo make install

ORB_SLAM3 :

    git clone https://github.com/maxidu139/ORB_SLAM3_CVRE ORB_SLAM3
    cd ORB_SLAM3
    ./build.sh

ROS (optional) :

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    sudo apt install curl # if you haven't already installed curl
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
    sudo apt update
    sudo apt install ros-noetic-desktop-full
    source /opt/ros/noetic/setup.bash
    echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
    sudo apt install python3-rosdep
    sudo rosdep init
    rosdep update
    export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/userName/Dev/ORB_SLAM3/Examples_old/ROS
    sudo apt install python-is-python3
    cd ThirdPart/Sophus
    mkdir build && cd build
    cmake ..
    make
    sudo make install
    cd ../../
    ./build_ros.sh

Run example :

TUM-VI Examples

TUM-VI dataset was recorded with two fisheye cameras and an inertial sensor.

  1. Download a sequence from https://vision.in.tum.de/data/datasets/visual-inertial-dataset and uncompress it.

Execute the next command in ORB_SLAM3 folder :

Change {pathToDataset} to directory when you uncompress sequence.

./Examples/Monocular-Inertial/mono_inertial_tum_vi Vocabulary/ORBvoc.txt Examples/Monocular-Inertial/TUM_512.yaml {pathToDataset}/dataset-corridor1_512_16/mav0/cam0/data Examples/Monocular-Inertial/TUM_TimeStamps/dataset-corridor1_512.txt Examples/Monocular-Inertial/TUM_IMU/dataset-corridor1_512.txt dataset-corridor1_512_monoi

*Notes :

-To save the generated map, uncomment line 7 (#System.SaveAtlasToFile: "corredor") in the file Examples/Monocular-Inertial/TUM_512.yaml. and press stop button in the viewer window.

-To load map uncomment line 4 (#System.LoadAtlasFromFile: "corredor") in the file Examples/Monocular-Inertial/TUM_512.yaml.
*Precondition : first execute save.