Carla Autopilot Simulation 1: Quickly Install and Run Carla


foreword

网上有不少的Windows版本的Carla的安装教程,这里简单记录下自己安装过程


1. Carla running effect

Please add a picture description

2. Carla running resources

1. Official recommendation

hardware model
processor Intel i7 9th Gen - 11th Gen / Intel i9 9th Gen - 11th Gen / AMD Ryzen 7 / AMD Ryzen 9
graphics card Nvidia RTX 2070 / Nvidia RTX 2080 / Nvidia RTX 3070, Nvidia RTX 3080

1、内存:+16 GB RAM memory
2、显存:+8 GB Video memory
3、操作系统:Ubuntu18.04/Windows

注意:下载0.9.12+版本可能出现下述报错,提醒显存不够,网上有兄弟说下载0.9.12的版本就可以运行

insert image description here


2. Environment configuration

1) Carla 0.9.14 download

insert image description here

  • [Windows] CARLA_0.9.14.zip (main program)

  • [Windows] AdditionalMaps_0.9.14.zip (map package)

  • Click the box in the above picture to download. After downloading, you can decompress it locally. After decompression, it cannot run immediately. You need to download other environments. Here, python is used for communication and interaction, so you need to download python-related dependencies;

insert image description here

2) Python dependency installation

  • Pycharm/Vs Code (any platform that can run Python)
  • Python Version ≥ 3.0 (I use version 3.7)
#更新pip
python.exe -m pip install --upgrade pip

#安装依赖库
pip3 install pygame
pip3 install numpy
pip3 install networkx
pip3 install distro
pip3 install Shapely

3) run demo

1. Open CarlaUE4.exe

insert image description here
insert image description here

2. Use Vs Code to open the D:\CARLA_0.9.14\WindowsNoEditor\PythonAPI\examples folder, open automatic_control.py, and click the Run button. This script will automatically plan the running path of the Carla vehicle;

insert image description here

insert image description here


3. Matters needing attention before operation

1. If Carla reports an error with a yellow wavy line, you need to add the carla path to extraPaths;

insert image description here

  • Press shift+ctrl+p in the Vs Code software to open the search bar and search for settings.json;

insert image description here

  • Add the path carla path to settings.json, restart Vs Code update after adding;
   "python.analysis.extraPaths": [
        "./WindowsNoEditor/PythonAPI/carla"
    ]

insert image description here

2. Unable to connect to the Carla client

Python communicates with Carla locally through ip127.0.0.1, port 2000 (the script and CarlaUE4.exe are on the same computer), the following may be the problems you may encounter;

  • It is said on the Internet that there is a situation where port 2000 cannot be connected to the client, you can check whether port 2000 is occupied, or directly change the port number in the code;
    insert image description here
  • What I encountered was that I could not connect to the IP of 127.0.0.1. No matter how I modified the port number, I could not connect. Later, I found that it was blocked by the firewall, but the firewall did not block it every time. I was blocked twice in total. As long as the firewall is turned off, the communication can be normal;

The above is the process of my installation of Carla, for reference only, welcome to communicate~

Guess you like

Origin blog.csdn.net/zataji/article/details/129968912