Skip to content

natalnet-lpr/ros2_orbslam3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 ORB-SLAM 3

ROS2 node for ORB-SLAM 3.

Currently, supports Monocular and RGB-D modes. The node subscribes to /camera/rgb/image_color (monocular) or to /camera/rgb/image_color AND /camera/depth/image (RGB-D) and publishes:

  • Camera pose (/pose_orb1)
  • The map points being tracked (/tracked_mappoints)
  • All map points (/all_mappoints)
  • The anotated tracking image (/tracking_image)
  • The keyframe ref. frames (/kf_markers)
  • Odometry messages (/odom)

The implementation is based on this and this implementations.

Tested on:

  • Ubuntu 24.04 LTS
  • ROS2 Jazzy

Install

  1. Download and compile ORB-SLAM 3.
  2. Install the required ROS2 dependencies:
  • ros-jazzy-image-transport
  • ros-jazzy-cv-bridge
  • ros-jazzy-vision-opencv
  • ros-jazzy-message-filters
  1. Download or clone this repo under your <ROS2_Workspace>/src folder. ( i.e: /home/user/ros2_ws/src)

  2. Set the install path of your ROS2 distro in the CMakeLists.txt file:

    set(ENV{PYTHONPATH} "/opt/ros/<ROS2_site_packages>")

    In my case, the line should be set to:

    set(ENV{PYTHONPATH} "/opt/ros/jazzy/lib/python3.12/site-packages")

  3. Set the root path of your ORB-SLAM3 folder in the CMakeModules/FindORB_SLAM3.cmake file:

    set(ORB_SLAM3_ROOT_DIR "<path_to_your_ORBSLAM3_root_folder>")

    In my case, the line should be set to:

    set(ORB_SLAM3_ROOT_DIR "/home/bruno/Projects/ORB_SLAM3")

  4. Source your ROS2 installation:

    $ source /opt/ros/<ros2_distro>/setup.bash

  5. Build the package:

    $ cd /home/user/ros2_ws

    $ colcon build

Launching

  1. Source your ROS2 workspace:

    $ source /home/user/ros2_ws/install/setup.bash

  2. Launch the node:

    $ ros2 run ros2_orbslam3 mono <path_to_vocabulary> <path_to_settings> (monocular mode)

    or

    $ ros2 run ros2_orbslam3 rgbd <path_to_vocabulary> <path_to_settings> (RGB-D mode)

About

ROS2 node for ORB-SLAM 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published