soumya997 6a22335cf9 3rd blog RBS: ROS2 and Carla Setup Guide for Ubuntu 22.04 8 kuukautta sitten
..
__pycache__ 05496ef363 added monocular slam blog code 8 kuukautta sitten
folder2 05496ef363 added monocular slam blog code 8 kuukautta sitten
notebooks 05496ef363 added monocular slam blog code 8 kuukautta sitten
videos 05496ef363 added monocular slam blog code 8 kuukautta sitten
README.md 05496ef363 added monocular slam blog code 8 kuukautta sitten
display.py 6a22335cf9 3rd blog RBS: ROS2 and Carla Setup Guide for Ubuntu 22.04 8 kuukautta sitten
extractor.py 05496ef363 added monocular slam blog code 8 kuukautta sitten
main.py 05496ef363 added monocular slam blog code 8 kuukautta sitten
pointmap.py 05496ef363 added monocular slam blog code 8 kuukautta sitten
utils.py 05496ef363 added monocular slam blog code 8 kuukautta sitten

README.md

Implementation of Monocular Visual SLAM in Python:

Setup pangolin for python:

Install pangolin python:

The original library is written in c++, but there is python binding available.

  • Install dependency: For Ubuntu/Debian execute the below commands to install library dependencies,
sudo apt-get install libglew-dev
sudo apt-get install cmake
sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
sudo apt-get install libdc1394-22-dev libraw1394-dev
sudo apt-get install libjpeg-dev libpng-dev libtiff5-dev libopenexr-dev
  • Don't need to follow the Very Optional Dependencies from the repository.

  • Install the Library: Execute the below commands to install pangolin,

    git clone https://github.com/uoip/pangolin.git
    cd pangolin
    mkdir build
    cd build
    cmake ..
    make -j8
    cd ..
    python setup.py install
    

In the make -j8 you might get some error, just follow the comment mentioned in this github issue. Running the python setup.py install might throw an silly error, use this comment from the exact issue to solve this.

  • Other dependencies are pip installable.

How to run?

python main.py

Code structure:

├── display.py
├── extractor.py
├── pointmap.py
├── main.py
├── notebooks
│   ├── bundle_adjustment.ipynb
│   ├── mapping.ipynb
│   └── SLAM_pipeline_step_by_step.ipynb

In the notebook section we have shown how to run all the components of a monocular slam,

  • SLAM_pipeline_step_by_step.ipynb Describes the entire pipeline
  • mapping.ipynb is another resource for mapping source
  • bundle_adjustment.ipynb another great resource to understand g2o and bundle adjustment. source

1st notebook uses the kitti dataset (grayscale, 22 GB), download it from here.