JHMeusener / pyOrbSlam3

python Bindings for OrbSlam3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo provides Python Bindings to OrbSlam (OrbSlam3).

OrbSlam3 is a simultaneous mapping and localization (SLAM) algorithm based on oriented fast rotated brief (ORB) descriptors.

it is based on https://github.com/UZ-SLAMLab/ORB_SLAM3 (module OrbSlam3), https://github.com/pybind/pybind11 (module pybind11), https://github.com/edmBernard/pybind11_opencv_numpy (module pybind11_opencv_numpy and setup.py), Code from these have their own licences

changes to make to Orbslam3: copy the folder "/modules/changesInOrbSlam3" into OrbSlam3

Compile the OrbSlam3 module according to the OrbSlam3 instructions

install sophos from the orbslam3 thirdparty modules (in the build folder: sudo make install)

in the main directory install PyOrbSlam3 by entering "pip install ."

Usage in Python: see example

Each row of the extracted Mappoints consists of 3-XYZ-Coordinates, 3-Normal-Vector, 1-NrOfObservations, 1-FoundRatio and *-Orb-Descriptor of the Mappoint

Currently only the monocular camera should work.

This repository contains a docker container to easily build everything. Communication with the Host is possible via redis

The Dockerfile and install-scripts are based on https://github.com/suchetanrs/ORB-SLAM3-ROS2-Docker

1. Clone this repository

  1. git clone https://github.com/JHMeusener/pyOrbSlam3
  2. cd pyOrbslam
  3. git submodule update --init --recursive --remote```

2. Install Docker on your system

cd pyOrbslam
sudo chmod +x docker_install.sh
./docker_install.sh

3. Copy the Folder "Changes in OrbSlam3" from the modules folder into the OrbSlam3 folder.

4. Build the image with ORB_SLAM3

  1. Build the image: sudo docker build -t orbpy .
  2. You can see the built images on your machine by running sudo docker images.

5. Running the container

  1. cd pyOrbslam (ignore if you are already in the folder)
  2. sudo docker compose run orbpy

Launching ORB-SLAM3

Launch the container using steps in (4). If you are inside the container, run the following:

  1. python3 /dockerMount/redisConnectOrbSlam.py

From your host-machine you can connect with the Container with the following script:

  1. python3 onHost_imageProvider.py

Important notes

About

python Bindings for OrbSlam3

License:GNU General Public License v3.0


Languages

Language:C++ 87.7%Language:CMake 5.9%Language:Python 5.0%Language:Dockerfile 1.4%Language:Shell 0.1%