koide3 / hdl_graph_slam

3D LIDAR-based Graph SLAM
BSD 2-Clause "Simplified" License
1.94k stars 723 forks source link

How can I use GPU? #204

Closed omerkonan closed 3 years ago

omerkonan commented 3 years ago

Hello, I saw #ifdef USE_VGICP_CUDA lines for using FAST_GICP method with cuda. Can you explain how can I define USE_VGICP_CUDA?

Thanks

koide3 commented 3 years ago

GPU-based features can be turned on by passing -DBUILD_VGICP_CUDA=ON to catkin_make:

catkin_make -DCMAKE_BUILD_TYPE=Release -DBUILD_VGICP_CUDA=ON

Note: You may need to run cakin_make twice due to some cmake configuration issues

omerkonan commented 3 years ago

Hello, Thank you for quick answer. I have tried twice but still got the same error like that:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: CUDA_cublas_device_LIBRARY (ADVANCED) linked by target "fast_vgicp_cuda" in directory

Do you have any solution?

koide3 commented 3 years ago

Maybe cmake failed to find cublas libracy. Can you check if CUDA-related libraries are properly installed?