Since there isn't an official package manager for C/C++, its always time-consuming and annoying to benchmark and develop various SLAM algorithm. Since the algorithms have various third parties with different version. This repo aims to provide reusable installer scripts for commonly used SLAM third-party libraries and merge them all together into various base Docker containers. Based on this repo, you may customize your environment to quickly run different SLAM algorithms for comparison, maintain a consitent SLAM development environment, or distribute your own SLAM algorithm with the container for rapid spread. Only the run-time environments are provided, the SLAM source codes and datasets are mounted into the container. In this way, you can modify the codes and datasets at any time while keeping the docker image consistent.
A bunch of popular SLAM algorithms are well tested and listed as follows:
CI Status | Dockerfile | SLAM algorithm (commit link) |
---|---|---|
Dockerfile.orb-slam | ORB_SLAM2, ORB_SLAM3 | |
Dockerfile.r3live | r3live, FAST-LIO(2.0), LIO-Livox | |
Dockerfile.faster-lio | Faster-LIO, DLIO | |
BAD-SLAM | BAD SLAM |
Docker installed. Install Docker Engine
-
Build the Docker image:
./build.sh Dockerfile.image-name
This will build a Docker image named
image-name:latest
. ChangeDockerfile.image-name
to yours. -
Run the Docker image:
./run.sh image-name
This will run Docker image
image-name
as a container. The container will mount the host source directory. TheHOST_SOURCE_DIR
inrun.sh
specifies the directory. -
Enjoy!
-
Create a third_party lib installer script, e.g.,
installers/3rdparties_slam/slam.sh
, (likeorb_slam.sh
) to customize your third_party libs. -
Create a Docker file, e.g.,
Dockerfile.slam
which will run above script. -
Build your container:
./build.sh Dockerfile.slam
which will create a container named
slam
. -
Run the container:
./run.sh slam
-
The SLAM source code directory is mounted into the Docker container. Set
HOST_SOURCE_DIR="slam/source/dir"
inrun.sh
, this will mount your host directoryslam/source/dir
into Docker directory/home/slam/src
. You can mount your datasets by modifingHOST_DATASET_DIR
. -
Some source mirrors such as apt and python mirrors are modified to China mirrors to improve download speed for China mainland users.
-
You can manually pre-download third-party lib source code tarball files into archive dir for offline Docker building.
-
Recommend to develop your SLAM algorithm using VS Code inside the containers, just modify the the attributes of
./devcontainer/devcontainer.json
in VSCode:"build": { "dockerfile": "pathto/Dockerfile.ubuntu18-opengl", },
See more details in Developing inside a Container.
-
Welcome to contribute new installers needed for SLAM development and create new branches to host the State-of-the-Art SLAM algorithm development environments.
Some part of source code are adapted from Baidu Apollo, which is licensed under the Apache-2.0 license.