From 900ce1ba6d2a80d74d644c4cfaf16451ea3a7b1e Mon Sep 17 00:00:00 2001 From: Viet Anh Nguyen Date: Mon, 1 Mar 2021 18:13:18 +0700 Subject: [PATCH] Fix build errors and add known issues to README --- CMakeLists.txt | 3 +- README.md | 60 ++++++++++++++++++++---- src/common/camera_model/birdview_model.h | 1 + 3 files changed, 55 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4e0f1a..168ca82 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project(CarSmartCam) # Setup for TensorRT -set(GPU_ARCHS 53) ## config your GPU_ARCHS,See [here](https://developer.nvidia.com/cuda-gpus) for finding what maximum compute capability your specific GPU supports. +set(GPU_ARCHS 75) ## config your GPU_ARCHS,See [here](https://developer.nvidia.com/cuda-gpus) for finding what maximum compute capability your specific GPU supports. set(CMAKE_BUILD_TYPE Release) @@ -157,6 +157,7 @@ target_link_libraries(${PROJECT_NAME} lane_detector car_status car_gps + nvonnxparser ) # Copy files diff --git a/README.md b/README.md index 791f7c9..ed2ac48 100755 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ An advanced driver-assistance system on Jetson Nano embedded computer with four **Update 21/12/2020:** I created an image of my SD card [here](https://drive.google.com/file/d/1jg68ySnTt4Zm_hb4JVZKKWXRWkDucqUu/view?usp=sharing). You can flash and run this image on Jetson Nano. -**For TensorRT 7 support:** Currently, only TensorRT 5 and TensorRT 6 are supported. TensorRT 7 has a lot of deprecated APIs and I think there is no way to run this project directly with that version. I don't have time to continue with this project soon, so I really need your contributions to extend this project further. +**For TensorRT 7 support:** Currently, only TensorRT e and 6 are supported. TensorRT 7 has a lot of deprecated APIs and I think there is no way to run this project directly with that version. I don't have time to continue with this project soon, so I really need your contributions to extend this project further. ## I. DEVELOPMENT ENVIRONMENT AND BUILD @@ -20,9 +20,8 @@ An advanced driver-assistance system on Jetson Nano embedded computer with four - Qt 5 - OpenCV >= 4.0.1 - C++ 17 compiler - - CUDA 10.1 -- TensorRT 5.1.5-1+cuda10.1. **This project should work with TensorRT 5 and TensorRT 6. TensorRT 7 is not supported for now.** +- TensorRT 5.1.5-1+cuda10.1, or - TensorRT 6.0.1.8+10.2. **This project should work with TensorRT 5 and TensorRT 6. TensorRT 7 is not supported for now.** ### Setup for Linux - Ubuntu 18.04 @@ -77,21 +76,66 @@ make ``` -#### Known errors +#### Known issues + +**Issue: cublas_v2.h not found** -- `/usr/bin/ld: cannot find -lcudart`: ``` -sudo ln -s /usr/local/cuda/lib64/libcudart.so /usr/lib/libcudart.so +fatal error: cublas_v2.h: No such file or directory + #include + ^~~~~~~~~~~~~ +compilation terminated. ``` -- `/usr/bin/ld: cannot find -lcublas`: +- Step 1: Find lib: `find /usr/local/ -name cublas_v2.h`. +- Step 2: Export to path: `export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/cuda-10.2/targets/x86_64-linux/include/`. +- Step 3: Use CMake and build. + +**Issue: `/usr/bin/ld: cannot find -lcudart`, `/usr/bin/ld: cannot find -lcublas`** + +``` +sudo ln -s /usr/local/cuda/lib64/libcudart.so /usr/lib/libcudart.so +``` ``` sudo ln -s /usr/local/cuda/lib64/libcublas.so /usr/lib/libcublas.so ``` +**Note:** The paths can be different on your computer. + +**Issue: Qt5Multimedia missing** + +``` +Could not find a package configuration file provided by "Qt5Multimedia" + with any of the following names: + + Qt5MultimediaConfig.cmake + qt5multimedia-config.cmake +``` + +How to fix? + +``` +sudo apt-get install qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev +``` + +**Issue: Need to specify CUDA root** + +``` +[cmake] CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA.cmake:682 (message): +[cmake] Specify CUDA_TOOLKIT_ROOT_DIR +``` + +How to fix? + +``` +export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2/ +``` + +You should change the path corresponding to your environment. + ## II. REFERENCES: - In this project, we use code from: + Dark Theme for Qt5 by Juergen Skrotzky: [https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle](https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle). -- ICSim +- ICSim: . diff --git a/src/common/camera_model/birdview_model.h b/src/common/camera_model/birdview_model.h index 0d48d32..98910f0 100644 --- a/src/common/camera_model/birdview_model.h +++ b/src/common/camera_model/birdview_model.h @@ -3,6 +3,7 @@ #include #include +#include #include "utils.h" class BirdViewModel {