Skip to main content

Python bindings for the ORB-SLAM3 visual SLAM library

Project description

ORB-SLAM3

Python bindings for the ORB-SLAM3 visual SLAM library.

Installation

pip install orbslam3-python
TODO (Click me)

Changes from Original Version of ORB_SLAM2-PythonBindings

add method for retrieve the intrinsic parameter of camera

    get_camera_matrix //return a numpy array with the camera matrix
    get_dist_coef //return a tuple with the distortion coefficient

add method for retrieve the pose of the frame wrt initial frame

    get_frame_pose //return a numpy array with the pose

add method for retrieve the keypoint in the frame and it's world position

    get_current_points //return a list with a tuple pair ((world position),(2d keypoints))

add python 3.8 Support

ORB_SLAM2-PythonBindings

A python wrapper for ORB_SLAM2, which can be found at https://github.com/raulmur/ORB_SLAM2. This is designed to work with the base version of ORB_SLAM2, with a couple of minimal API changes to access the system output. It has been tested on ubuntu 14.04 and 16.04 and built against Python3, although it does not rely on any python3 features.

Installation

Prerequesities

  • ORBSLAM2 source code
  • ORBSLAM2 compiliation dependencies (Pangolin, Eigen, OpenCV)
  • Boost, specifically its python component (python38)
  • Numpy development headers (to represent images in python, automatically converted to cv::Mat)

Setup

Modifying ORBSLAM2

First, we need an additional API method from ORBSLAM to extract completed trajectories. Apply the patch file "orbslam-changes.diff" to the ORBSLAM2 source, which should create an additional method and add some installation instructions to the end of CMakeLists.txt. Build orbslam as normal, and then run make install. This will install the ORBSLAM2 headers and .so to /usr/local (if an alternative installation directory is desired, specify it to cmake using -DCMAKE_INSTALL_PREFIX=/your/desired/location).

Compilation

Return to the ORBSLAM-Python source, build and install it by running

mkdir build
cd build
cmake ..
make
make install

This will install the .so file to /usr/local/lib/python3.5/dist-packages, such that it should If you have changed the install location of ORBSLAM2, you need to indicate where it is installed using -DORB_SLAM2_DIR=/your/desired/location, which should be the same as the install prefix above (and contain 'include' and 'lib' folders).

Verify your installation by typing

python3
>>> import orbslam2

And there should be no errors.

Examples

ORBSLAM2's examples have been re-implemented in python in the examples folder. Run them with the same parameters as the ORBSLAM examples, i.e.:

python3 orbslam_mono_kitti.py [PATH_TO_ORBSLAM]/Vocabulary/ORBvoc.txt [PATH_TO_ORBSLAM]/Examples/Monocular/KITTI00-02.yaml [PATH_TO_KITTI]/sequences/00/

Alternative Python Versions

At the moment, CMakeLists is hard-coded to use python 3.5. If you wish to use a different version, simply change the boost component used (python-35) to the desired version (say, python-27), on line 38 of CMakeLists.txt. You will also need to change the install location on line 73 of CMakeLists.txt to your desired dist/site packages directory.

License

This code is licensed under the BSD Simplified license, although it requires and links to ORB_SLAM2, which is available under the GPLv3 license

It uses pyboostcvconverter (https://github.com/Algomorph/pyboostcvconverter) by Gregory Kramida under the MIT licence (see pyboostcvconverter-LICENSE).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (40.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_aarch64.whl (24.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (40.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_aarch64.whl (24.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (40.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_aarch64.whl (24.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_x86_64.whl (40.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_aarch64.whl (24.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_x86_64.whl (40.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_aarch64.whl (24.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

File details

Details for the file orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 16bb185db93cb70f7b57738c28acb2d7e37bdf6720bfccc656e1cad474143e26
MD5 d226b921b841d8f20b4b00271ed330f1
BLAKE2b-256 a4d685751e13d579afbaf389c6dbf4dadd427fce8395b0b6f30a2f7ac950827b

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5161603734c4da1241ec47b94fec390e0dcd09b3268c63a0ef2ee0eb2b1a76a8
MD5 d571ef9453b05f354d579028f841ea67
BLAKE2b-256 8bd7feecff4cba0b85dbd936f0490370e3d64aa820d4cb1ee4cf4d4b599ecdcb

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a60b122d2e85d3bba3ed232932f01667101da24ed8ab050325c8609cc9e833f
MD5 a24908e0eb9f22541c6a62391b5e351b
BLAKE2b-256 19235e7f9e35d24db4ca2468d5a89ef2281326f3bf237338e7e6157f4b93fd84

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b93d1000358b5d3d225be08bd15f619d5f8fd6b95179becf1c383102b9ead77e
MD5 b72e85994d207fe17690f7b25e11e511
BLAKE2b-256 ff968c47779467953f3a8c1ca3270e01777935d93966577e4fe74554176e023f

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cce4fbc29cfec90d73c7e6ef6c1d1c95792a49bd2182e2ba4d8479c4d365c53b
MD5 221860c9463e9ba1bdafa2d97b71c066
BLAKE2b-256 9f1d6714c9baf72469f4f6b588e7edc9917a6e49df71cc6cda24a71f04a2e2e6

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1a8c90d53f461cadd6f7654406a61f1d88778574b0f07d689e7a8a7ee290baa2
MD5 7bee312b2abc18d27a721a3de5ec60ae
BLAKE2b-256 d9d82484dcea41d963ec20ff78b9b9aa036593a7da836c5382582890d68a83b6

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee2508742ee401488749d11390f4d6d5fb5a83cbca2055717e2700804e68a381
MD5 703049b4d174cff77d08c23e3a4edb46
BLAKE2b-256 89119d8f5b49f602f65ac1bb9f2f15fe9ce065b76cd7069cd8b718e54576b5b0

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d33a503c7657ed44a4141b3e2669630dffd458055d26c2c3da371a0aacedd085
MD5 df5b67c6a0458093fd7f0ee0c384b4cb
BLAKE2b-256 fac35c63b46648d29054b1cf5f7a3211d3651e79d44f7da77ee503365f6aab5a

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2a4daa81dadc84b5b81f5ec7eaa072ba26d231b89180e99d58a234f21092de0
MD5 6ddb3d6264db2da44eb1a89f9be53935
BLAKE2b-256 51ae663b54c7ce43b5b1ae2c502bc26d4d35ecad6d2639a92d1fa39502841d44

See more details on using hashes here.

File details

Details for the file orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orbslam3_python-1.0.1-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 26efa0ce09f8c46d5a212f60b68f16cee6d9b0d0da9262c156816656dd670d09
MD5 a56c5d03e5ed0229d958a800e6937358
BLAKE2b-256 a4143bd7cb9a3b8a910d16a250f7fc470617ceb0c28f6caaf6ca7db78886f4f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page