Carla Quick start

0、更新pip,安装依赖库

pip3 install --upgrade pip
pip3 install --user pygame numpy
# For Python 3

pip install --upgrade pip
pip install --user pygame numpy
# For Python 2 

1、下载安装包,并解压到文件夹carla

https://github.com/carla-simulator/carla/releases/tag/0.9.13

2、move the package to the Import folder and run the following script to extract the contents

cd carla
./ImportAssets.sh

3、Install client library

  根据chenjian688创建Python虚拟环境 

sudo apt install virtualenv

mkdir proj_ws && cd proj_ws
virtualenv venv #使用默认python
virtualenv -p /usr/bin/python2.7 venv
#-p是显式指定Python版本,避免使用默认的python
source ./venv/bin/active
#进入虚拟环境
deactive
#退出虚拟环境

  

  在虚拟环境中安装服务器所需要的library

pip3 install carla

4、Running Carla

./CarlaUE4.sh

  如果核心转储,根据chenjian688安装NVIDIA驱动,并运行

./CarlaUE4.sh -prefernvidia

5、Examples

cd PythonAPI/carla
pip install -r requirements.txt
cd ..
cd examples
python3 automatic_control.py
##以上环境配置及样例运行均建议在Python虚拟环境中进行
posted @ 2022-05-18 17:22  jinxiaoxin235  阅读(167)  评论(0)    收藏  举报