Skip to content

Commit

Permalink
Fix build errors and add known issues to README
Browse files Browse the repository at this point in the history
  • Loading branch information
vietanhdev committed Mar 1, 2021
1 parent c711f87 commit 900ce1b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -157,6 +157,7 @@ target_link_libraries(${PROJECT_NAME}
lane_detector
car_status
car_gps
nvonnxparser
)

# Copy files
Expand Down
60 changes: 52 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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 <cublas_v2.h>
^~~~~~~~~~~~~
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: <https://github.com/zombieCraig/ICSim>.
1 change: 1 addition & 0 deletions src/common/camera_model/birdview_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <opencv2/opencv.hpp>
#include <atomic>
#include <mutex>
#include "utils.h"

class BirdViewModel {
Expand Down

0 comments on commit 900ce1b

Please sign in to comment.