This repository is my initial attempt of writing Stereo Visual Odometry on the KITTI dataset in C++. It uses Rerun to log visual odometry trajectories as well relevant data for the visual odometry such as images/disparity maps. Once processed on the dataset, thanks to the Rerun tool, the trajectories can be replayed back as long as the Rerun window remains open.
Further updates to come!
To run repository, we require the following:
- KITTI Dataset
- Rerun
- OpenCV
- Eigen
This repository uses the CMake build tool. To build the project run the following:
# Get project
git clone https://github.com/ThanhL/stereo-visual-odometry.git
cd stereo-visual-odometry
# Configure and build
mkdir build
cd build
cmake ..
make
To run the visual odometry on the KITTI dataset, run the following:
./main_kitti <main_KITTI_dataset_folder> <KITTI_dataset_number>
where,
- main_KITTI_dataset_folder: This is the location of the main KITTI dataset folder. In this folder it should contain the following KITTI dataset subfolders (as shown below).
-- main_KITTI_dataset_folder -- data_odometry_calib -- data_odometry_gray -- data_odometry_poses - KITTI_dataset_number: This is the KITTI dataset number to run the stereo visual odometry code on. For example 00 or 01.
Here is an example of running the stereo visual odometry code on a KITTI dataset:
./main_kitti ../dataset/kitti/ 00
This will pop up a rerun window, logging the camera feeds and pose from the visual odometry (as shown in the image below).

[1] KITTI Visual Odometry, FoamoftheSea. https://github.com/FoamoftheSea/KITTI_visual_odometry
[2] Welcome to Basic Knowledge on Visual SLAM: From Theory to Practice, Xiang Gao, Tao Zhang, Qinrui Yan and Yi Liu. https://github.com/gaoxiang12/slambook-en