Your system has an NVIDIA GPU with compute capability 7.5, but darknet_ros is currently built without GPU support because CUDA toolkit is not installed.
You have CUDA driver version 13.0 installed. You need to install the CUDA toolkit that matches your driver.
Option A: Install CUDA Toolkit via apt (Recommended)
sudo apt update
sudo apt install nvidia-cuda-toolkitOption B: Install CUDA Toolkit from NVIDIA (for latest version)
- Visit: https://developer.nvidia.com/cuda-downloads
- Select your Linux distribution
- Follow the installation instructions
Verify CUDA Installation:
nvcc --versionAfter installing CUDA, rebuild the package:
cd /home/huojiaxi/3D_detector/3D_bounding_box_gb_visual_detection
rm -rf build install log
colcon build --packages-select darknet_rosDuring the build, you should see messages like:
-- CUDA Version: X.X
-- CUDA Libraries: ...
-- Building with GPU support
To verify GPU is being used:
# Monitor GPU usage
watch -n 1 nvidia-smi
# In another terminal, run darknet_ros
ros2 launch darknet_ros darknet_ros.launch.pyYou should see GPU memory usage and compute activity in nvidia-smi.
The CMakeLists.txt has been updated to support multiple GPU architectures:
- compute_75 (sm_75): RTX 20xx series, GTX 16xx series (your GPU)
- compute_86 (sm_86): RTX 30xx series
- compute_87 (sm_87): RTX 40xx series
This ensures compatibility with various NVIDIA GPUs.
If CUDA is still not found after installation:
- Check CUDA installation path:
ls /usr/local/cuda/ - Set CUDA_PATH environment variable if needed:
export CUDA_PATH=/usr/local/cuda - Verify CUDA libraries are accessible:
ldconfig -p | grep cuda
With GPU support enabled, you should see:
- 10-50x faster inference depending on your GPU
- Lower CPU usage
- Ability to process higher resolution images in real-time