Giter Site home page Giter Site logo

uoip / stereo_ptam Goto Github PK

View Code? Open in Web Editor NEW
471.0 8.0 137.0 1016 KB

Python implementation of SLAM algorithm Stereo-PTAM

License: GNU General Public License v3.0

Python 100.00%
ptam stereo sptam slam bundle-adjustment loop-closure point-clouds python

stereo_ptam's Introduction

stereo_ptam

This python project is a complete implementation of Stereo PTAM, based on C++ project lrse/sptam and paper "S-PTAM: Stereo Parallel Tracking and Mapping Taihu Pire et al. RAS17", with some modifications.

S-PTAM is a Stereo SLAM system able to compute the camera trajectory in real-time. It heavily exploits the parallel nature of the SLAM problem, separating the time-constrained pose estimation from less pressing matters such as map building and refinement tasks. On the other hand, the stereo setting allows to reconstruct a metric 3D map for each frame of stereo images, improving the accuracy of the mapping process with respect to monocular SLAM and avoiding the well-known bootstrapping problem. Also, the real scale of the environment is an essential feature for robots which have to interact with their surrounding workspace.

S-PTAM system overview (from S-PTAM paper page 11):

As stated in the S-PTAM paper (page 39), S-PTAM's results on KITTI dataset is comparable to stereo version of ORB-SLAM2, and better than stereo LSD-SLAM. It's very inspiring, I'm trying to reproduce the results.

Features

(of this implementation)

  • Multithreads Tracking, Mapping, and Loop Closing;
  • Covisibility Graph (representing the relation between keyframes, mappoints and measurements);
  • Local Bundle Adjustment and Pose Graph Optimization;
  • Motion Model (used for pose prediction, then for reliable feature matching);
  • Point Clouds and Graph visualization;
  • Data loader for datasets KITTI Odometry and EuRoC MAV;
  • Reasonable speed: ~50ms per frame on EuRoC, and ~70ms per frame on KITTI.

Requirements

  • Python 3.6+
  • numpy
  • cv2
  • g2o (python binding of C++ library g2o) for optimization
  • pangolin (python binding of C++ library Pangolin) for visualization

Usage

python sptam.py --dataset kitti --path path/to/your/KITTI_odometry_dataset/sequences/00
or
python sptam.py --dataset euroc --path path/to/your/EuRoC_MAV_dataset/MH_01_easy

Results

Visual results (screenshots from my experiment) on KITTI odometry sequence 00:

  • graph:
    As shown below, all loops have been closed (loop points are marked in black).
  • point cloud:

TODO:

Exhaustive evaluation on datasets. (There seems to be a python package MichaelGrupp/evo for odometry/SLAM algorithm evaluation)

License

This python reimplementation is largely based on sptam, so it's licensed under GPLv3 License.

Contact

If you have problems related to the base S-PTAM algorithm, you can contact original authors lrse ([email protected]), or refer to the related papers:
[1] Taihú Pire,Thomas Fischer, Gastón Castro, Pablo De Cristóforis, Javier Civera and Julio Jacobo Berlles. S-PTAM: Stereo Parallel Tracking and Mapping Robotics and Autonomous Systems, 2017.

[2] Taihú Pire, Thomas Fischer, Javier Civera, Pablo De Cristóforis and Julio Jacobo Berlles.
Stereo Parallel Tracking and Mapping for Robot Localization
Proc. of The International Conference on Intelligent Robots and Systems (IROS), Hamburg, Germany, 2015.

If you have interest in the python implementation here, just email me (Hang Qi, [email protected]);

stereo_ptam's People

Contributors

uoip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stereo_ptam's Issues

Increase mappoint density

Hi, great repo!
We're using it for our SLAM project using Blender (see ZAGsi/BlenderSLAM). Our main goal is not tracking but mapping. Is there any way to increase the density of map points? Or, if not, do you have any suggestions how to increase? I couldn't find where to tweak that.

can't pickle cv2.GFTTDetector objects

I am getting these errors with every type of descriptor option available in the implementation. I have not worked before with multi-threading so I am not sure how to handle such an issue. The issue only shows up if visualization is TRUE. If I turn off visualization, the whole sequence is processed normally without any error.

P.S I am using Python on windows. All the builds were successful thanks to a user who wrote a guideline in the issue section about using this implementation on windows.

Thanks

Loop closing doesn't work

I try to reproduce your result like README.
But, there is no detection of loop through sequence 00.
How did you work?

This is the last output.
num frames 4541
num keyframes 1331
average time 0.143037252714
mapping stopped
loop closing stopped

Thanks,

output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.