This repository is ROS2 wrapping to use ORB_SLAM3 and to publish ORB_SLAM3 Odometry on ROS2 topic.
I have tested on below version:
- Ubuntu 20.04
- ROS2 Foxy
- Opencv 4.5.0
- Install related ROS2 package
$ sudo apt install ros-$ROS_DISTRO-vision-opencv && sudo apt install ros-$ROS_DISTRO-message-filters
- Clone this repository
git clone https://github.com/Il-castor/orbslam3-odometry.git
Build
colcon build --symlink-install
If you cannot find sophus/se3.hpp
:
Go to your ORB_SLAM3_ROOT_DIR
and install sophus library.
$ cd ~/{ORB_SLAM3_ROOT_DIR}/Thirdparty/Sophus/build
$ sudo make install
- Source the workspace
$ source install/local_setup.bash
-
Modify parameters in
config/orbslam3_odometry.yaml
according to your system settings. Follow these instructions. -
Launch
$ ros2 launch orbslam3_odometry orbslam3-odometry_launch.py
To stop the node press ctrl-c
and this save ORB_SLAM3 statistics txt in your folder.