安装NVIDIA驱动推荐版本:sudo ubuntu-drivers autoinstall
Ubuntu 18 安装 vulkan-sdk
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-bionic.list http://packages.lunarg.com/vulkan/lunarg-vulkan-bionic.list
sudo apt update
sudo apt install vulkan-sdk
iptables -I INPUT -p tcp --dport 2000 -j ACCEPT
iptables -I INPUT -p tcp --dport 2001 -j ACCEPT
iptables-save
sudo apt-get update &&
sudo apt-get install wget software-properties-common &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - &&
sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -c --short)/ llvm-toolchain-$(lsb_release -c --short)-8 main" &&
sudo apt-get update
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev &&
pip2 install --user setuptools &&
pip3 install --user setuptools
clang
版本.sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
sudo apt install git
git clone --depth=1 -b 4.24 https://github.com/EpicGames/UnrealEngine.git ~/UnrealEngine_4.24
cd ~/UnrealEngine_4.24
./Setup.sh && ./GenerateProjectFiles.sh && make
cd ~/UnrealEngine_4.24/Engine/Binaries/Linux && ./UE4Editor
git clone https://github.com/carla-simulator/carla
cd ~/carla
./Update.sh
cp ~/carla ~/carla-bak
export UE4_ROOT=~/UnrealEngine_4.24
make launch
make PythonAPI
cd PythonAPI/examples
python3 automatic_control.py
INFO: listening to server 127.0.0.1:2000
Example of automatic vehicle control from client side.
Traceback (most recent call last):
File "automatic_control.py", line 846, in
main()
File "automatic_control.py", line 839, in main
game_loop(args)
File "automatic_control.py", line 687, in game_loop
world = World(client.get_world(), hud, args)
RuntimeError: time-out of 4000ms while waiting for the simulator, make sure the simulator is ready and connected to 127.0.0.1:2000
make launch
的时候可能会出错PythonAPI/examples/requirements.txt
里的包用pip3
安装, 因为我们用的是python3
运行例子reboot
) 可以帮你解决很多问题. 环境配置好之后记得重启 重启.