This repository is ROS2 wrapping to use ORB_SLAM3
-
I have tested on below version.
- Ubuntu 22.04
- ROS2 Humble
- OpenCV 4.5.4
-
Build ORB_SLAM3
- Go to this repo and follow build instruction.
-
Install related ROS2 package
sudo apt install ros-$ROS_DISTRO-vision-opencv && sudo apt install ros-$ROS_DISTRO-message-filters
- Clone repository to your ROS workspace
mkdir -p colcon_ws/src
cd ~/colcon_ws/src
git clone https://github.com/Projeto-Voris/ORB_SLAM3_ROS2.git orbslam3_ros2
Now, you are ready to build!
cd ~/colcon_ws
colcon build --symlink-install --packages-select orbslam3_ros2
- If you cannot find
sophus/se3.hpp
:
Go to yourORB_SLAM3_ROOT_DIR
and install sophus library.
cd ~/{ORB_SLAM3_ROOT_DIR}/Thirdparty/Sophus/build
sudo make install
- Please compile with
OpenCV 4.5.4
version.
- Source the workspace
source ~/colcon_ws/install/local_setup.bash
- Run orbslam mode, which you want.
This repository only supportMONO, STEREO, RGBD, STEREO-INERTIAL
mode now.
You can find vocabulary file and config file in here. (e.g.orbslam3_ros2/vocabulary/ORBvoc.txt
,orbslam3_ros2/config/monocular/TUM1.yaml
for monocular SLAM).
MONO
mode
ros2 run orbslam3 mono PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE
STEREO
mode
ros2 run orbslam3 stereo PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE BOOL_RECTIFY
RGBD
mode
ros2 run orbslam3 rgbd PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE
STEREO-INERTIAL
mode
ros2 run orbslam3 stereo-inertial PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE BOOL_RECTIFY [BOOL_EQUALIZE]
This repository is modified from this repository.