pyORBSLAM2 icon indicating copy to clipboard operation
pyORBSLAM2 copied to clipboard

Import error

Open mertmzk opened this issue 7 years ago • 2 comments

Hi @schroeder-dewitt

Thanks for your effort. I am trying to run your code without docker. I have compiled the orbslam.cpp using the build.sh file. It does not give any error while compiling but when I try to import it in python it gives following errors: with python 2.7:

undefined symbol: _ZTIN5boost6python15instance_holderE

with python 3.5m

Segmentation fault (core dumped)

Has anyone got any solution for that?

Thanks in advance.

mertmzk avatar Jun 27 '17 08:06 mertmzk

Hi Mertmzk,

Thanks a lot for your issue! I have just pushed an update to the Dockerfile which should allow you try the example as follows:

(Note: You require nvidia-docker plugin on host, as Pangolin2 requires OpenGL support) 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)

Let me know if the above recipe works! I have only tested python3, if you need python2.x support, then just let me know, should be easy to adapt.

All the best!

Christian

schroederdewitt avatar Jun 28 '17 11:06 schroederdewitt

Having the exact same issue. Unable to get ORBSLAM2 importing properly outside of the container. I guess this was not intended in the repo anyway, but it would be good if this was also easy to do.

djl11 avatar Aug 14 '18 17:08 djl11