Skip to content

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM

License

Notifications You must be signed in to change notification settings

thien94/ORB_SLAM3

 
 

Repository files navigation

ORB-SLAM3

This fork incorporates the changes that I find necessary to make it easier and more straightforward to install and run ORB-SLAM3 on Ubuntu 20.04.

1. Install

Dependencies

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update

sudo apt-get install build-essential
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

1.1 Pangolin:

git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build && cd build
cmake ..
make
sudo make install

1.2 OpenCV

Check the OpenCV version on your computer (required at leat 3.0 as stated in the original README.md):

python3 -c "import cv2; print(cv2.__version__)" 

On a freshly installed Ubuntu 20.04.4 LTS with desktop image, OpenCV 4.2.0 is included so we can skip to the next step. If a newer version is required (>= 3.0), follow the instrucions:

For example, the main commands for OpenCV 4.5.1 without CUDA and other bells and whistles:

git clone https://github.com/opencv/opencv
git -C opencv checkout 4.5.1

cd opencv
mkdir build
cd build
cmake ..
make -j4
sudo make install

2. Build

# Clone the repo:
git clone https://github.com/thien94/ORB_SLAM3.git ORB_SLAM3

# Build
cd ORB_SLAM3
chmod +x build.sh
./build.sh

3. Run examples

# Download
cd ~
mkdir -p Datasets/EuRoC
cd Datasets/EuRoC/
wget -c http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/machine_hall/MH_01_easy/MH_01_easy.zip
mkdir MH01
unzip MH_01_easy.zip -d MH01/

# Run in mono-inertial mode
./Examples/Monocular-Inertial/mono_inertial_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular-Inertial/EuRoC.yaml ~/Datasets/EuRoC/MH01 ./Examples/Monocular-Inertial/EuRoC_TimeStamps/MH01.txt dataset-MH01_monoimu

Live with Realsense T265:

  • The param file is located inside the folder with the same name as the example that you want to run (Mono/Mono-inertial/Stereo/Stereo-Inertial). The number of parameters that you need to modify varies accordingly.

  • Run rs-enumerate-devices -c to obtain the intrinsic & extrinsic parameters. A good instruction with pictures can be found here.

  • If necessary, calibrate the T265's IMU intrinsic with Kalibr or imu_utils. The default params seem good enough for testing.

  • Run:

./Examples/Monocular-Inertial/mono_inertial_realsense_t265 Vocabulary/ORBvoc.txt ./Examples/Monocular-Inertial/RealSense_T265.yaml 

Changelog:

13-Aug-2022

Work with Ubuntu 20.04, no additional installation of OpenCV or C++ required:

  • Update CMakeLists.txt to use OpenCV 4.2 mimimum.
  • Update CMakeLists.txt to use C++14 instead of C++11.

About

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 98.0%
  • Other 2.0%