NVIDIA-ISAAC-ROS / isaac_ros_nitros

NVIDIA Isaac Transport for ROS package for hardware-acceleration friendly movement of messages
Other
102 stars 23 forks source link

link_libraries `nvToolsExt` is not works #18

Closed Vulcan-YJX closed 1 year ago

Vulcan-YJX commented 1 year ago

when I use cuvslam with hawk , can't find nvToolsExt.h or cannot find -lnvToolsExt.

If found link_libraries in CMakeLists.txt is not works. change if(USE_NVTX) add_definitions(-DUSE_NVTX) link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64") link_libraries("nvToolsExt") endif()

to

if(USE_NVTX) add_definitions(-DUSE_NVTX) link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64") include_directories("/usr/local/cuda-11.4/targets/aarch64-linux/include") include_directories("/usr/local/cuda-11.4/targets/aarch64-linux/include/nvtx3") link_directories("/usr/local/cuda-11.4/targets/aarch64-linux/lib/") endif()

Solved this problem. But this code style is ugly. I also try to add include_dir to $PATH , It's not works. Why did this problem arise?

Thanks.

hemalshahNV commented 1 year ago

The latest version of Isaac ROS is DP3 but within the Isaac ROS Dev container, we're not able to reproduce. The Isaac ROS Dev container adds /usr/local/cuda-11.4/targets/aarch64-linux/lib to your LD_LIBRARY_PATH which allow you to avoid the extra link_directories you needed to add. For the extra include_directories, it is not clear yet why you need them. It could be that with the LD_LIBRARY_PATHs set as in the container (see here), cmake can extrapolate any "include" directories from matched lib directories.

Vulcan-YJX commented 1 year ago

Thanks.