FangGet / BundleFusion_Ubuntu_Pangolin

a porting for BundleFusion working on ubuntu, with Pangolin as visualizer
Other
122 stars 32 forks source link

core dumped #4

Closed Dynasty-CS closed 3 years ago

Dynasty-CS commented 3 years ago

Hi! I have built this project successfully. When I run it, sometimes it goes well. But it may output segmentation fault after processing about 3 frames. The error message is that: 2020-09-27 22-05-04屏幕截图 How to fix this bug? thanks

FangGet commented 3 years ago

Most of this mLibException problems relate to GPU out of memory, we need at least 2GB GPU memory to run this successfully.

Dynasty-CS commented 3 years ago

However, my TITAN Xp GPU has 12 GB memory.

FangGet commented 3 years ago

Wow, try build without visualization, see if core dumped still encounter, this will remove pangolin plug and get rid of some gpu copy operation

Dynasty-CS commented 3 years ago

If I build without visualization, the code will run. Is this a problem with the pangolin plugin? 2020-09-29 11-35-03屏幕截图

FangGet commented 3 years ago

yeah, I use pangolin gpu pointer to copy mesh from algorithm cache to visualization gui directly, some synchronize problem may happen, I will take some time to fix it. btw, you can call up save mesh function to save temporal mesh result into ply file to see the result.

Dynasty-CS commented 3 years ago

I want to ask how the program saves point cloud data. Thanks.

FangGet commented 3 years ago

call "saveMeshIntoFile" function locate in https://github.com/FangGet/BundleFusion_Ubuntu_Pangolin/blob/d3390f9017ddcdf31c69d65155ef356c4a5b2dd6/include/BundleFusion.h#L58

l525889198 commented 3 years ago

I have the same problem ,my notebook GPU is GTX1050MAX-Q 。 MARK

jhljx commented 3 years ago

Same problem in the docker container! The environment in my docker container is ubuntu16.04+cuda8.0+opencv3.2

jhljx commented 3 years ago

I have fixed this "an illegal memory access was encountered" error by adding some lines in the PangolinOutputWrapper.cu file.

In the function convertMarchCubeToGLArray, I added the following line:

if (dVertexArray != nullptr) {
      dVertexArray[3*x + 0] = make_float3(march_cube[6*x + 0].x, march_cube[6*x +0].y, march_cube[6*x +0].z);
      dVertexArray[3*x + 1] =  make_float3(march_cube[6*x + 2].x, march_cube[6*x +2].y, march_cube[6*x +2].z);
      dVertexArray[3*x + 2] = make_float3(march_cube[6*x +  4].x, march_cube[6*x +4].y, march_cube[6*x +4].z);
}

And in the function launch_convert_kernel, I added the following line:

 convertMarchCubeToGLArray<<<grid, block>>> (march_cube, dVertexArray, dColourArray, dIndicesArray, size);
 cudaDeviceSynchronize();

However, the screen still couldn't show the 3D mesh. So I want to ask if there is something wrong in the PangolinOutputWrapper.cpp file. I'm not familiar with the Pangolin, and I don't know what is the right way to show the 3D mesh through the Pangolin framework.

DormouseLi commented 2 years ago

I have the same problem in RTX3070, CUDA 11.3 . How to fix it ?

ph-code-repo commented 2 years ago

I have the same problem in RTX3070, CUDA 11.3 . How to fix it ?

I was having the same problem, but I found that recompiling my opencv (ensuring at least version 4.3), and enforcing a gcc version 6 meant the CUDA functions compiled properly, and I finally got it working.

sus71 commented 2 years ago

I have the same problem in RTX3070, CUDA 11.3 . How to fix it ?

I was having the same problem, but I found that recompiling my opencv (ensuring at least version 4.3), and enforcing a gcc version 6 meant the CUDA functions compiled properly, and I finally got it working.

Did you change the nvcc flag in CMakeLists? I update it to set(CUDA_NVCC_FLAGS -arch=sm_75;-std=c++11;-lm) because I'm using a 2080Ti but there are some compiling issues