ORB-SLAM3 (Oriented FAST and Rotated BRIEF Simultaneous Localization and Mapping) is a state-of-the-art SLAM system designed for robust and accurate real-time 3D mapping and localization. It supports monocular, stereo, and RGB-D cameras and integrates visual-inertial sensor fusion for increased robustness in challenging environments.
- Multi-Sensor Support: Works with monocular, stereo, RGB-D, and visual-inertial sensors.
- Versatility: Can operate in static and dynamic environments, making it suitable for a wide range of applications.
- Real-Time Performance: Optimized for high-speed processing and efficient mapping.
- Loop Closing and Relocalization: Ensures accurate and drift-free localization over long distances.
- Robotics: Autonomous navigation, obstacle avoidance, and robotic arm manipulation.
- Augmented Reality (AR): Seamless integration of virtual objects into real-world environments.
- Autonomous Vehicles: Localization and mapping for self-driving cars and drones.
- 3D Reconstruction: Creating detailed 3D models of environments for analysis and simulation.
- Developers: Created by the UZ-SLAMLab team.
- Platform: Designed for Linux-based systems and requires dependencies like OpenCV, Pangolin, and Eigen.
- Open Source: Available under the GPLv3 license, allowing for free use and modification.
- Documentation: The official GitHub repository provides detailed instructions and examples.
For more information, visit the ORB-SLAM3 GitHub Repository.
ORB-SLAM3 is a state-of-the-art system for Simultaneous Localization and Mapping (SLAM). This guide is tailored for beginners and includes detailed steps for installing ORB-SLAM3 on Ubuntu.
Before starting, ensure your system is up-to-date.
sudo apt update
sudo apt upgrade
ORB-SLAM3 requires several dependencies. Install them using the following commands:
sudo apt install build-essential cmake git libgtk2.0-dev pkg-config \
libavcodec-dev libavformat-dev libswscale-dev python3 python3-numpy \
libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev \
libjasper-dev libglew-dev libboost-all-dev libssl-dev libeigen3-dev unzip wget
OpenCV is a computer vision library required for ORB-SLAM3.
- Download OpenCV:
cd ~
mkdir Dev && cd Dev
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 4.6.0
- Build OpenCV:
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j$(nproc) # Use all CPU cores for faster compilation
sudo make install
- Verify Installation:
pkg-config --modversion opencv4
Pangolin is required for visualizing SLAM results.
- Download Pangolin:
cd ~/Dev
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
- Build Pangolin:
mkdir build && cd build
cmake .. -D CMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo make install
- Clone the Repository:
cd ~/Dev
git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git
cd ORB_SLAM3
- Update Compiler Flags:
ORB-SLAM3 requires C++14. Modify the CMakeLists.txt
file:
sed -i 's/++11/++14/g' CMakeLists.txt
- Build ORB-SLAM3:
./build.sh
If you encounter errors, try running the build script again.
ORB-SLAM3 requires a vocabulary file for its operation.
- Download Vocabulary:
cd ~/Dev/ORB_SLAM3/Vocabulary
wget https://github.com/raulmur/ORB_SLAM2/raw/master/Vocabulary/ORBvoc.txt.tar.gz
tar -xvzf ORBvoc.txt.tar.gz
rm ORBvoc.txt.tar.gz
You can test ORB-SLAM3 using the EuRoC MAV dataset.
- Create a Directory for Datasets:
cd ~
mkdir -p Datasets/EuRoc && cd Datasets/EuRoc
- Download a Sample Dataset:
wget -c http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/machine_hall/MH_01_easy/MH_01_easy.zip
unzip MH_01_easy.zip -d MH01
Now you’re ready to run ORB-SLAM3.
- Navigate to the ORB-SLAM3 Folder:
cd ~/Dev/ORB_SLAM3
- Run the Monocular Example:
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml ~/Datasets/EuRoc/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt
-
Error: Missing Dependencies
- Double-check you’ve installed all required libraries in Step 2.
-
Error: OpenCV Not Found
- Ensure OpenCV is installed correctly and added to the system’s library path.
-
Build Errors
- Run the build script (
./build.sh
) multiple times, as this sometimes resolves errors.
- Run the build script (
This guide should help even beginners install ORB-SLAM3 on Ubuntu. If you encounter issues, feel free to ask for help in the ORB-SLAM3 GitHub issues section or relevant forums.