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.0-cp312-cp312-manylinux_2_28_x86_64.whl (40.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl (24.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (40.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl (24.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (40.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl (24.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl (40.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.0-cp39-cp39-manylinux_2_28_aarch64.whl (24.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

orbslam3_python-1.0.0-cp38-cp38-manylinux_2_28_x86_64.whl (40.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

orbslam3_python-1.0.0-cp38-cp38-manylinux_2_28_aarch64.whl (24.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 501fd94cb152dbfc6c4528227a143e1eb7e6855f79059fdba22174f0d4db30e2
MD5 e067785c602a5227c09b544533171e33
BLAKE2b-256 b35a412316da783a5c8779bb06f0b545abbf0bd0a6c9cd96c7c2841c2fb529a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7db2f4970417cb0b30f72a70722d7b7caa1e2b313278ebb0a33bbec3fd6ea9c6
MD5 edb68a8fee934fa69bb8123ab5dbda1a
BLAKE2b-256 d0902fa6b3d83cac89392a36979743b558daf145eaa41f3c623cd13a1476d138

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7fb1ef70efee1137272722a38d84e920cbaf32c580a4f6d1c479956ecceb515b
MD5 340e8202c598d21dd96dc1042193f92e
BLAKE2b-256 27e8073bd882a3dcf8208efeab5386f4c9bdee3c9b6589214c46a52aa4538d4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 955f3b863bf846ce0db78a2ecfe31a97f669cf41d74f9558a59d96c02b5c2cf9
MD5 f63808c4e11255e4bdc0362ecdca26de
BLAKE2b-256 c139ee9f7bd582d9e88f6963ea1790692a22835930375c750df70a62518e72be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14adb1f6a1c0b942edfaab4df21df725d1c34a002fe567dc414fe81ddae3a3a6
MD5 18c52c23a97f01be0a45dc45b54e283d
BLAKE2b-256 75a0c06faa41b534d5f953651aab594a7062b52fcf3bb6a086a332c709b191fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a66a945ef85a4a9f636e01686c3b2a072ef8c0e70b8fe99cd6b09b859a4872f0
MD5 a6db5f43746d2d6747e5695cf5fab208
BLAKE2b-256 81b7369fa93fad11e029019d976e78ee70c4974dd37d545cd8c179f7d507e914

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c48febf3eb94728161393986a25175f74a71393f8120982d89d815a3e2033528
MD5 5a827e0e4c2cd1a818d9a141e2e329ea
BLAKE2b-256 ccae9f2d7dda50d565077a430dc741f80edb46ceabd9a3b78328f489e61deddc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 076f84c22dcfef1d4f86b72431ce623a52899784e41ea57cb9d4459ee3932338
MD5 6b78bfc0bdfebba97142552e8b52e67c
BLAKE2b-256 235499a28a92433f24a71b86d6c8d70c83d92c0f0de5d60c59fc0ec9f28217ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 791877e2d5efd46cd40d4eebe34de09da9fa538a62df8f89461193258239644c
MD5 bb6531929f3863915b909a2a10a33776
BLAKE2b-256 e05e7bcd11ceab34d7995920d06b26d2ca67613af87bed7024202a209f3de76f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbslam3_python-1.0.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a428aeee8841095b4d2d32d717491e16962ea7fba92024d54941621690f7d928
MD5 0f9b9f7209deba7546ca0a427a3caf83
BLAKE2b-256 8d1926e3326fbd9d16a3f7a86234ed54e6ec2f74247535c4fcd841bb850a3420

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