A GPU is required to run the LGSVL autonomous driving simulator. Install Autoware and the autonomous driving simulator LG SVL on a PC with a GPU.
reference
https://qiita.com/y-vectorfield/items/8960c804441d2ebd605e
--Check GPU recognition
$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile](rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
--Added NVIDIA package repository
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update
--Check GPU driver
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C20sv00001B0Asd000022BEbc03sc00i00
vendor : NVIDIA Corporation
model : GP106M [GeForce GTX 1060 Mobile]
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-450 - third-party free recommended
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-440-server - distro non-free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-410 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
== /sys/devices/pci0000:00/0000:00:1c.5/0000:04:00.0 ==
modalias : pci:v00008086d00002526sv00008086sd00000014bc02sc80i00
vendor : Intel Corporation
manual_install: True
driver : backport-iwlwifi-dkms - distro free
--Disable secure boot
Press F2 when booting the PC and then disable Secure Boot in the Bios settings.
--Install the recommended driver
sudo apt install nvidia-driver-450 nvidia-settings
--Disable the nouveau driver running by default on ubuntu
$ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$ sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$ sudo update-initramfs -u
$ sudo reboot
You can check it with the following command. If nothing is displayed, nouveau is disabled.
$ lsmod | grep -i nouveau
--Check with nvidia-smi
$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1060 Off | 00000000:01:00.0 On | N/A |
| N/A 44C P8 9W / N/A | 769MiB / 6077MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1165 G /usr/lib/xorg/Xorg 40MiB |
| 0 N/A N/A 1241 G /usr/bin/gnome-shell 48MiB |
| 0 N/A N/A 1699 G /usr/lib/xorg/Xorg 381MiB |
| 0 N/A N/A 1828 G /usr/bin/gnome-shell 220MiB |
| 0 N/A N/A 2176 G ...AAAAAAAAA= --shared-files 72MiB |
+-----------------------------------------------------------------------------+
--Updated Eigen
$ sudo apt install cmake
$ cd && wget https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz
$ mkdir eigen && tar --strip-components=1 -xzvf eigen-3.3.7.tar.gz -C eigen
$ cd eigen && mkdir build && cd build && cmake .. && make && sudo make install
--Installing CUDA 10.0 and cuDNN
sudo apt-get install -y --no-install-recommends cuda-10-0 libcudnn7 libcudnn7-dev
--Install TensorRT
sudo apt-get install nvinfer-runtime-trt-repo-ubuntu1804-5.0.2-ga-cuda10.0
sudo apt-get update
sudo apt-get install -y --no-install-recommends libnvinfer-dev
--Install git lfs
sudo apt-get install git-lfs
sudo apt update && sudo apt install ros-$ROS_DISTRO-image-transport-plugins
--Download autoware-data
mkdir ~/shared_dir
cd ~/shared_dir
git clone https://github.com/lgsvl/autoware-data.git
--Download LGSVL Simulator
Download the latest release version (https://github.com/lgsvl/simulator/releases/latest).
lgsvlsimulator-linux64-2020.05.zip
--Unzip and execute
$ cd lgsvlsimulator-linux64-2020.05
$ ./simulator
Press [Open Browser] to log in and then display the management screen.
Recommended Posts