jskinn / orb_slam2-pythonbindings Goto Github PK
View Code? Open in Web Editor NEWA python wrapper for ORB_SLAM2
License: BSD 2-Clause "Simplified" License
A python wrapper for ORB_SLAM2
License: BSD 2-Clause "Simplified" License
Hello,
I am trying to use the bindinsg with Python3.7 and boost 1.71.
Both is found during the building process and no warnings or errors are raised. However, when I import orbslam2, I get the following ImportError:
"ImportError: path/to/venv/lib/python3.7/site-packages/orbslam2.so: undefined symbol: _ZN5pbcvt26matToNDArrayBoostConverter7convertERKN2cv3MatE"
The paths to boost has been adjusted in CMakeLists.txt (Boost 1.71 REQUIRED COMPONENTS python37). Everything else was just adjusted to Python 3.7.
Hopefully, someone has an idea why this occurs. This error is similar to Issue #1, but I have explicitly set the paths correctly and the dependencies are apparently found correctly when building.
Thanks in advance for any help!
Hi @jskinn
Firstly, thanks for publishing your work!
I have compiled it successfully but when I import orbslam2 the python I get errors. My python version is 2.7. I tried to compile it with boost 1.62 and and got this error when try to import orbslam
File "", line 1, in
ImportError: ./orbslam2.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
I changed the boost version to 1.45 and got this error
File "", line 1, in
ImportError: dynamic module does not define init function (initorbslam2)
That would be great if you suggest me a solution for that.
thanks
From my understanding, the list of trajectory points which is revealed by slam.get_trajectory_points() grows indefinitely. This both means that calls to slam.get_trajectory_points() take longer and longer to execute each time, eventually ceasing to meet real-time speeds, and the program would eventually eat up all the ram if left running for long enough. Is there any other way of retrieving just the most recent camera poses, which doesn't suffer from this slowdown?
(ps thanks for sharing these bindings)
@jskinn
When I run make, this error occurs, could you help me out?
Thank you for your excellent work!
Can this package installed under python3 virtual environment? I tried to run the following command in cmake:
cmake .. -DCMAKE_INSTALL_PREFIX=/home/xxx/venv
But ImportError appears:
ImportError: No module named 'orbslam2'
Is there a way to install orbslam2
in Python3? Thank you!
My ORB_SLAM2 compiled folder is named ORB_SLAM2_4.
When I run the following cmake with the -D flags for directories,
cmake -D ORB_SLAM2_DIR=/mnt/c/Users/PC/Desktop/Projects/libs/ORB_SLAM2_4/ \
-D ORB_SLAM2_LIBRARY=/mnt/c/Users/PC/Desktop/Projects/libs/ORB_SLAM2_4/lib/libORB_SLAM2.so \
-D ORB_SLAM2_INCLUDE_DIR=/mnt/c/Users/PC/Desktop/Projects/libs/ORB_SLAM2_4/include/ ..
I get a successful cmake
Build type: Release
-- Using flag -std=c++11.
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
No header defined for python-py36; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:34 (find_package)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- python-py36
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/c/Users/PC/Desktop/Projects/ORB/build
However running make says
make
Scanning dependencies of target orbslam2
[ 25%] Building CXX object CMakeFiles/orbslam2.dir/src/ORBSlamPython.cpp.o
/mnt/c/Users/D/Desktop/Projects/ORB/src/ORBSlamPython.cpp:4:10: fatal error: ORB_SLAM2/KeyFrame.h: No such file or directory
#include <ORB_SLAM2/KeyFrame.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/orbslam2.dir/build.make:62: recipe for target 'CMakeFiles/orbslam2.dir/src/ORBSlamPython.cpp.o' failed
make[2]: *** [CMakeFiles/orbslam2.dir/src/ORBSlamPython.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/orbslam2.dir/all' failed
make[1]: *** [CMakeFiles/orbslam2.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Does this mean that it's not finding "KeyFrame.h" in the ORB_SLAM2_4/include/ ?
Hi,
After applying the patch file when I try to build , an error occured stating that the header file (/home/drive/Desktop/PyOrb/ORB_SLAM2-master/Thirdparty/g2o/g2o/types/../core/openmp_mutex.h:30:26: fatal error: ../../config.h: No such file or directory) is missing. Can you please help me out with this?
Thanks in advance
When building the source code,
cmake ..
cannot find orb slam source folder.
When I manually set ORB_SLAM2_LIBRARY and ORB_SLAM2_INCLUDE_DIR , error occurs in
make
It seems that include folder is not set correctly.
Hi, I've successfully built ORB-SLAM2, but when I try to see if everything works when I try to import orbslam2, the following error occurs:
import orbslam2
Segmentation fault (core dumped)
What could be the cause of this error?
Hi,
I don't understand the 'Modifying ORBSLAM2' part. When I use 'make install', I meet the error 'No rule to make target 'install''. Can you me some hints?
Thanks
To get the 3D map points built by orb-slam, I call the function of slam:
map_pts = slam.get_tracked_mappoints()
print(map_pts)
But the program stuck here and no response.
Hello
ORB-SLAM3 is released in beta.
https://github.com/UZ-SLAMLab/ORB_SLAM3
Do you have plans to create python bindings for that as well?
It use GetTrackedMapPoints and seems only return points from the last key frame. To get all the map points
vector<MapPoint*> vpMPs = mpMap->GetAllMapPoints()
should be used instead.
--------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-3e49d7933f8b> in <module>
----> 1 import orbslam2
ModuleNotFoundError: No module named 'orbslam2'
It seems installation was successful , ORB-SLAM2 working too, but import in python doesn't work. I have python 3.7.3 installed by Anaconda, make install was done with sudo (sudo make install)
If I manually copy orbslam2.so into /home/user/anaconda3/lib/python3.7 it failing to find other libraries:
ImportError: libDBoW2.so: cannot open shared object file: No such file or directory
Ok, I found workaround for anaconda:
Hi,
I was wondering if there are documentations to describe each APIs and their return type? There are some return types that I am not sure what they mean. Would be great if I can get some pointers on which direction to look for.
Thank you!
I get this error when I try to import orbslam2 in python3, any idea why this is happening ?
Thank you for your excellent work!
I have run this with kitti-stereo 00 - 07, but only ape of 01,02 is near that in paper.
I use https://github.com/MichaelGrupp/evo to get the ape.
Here is the compare between my test and paper.
Do I misunderstand something?
I tried to install boost, but i got still this error message when i try 'cmake ..'
Boost version: 1.45.0
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_python-py35
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:33 (find_package)
-- Configuring incomplete, errors occurred!
Please give me the answer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.