Skip to content

ORB-SLAM3

GitHub code build GitHub last commit

DockerHub image Docker image arch Docker image version Docker image size

🐳 Start Container

Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.

Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X or ssh -Y).

cd ~/ros2-essentials/orbslam3_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.

If your user's UID is 1000, you may replace the docker compose build command with docker compose pull.

The commands in the following sections assume that you are inside the Docker container:

# in a new terminal
docker exec -it ros2-orbslam3-ws bash

If the initial build somehow failed, run:

rm -r build install
colcon build --symlink-install

Once you have finished testing, you can stop and remove the container with:

docker compose down

Simple Test With Dataset

  • Attach to the container
    docker attach ros2-orbslam3-ws
    cd /home/ros2-essentials/orbslam3_ws
    
  • Prepare data, only need to be done once
    • Download dataset (~1.2G)
      wget -P . http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/vicon_room1/V1_02_medium/V1_02_medium.bag
      
    • ROS1 bag and ROS2 bag conversion reference
      sudo pip3 install rosbags
      rosbags-convert ./V1_02_medium.bag
      
  • Play the bag file in tmux
    ros2 bag play V1_02_medium/V1_02_medium.db3 --remap /cam0/image_raw:=/camera
    
  • Run the ORB-SLAM3 in a new tmux window
    source ~/test_ws/install/local_setup.bash
    ros2 run orbslam3 mono ~/ORB_SLAM3/Vocabulary/ORBvoc.txt ~/ORB_SLAM3/Examples_old/Monocular/EuRoC.yaml false
    
    2 windows will pop up, showing the results.

Reference repo or issues