Code Monkey home page Code Monkey logo

pyorbslam2's Introduction

pyORBSLAM2

Ultra-fast Boost.Python interface for ORBSLAM2

Are you using ORBSLAM2 for your latest tracking project? Do you just want to create a quick prototype, or are you weary of writing C++ code? Then this repository is for you! Simply interface ORBSLAM2 from python2.x/3, using your favourite NumPy arrays as necessary. It is as easy as:

import ORBSLAM2 as os2
slam_obj = os2.SLAM()
slam_obj.init("/slamdoom/libs/orbslam2/Vocabulary/ORBvoc.txt",\
              "/slamdoom/libs/orbslam2/Examples/RGB-D/TUM1.yaml")
slam_obj.track(array, array_d, time.time())
del slam_obj

Isn't it cute? :)

You can use this repo as a basis for any other Boost.Python projects as well.

Please contact me at [email protected] any time and I will assist you!

Best, Christian Schroeder de Witt, Torr Vision Group, University of Oxford, 2017

Get started

Use run.sh to run nvidia-docker environment to build build/ORBSLAM2.so, which you should then put on your PYTHONPATH. See test/test.py for an example. Extend orbslam2.cpp to your needs (comes with NumPy/cv::Mat conversion routines, and already includes Boost::Python::NumPy set up for you should you need it)

See below more detailed steps on how to set up the tutorial examples.

Ubuntu

Clone this repository (or even better: fork it!)

git clone [email protected]:torrvision/pyORBSLAM2.git

Install nvidia-docker plugin: see https://github.com/NVIDIA/nvidia-docker Note: You require nvidia-docker plugin on host, as Pangolin2 requires OpenGL support

Now run the nvidia-docker container:

sudo ./run.sh

(It will take a while to compile OpenCV3) (SSH password: source)

Now, inside the container SSH shell, simply do: (ensure build and bin folders are deleted to force CMake to update properly)

/orbslam/src/build.sh

export PYTHONPATH=/orbslam/src/build:$PYTHONPATH

Now you should be able to try the test example inside the container:

python3 /orbslam/src/test/test.py

(press key for GUI windows to open)

The above is for Python3 only, if you require Python2.x support or have any other questions / issues, please contact me:

[email protected]

All the best

Christian

pyorbslam2's People

Contributors

chrispjcc avatar schroederdewitt avatar

Watchers

 avatar  avatar

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.