Skip to content

WeihengXia0123/RGBD-SLAM-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RGBD-SLAM-tutorial

Reference:

How to run the code:

  • Preparation: download openCV 3.4+ and PCL, Eigen3, Ceres, g2o, and other necessary libraries
  • Step 1: download the dataset from TUM website above, then put it into [$repo_folder]/data/rgb_png and [$repo_folder]/data/depth_png, along with the data/rgb.txt, and data/depth.txt for dataset index. (The code about how to extract images and depths data are written in slamBase.h, you can change the path there)
  • Step 2: build and compile the code
mkdir build
cd build
cmake ..
make
  • Step3: run the code in /bin folder: ./bin/visualOdometry

Code structure

/src has the main source files.

  • slamBase.cpp has most self-defined functions to compute keyPoints and Descriptors, estimate Motion, join point clouds and so on.
  • visualOdometry.cpp implemented the VO.
  • slamEnd.cpp integrated the G2O library for optimization.
  • slam.cpp improved based on slamEnd and vo, by adding keyFrames extraction and check_loop_closure. It is the complete version based on the above steps, yet still has some bugs.

Bugs for future improvement

  • core dump at some frames
  • some wierd DTL algorithm bugs:
DLT algorithm needs at least 6 points for pose estimation from 3D-2D point correspondences. 
(expected: 'count >= 6'), 
where'count' is 5
  • too many consecutive not enough inliers, maybe the distance between the frames are too far.
solving PnP
inliers: 0
inliers not enough, abandoning this frame

Example of results

(core dump, to be continued...)

About

Implemented a RGBD vSLAM in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published