Problem in compiling PCL libraries by CUDA for Jetson Nano GPU

My system is shown below:
Jetson Nano, Ubuntu 18.04, OpenCV 4.1, and PCL 1.8 (I installed by
“sudo apt install libpcl-dev”). Everything runs OK for the code that I am writing.

I am attempting to write some *.cu code to process part of the point cloud data. I started with the cuda_add example (y[i] = x[i] + y[i]). I was able to follow the example, use cuda_add_executable in my CMakeLists.txt, and run the add function on GPU.

Next, I added a library as a header <pcl/visualization/cloud_viewer.h>. I did not even invoke the cloud viewer function in my code. However, I encountered some errors as follows.

In file included from /usr/include/vtk-6.3/vtkRenderingLODModule.h:37:0,
from /usr/include/vtk-6.3/vtkLODActor.h:55,
from /usr/include/pcl-1.8/pcl/visualization/common/actor_map.h:45,
from /usr/include/pcl-1.8/pcl/visualization/pcl_visualizer.h:48,
from /usr/include/pcl-1.8/pcl/visualization/cloud_viewer.h:39,
from /home/XXX_XXX/Documents/GPUtest/
/usr/include/vtk-6.3/vtkRenderingCoreModule.h:45:0: error: unterminated argument list invoking macro “VTK_AUTOINIT1”

Can anyone help me to resolve this issue? Or, alternatively, I would like to know if I can run PCL functions on the Jetson Nano GPU.


Have you tried this sample on a desktop environment first?
It’s recommended to give it a try so that you can figure out the error is cased from Jetson or your source.