Unable to link CUDA libraries with dw_ros

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.7.1.8928
other

Host Machine Version
native Ubuntu 18.04
other

Hello,
We have been trying to integrate the sample Object Detection with dw_ros framework. The sample_object_detector_tracker sample works fine when run from the /usr/local/driveworks-3.5/samples/bin folder and CUDA libraries are linked to the executable

The problem arises when we try to cross-compile a custom executable using dw_ros tutorial. In the attached CMakeLists.txt, we try to find the cuda-libs package. In the cuda-libs config file, cudart library cant be found even though the path for cudart library is given in HINTS. This the error we get when building the custom executable.

-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /usr/local/driveworks-3.5/samples/3rdparty/shared/cuda-libs/cuda-libs-config.cmake:15 (message):
  Could not find cudart library.  Looked in
  /../lib;/../lib/stubs;/../lib64;/../lib64/stubs
Call Stack (most recent call first):
  CMakeLists.txt:23 (find_package)


CMake Error at CMakeLists.txt:23 (find_package):
  Found package configuration file:

    /usr/local/driveworks-3.5/samples/3rdparty/shared/cuda-libs/cuda-libs-config.cmake

  but it set cuda-libs_FOUND to FALSE so package "cuda-libs" is considered to
  be NOT FOUND.


-- Configuring incomplete, errors occurred!
See also "/home/agx-pegasus/ros_radar_driver_agx/build_isolated/nv_camera_multiple_new/CMakeFiles/CMakeOutput.log".
See also "/home/agx-pegasus/ros_radar_driver_agx/build_isolated/nv_camera_multiple_new/CMakeFiles/CMakeError.log".
Makefile:820: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
<== Failed to process package 'nv_camera_multiple_new': 
  Command '['/home/agx-pegasus/ros_radar_driver_agx/install_isolated/env.sh', 'make', 'cmake_check_build_system']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/agx-pegasus/ros_radar_driver_agx/build_isolated/nv_camera_multiple_new && /home/agx-pegasus/ros_radar_driver_agx/install_isolated/env.sh make cmake_check_build_system

Command failed, exiting.

The cuda-libs-config.cmake file is attached for reference. We get Unable to find cudart library linkage error. The issue is similar with cublas and other CUDA related libraries.

cuda-libs-config.cmake (1.0 KB)

CMakeLists.txt (1.8 KB)

Hi

Are you in NVIDIA DRIVE™ Developer Program for DRIVE AGX?
If yes, please help to change your DevZone account to use corporate or university email address by following below links.

My Profile | NVIDIA Developer → “Edit Profile” → “Change email” → “CHANGE”

The option to change email address was not available. I also tried to do in few ways but could not. And the email that is linked to NVIDIA account is not a corporate or university account so I can’t be a part of NVIDIA DRIVE developer program for DRIVE AGX. Would really like some help on the issue I am facing.

I can see your new post - Unable to link CUDA libraries with dw_ros - DRIVE AGX / DRIVE AGX General - NVIDIA Developer Forums

We can start from there. Thanks