yanyan-li / PlanarSLAM

A RGB-D SLAM system for structural scenes, which makes use of point-line-plane features and the Manhattan World assumption.
381 stars 85 forks source link

compilation: cuda_runtime.h: no sich file #8

Open hewanghw opened 3 years ago

hewanghw commented 3 years ago

QQ图片2021

您好,请问在编译时为什么会出现这种fatal error呢,不是没有用到GPU吗?如果我在CMakeLists中添加了cuda_runtime.h的路径后,编译就会卡住,请问这是什么原因呢?感谢解答。

yanyan-li commented 3 years ago

Hi, yes, the system does not require a GPU. Can you run ORB-SLAM2 on your machine? There seems to be some problems with Pangolin installation?

hewanghw commented 3 years ago

I can run ORB-SLAM2 normally.But when I compile PlanarSLAM, my computer will get stuck.

yanyan-li commented 3 years ago

I can run ORB-SLAM2 normally.But when I compile PlanarSLAM, my computer will get stuck.

ok, then it's wired to see an issue in pangolin. Compared with ORBSLAM2, our system has similar functions in terms of pangolin use. Maybe you can try to comment new added pangolin functions to find the real conflicts between libs?

red0orange commented 2 years ago

Hi, I found the solution to this problem! Line 53 in the “/usr/local/include/pangolin/image/memcpy.h” file calls "return attributes.memoryType == cudaMemoryTypeDevice;". And the member variable "memoryType" has been changed to "type" in CUDA11.0 and above, therefore, modify "attributes" in this file .memoryType" is "attributes.type". Refer to the modification in “https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-3.8.x/include/hip/nvcc_detail/hip_runtime_api.h#L1366”.

rancheng commented 2 years ago

The Pangolin version should be v0.6. If you built the version with PCL and CUDA, please try change all the HAVE_CUDA in pangolin:

cd Pangolin
grep -rl HAVE_CUDA ./ | xargs sed -i s@HAVE_CUDA@HAVE_CUDA_PANGOLIN@g
# output replace result
grep -rnw "./" -e "HAVE_CUDA_PANGOLIN"
vnmsklnk commented 2 years ago

Hey! You can try to use our docker image.