Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError for VO and Full SLAM Module #22

Open
donkeymouse opened this issue Jul 20, 2022 · 7 comments
Open

ImportError for VO and Full SLAM Module #22

donkeymouse opened this issue Jul 20, 2022 · 7 comments

Comments

@donkeymouse
Copy link

donkeymouse commented Jul 20, 2022

Hello guys!
First of all, Thank you for such a wonderful work! As a fellow academic who researches in optical flow, this is a great asset to the community!

I have been trying to execute the VO and the Full-SLAM module following your guidelines you suggested.
I have installed all dependencies you mentioned (libopencv-dev, DBoW3, Ceres2 (all tests passed!), PyOpenGL) and think I managed to create the 'vo.so' and 'slam_full.so' files (with bunch of warnings displayed in the terminal window?).

I tried to run the VO demo first then execute the Full Slam demo, however, from both approaches I receive the following import errors.

"VO"

"ImportError: /home/hri/PycharmProjects/VOLDOR/VOLDOR/demo/pyvoldor_vo.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2cv6String10deallocateEv"

"Full SLAM"

"ImportError: /home/hri/PycharmProjects/VOLDOR/VOLDOR/demo/pyvoldor_full.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cusolverDnSetStream"

I am not sure of how to handle the following errors?

The environment I am currently working with is:

  • Ubuntu 18.04
  • OpenCv 3.2.0
  • CUDA 11.3
    Any further information you need, I will be happy to provide

Again, thanks for your support

@htkseason
Copy link
Owner

Thanks for your kind words. The problem with your VO compling seems related to opencv. Did you install it from apt? Can you try using opencv 3.4.X follow the README?

@donkeymouse
Copy link
Author

Hello Min! Thanks for your reply.

By following your instructions, I reinstalled OpenCV from source and was able to run the VO part.
(It seemed like I needed to reinstall my OpenCV after my recent upgrade of my GPU)

However, I am still unable to run the full-SLAM architecture. I am able to execute the setuplinux_full.py as you have instructed and can generate the .so and linux-gpu kernel files.

I still suffer from the following error: "ImportError: /home/hri/PycharmProjects/VOLDOR/VOLDOR/demo/pyvoldor_full.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cusolverDnSetStream"

From looking at other issue posts, it seemed like there were frequent sources of errors due to incorrect installation of Ceres2 with SuiteSparse so I reinstalled the entire library again and was able to pass all the tests ( and have executed sudo make install)

ceres_test_passed

I followed the instruction and install SuiteSparse through "sudo apt-get install libsuitesparse-dev"

After all this, I was stilll unable to execute the full_slam pipeline.

Do you have any idea on how to solve this?

Many Thanks

donkeymouse

@htkseason
Copy link
Owner

Can you run VO-only now?

@donkeymouse
Copy link
Author

Hello Min. Yes, I can run VO-only now. However, I am still not able to run the Full-SLAM module part...

@htkseason
Copy link
Owner

htkseason commented Jul 25, 2022

Your current issue seems similar to this guy.
#17 (comment)
Could you please try add -l cusolver -l cublas to slam_py/install/setup_linux_full.py line 16.
If it does not work, maybe add cusolver, cusolver to the list in line 29.

It is strange since what is additionally needed in full-slam pipeline is only ceres, but this error points to cuda. Have you installed cuda toolkit?

@donkeymouse
Copy link
Author

Hello Min, Thank you for your reply.

I have attempted both of your suggested methods (adding -l cusolver to line 16 and adding it to the list in 29) but the problem persists.

I have tried the following line for the first approach:

gpu_kernel_build_cmd = f'/usr/local/cuda/bin/nvcc --compiler-options "-shared -fPIC" {gpu_sources_cpp} {gpu_sources_cu} -l cusolver -l cublas -lib -o libgpu-kernels.so -O3 {nvcc_machine_code}'

I have cuda toolkit 11.4 installed into my machine.

Here is my output from running " nvcc -V"

image

Happy to provide more info if you need one.

Thanks alot

donkeymouse

@bytezh
Copy link

bytezh commented Oct 21, 2022

Hello Min, Thank you for your reply.

I have attempted both of your suggested methods (adding -l cusolver to line 16 and adding it to the list in 29) but the problem persists.

I have tried the following line for the first approach:

gpu_kernel_build_cmd = f'/usr/local/cuda/bin/nvcc --compiler-options "-shared -fPIC" {gpu_sources_cpp} {gpu_sources_cu} -l cusolver -l cublas -lib -o libgpu-kernels.so -O3 {nvcc_machine_code}'

I have cuda toolkit 11.4 installed into my machine.

Here is my output from running " nvcc -V"

image

Happy to provide more info if you need one.

Thanks alot

donkeymouse

Hello, I got the same error with you.

I found that the current ceres official website is ceres 2.1. I downloaded ceres 2.0 on github and solved this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants