perception_lidar_centerpoint.pro 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. QT -= gui
  2. CONFIG += c++17 console
  3. CONFIG -= app_bundle
  4. # The following define makes your compiler emit warnings if you use
  5. # any feature of Qt which as been marked deprecated (the exact warnings
  6. # depend on your compiler). Please consult the documentation of the
  7. # deprecated API in order to know how to port your code away from it.
  8. DEFINES += QT_DEPRECATED_WARNINGS
  9. # You can also make your code fail to compile if you use deprecated APIs.
  10. # In order to do so, uncomment the following line.
  11. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  12. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  13. SOURCES += main.cpp \
  14. centerpoint_trt.cpp \
  15. network/network_trt.cpp \
  16. network/tensorrt_wrapper.cpp \
  17. preprocess/pointcloud_densification.cpp \
  18. preprocess/voxel_generator.cpp
  19. INCLUDEPATH += $$PWD/include
  20. INCLUDEPATH += /opt/ros/melodic/include
  21. DISTFILES += \
  22. network/scatter_kernel.cu \
  23. postprocess/circle_nms_kernel.cu \
  24. postprocess/postprocess_kernel.cu \
  25. preprocess/preprocess_kernel.cu
  26. CUDA_SOURCES += \
  27. network/scatter_kernel.cu \
  28. postprocess/circle_nms_kernel.cu \
  29. postprocess/postprocess_kernel.cu \
  30. preprocess/preprocess_kernel.cu
  31. CUDA_SDK = "/usr/local/cuda/" # cudaSDK路径
  32. CUDA_DIR = "/usr/local/cuda/" # CUDA tookit路径
  33. SYSTEM_NAME = linux # 自己系统环境 'Win32', 'x64', or 'Win64'
  34. SYSTEM_TYPE = 64 #操作系统位数 '32' or '64',
  35. CUDA_ARCH = sm_72 # cuda架构, for example 'compute_10', 'compute_11', 'sm_10'
  36. NVCC_OPTIONS = --use_fast_math --compiler-options "-fPIC"
  37. # include paths
  38. INCLUDEPATH += $$CUDA_DIR/include
  39. #INCLUDEPATH += /usr/local/cuda-10.0/targets/aarch64-linux/include/crt
  40. # library directories
  41. QMAKE_LIBDIR += $$CUDA_DIR/lib/
  42. CUDA_OBJECTS_DIR = ./
  43. # The following library conflicts with something in Cuda
  44. #QMAKE_LFLAGS_RELEASE = /NODEFAULTLIB:msvcrt.lib
  45. #QMAKE_LFLAGS_DEBUG = /NODEFAULTLIB:msvcrtd.lib
  46. # Add the necessary libraries
  47. CUDA_LIBS = cudart cufft
  48. # The following makes sure all path names (which often include spaces) are put between quotation marks
  49. CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
  50. NVCC_LIBS = $$join(CUDA_LIBS,' -l','-l', '')
  51. #LIBS += $$join(CUDA_LIBS,'.so ', '', '.so')
  52. # Configuration of the Cuda compiler
  53. CONFIG(debug, debug|release) {
  54. # Debug mode
  55. cuda_d.input = CUDA_SOURCES
  56. cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  57. cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
  58. cuda_d.dependency_type = TYPE_C
  59. QMAKE_EXTRA_COMPILERS += cuda_d
  60. }
  61. else {
  62. # Release mode
  63. cuda.input = CUDA_SOURCES
  64. cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  65. cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -O3 -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
  66. cuda.dependency_type = TYPE_C
  67. QMAKE_EXTRA_COMPILERS += cuda
  68. }
  69. LIBS += -L/usr/local/cuda-10.2/targets/aarch64-linux/lib
  70. LIBS += -lcudart -lcufft -lyaml-cpp
  71. #LIBS += -L/home/adc/soft/cudnn-10.2-linux-x64-v7.6.5.32/cuda/lib64 -lcudnn
  72. LIBS += -lmyelin -lnvinfer -lnvonnxparser -lnvcaffe_parser
  73. #LIBS += -L/home/nvidia/git/libtorch_gpu-1.6.0-linux-aarch64/lib -ltorch_cuda -ltorch -lc10 -ltorch_cpu
  74. unix:INCLUDEPATH += /usr/include/eigen3
  75. unix:INCLUDEPATH += /usr/include/pcl-1.7
  76. unix:INCLUDEPATH += /usr/include/pcl-1.8
  77. !include(../../../include/common.pri ) {
  78. error( "Couldn't find the common.pri file!" )
  79. }
  80. !include(../../../include/ivprotobuf.pri ) {
  81. error( "Couldn't find the ivprotobuf.pri file!" )
  82. }
  83. LIBS += -lboost_system
  84. unix:LIBS += -lpcl_common\
  85. -lpcl_features\
  86. -lpcl_filters\
  87. -lpcl_io\
  88. -lpcl_io_ply\
  89. -lpcl_kdtree\
  90. -lpcl_keypoints\
  91. -lpcl_octree\
  92. -lpcl_outofcore\
  93. -lpcl_people\
  94. -lpcl_recognition\
  95. -lpcl_registration\
  96. -lpcl_sample_consensus\
  97. -lpcl_search\
  98. -lpcl_segmentation\
  99. -lpcl_surface\
  100. -lpcl_tracking\
  101. -lpcl_visualization