/soft_vo_ros

ROS C++ OpenCV implementation of SOFT

Primary LanguageC++MIT LicenseMIT

Stereo Visual Odometry

example workflow

This repository is C++ OpenCV implementation of Stereo Visual Odometry, using OpenCV calcOpticalFlowPyrLK for feature tracking.

Reference Paper: https://lamor.fer.hr/images/50020776/Cvisic2017.pdf

Demo video: https://www.youtube.com/watch?v=Z3S5J_BHQVw&t=17s

alt text

alt text

Requirements

OpenCV 4
If you are not using CUDA:

sudo apt update
sudo apt install libopencv-dev 

If you use CUDA, compile and install CUDA enabled OpenCV.

Dataset

Tested on KITTI odometry dataset.

Compile & Run

cd <your_ws>/src
git clone https://github.com/MrOCW/soft_vo_ros
cd ..
catkin_make

Run VO Node

rosrun soft_vo_ros vo_node

Image with feature tracking is published on /feature_image topic
Currently, ROS version does not perform as well as standalone version for some reason

GPU CUDA acceleration

To enable GPU acceleration

  1. Make sure you have CUDA compatible GPU.
  2. Install CUDA, compile and install CUDA supported OpenCV
  3. When compiling, use
catkin_make -DUSE_CUDA=ON
  1. Compile & Run

Reference code

  1. Monocular visual odometry algorithm

  2. Matlab implementation of SOFT

  3. C++ implementation of SOFT