Skip to content

AvinashRamashray/ros2-ORB_SLAM2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ros2-ORB_SLAM2

ROS2 node wrapping the ORB_SLAM2 library

If you want to integrate ORB_SLAM2 inside your ROS2 system, consider trying this fork of ORB_SLAM2 library which drops Pangolin dependency and streams all SLAM data through ROS2 topics.

Requirements

Note: The vision_opencv package requires OpenCV3. Make sure to build ORB_SLAM2 with the same OpenCV version otherwise strange run errors could appear.

The message_filters package is not required if you want to use only the Monocular SLAM node.

This repository contains a Dockerfile providing an Ubuntu environment with all the dependences already installed. In order to use it

$ cd docker_
$ bash build.sh
$ bash run.sh

Note The CMakeLists.txt file contains hardcoded the path to the ORB_SLAM2 source directory. This is used to retrieve header files and shared libraries since these are not installed by ORB_SLAM2.

If you are not using the Dockerfile, change the following line with the actual ORB_SLAM2 path.

set(ORB_SLAM2_DIR /root/ORB_SLAM2)

Usage

Run the monocular SLAM node

$ ros2 run orbslam mono PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE

This node subscribes to the ROS2 topic camera and waits for Image messages.

For example you can stream frames from your laptop webcam using:

$ ros2 run image_tools cam2image -t camera
RGBD Node

You can run the rgbd node by using

$ ros2 run orbslam rgbd PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE
Stereo Node

You can run the stereo node by using

$ ros2 run orbslam stereo PATH_TO_VOCABULARY PATH_TO_YAML_CONFIG_FILE BOOL_RECTIFY

About

ROS2 node wrapping the ORB_SLAM2 library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 50.9%
  • CMake 26.8%
  • Dockerfile 16.4%
  • Shell 5.9%