Autonomous Driving Simulation CARLA Learning

Time:2024-2-29

i. introduction to carla

CARLA is an open source autonomous driving simulator. It is built from the ground up as a modular and flexible API to address the range of tasks involved in the autonomous driving problem.One of the main goals of CARLA is to help democratize autonomous driving R&D as a tool that can be easily accessed and customized by users. To this end, the simulator must fulfill the requirements of different use cases in the general driving problem (e.g., learning driving strategies, training perception algorithms, etc.) CARLA is based on the Unreal engine to run the simulation and uses the OpenDRIVE standard (1.4 today) to define the roadway and urban environments. Control over the simulation is granted through an API handled in Python and C++ that grows as the project continues to grow.

The carla simulator is mainly based on a client-server architecture. The server is similar to the Creator and can simulate everything related to itself, sensor rendering, physics calculations, world state and Actor updates, etc. The client consists of client modules that control the Actor logic in the scene and set world conditions. The client consists of the sum of client modules that control the Actor logic in the scene and set world conditions. This is accomplished by utilizing the CARLA API (Python or C++), a layer that mediates between the server and the client, and is constantly evolving to provide new functionality.

Autonomous Driving Simulation CARLA Learning

The basic structure of carla:

  1. Traffic manager:A built-in system that controls the vehicle in addition to the one used for learning. It acts as a command provided by CARLA to recreate city-like environments with realistic behavior.
  2. Sensors:Vehicles rely on them to distribute information about their surroundings. In CARLA, they are specific types of participants attached to vehicles that can retrieve and store the data they receive to streamline the process. Currently, the program supports different types of these, from cameras to radar, LIDAR and more!
  3. Recorder:This feature is used to progressively re-enact the simulation for each participant in the world. It allows access to any moment in the timeline from anywhere in the world, making it a great tracking tool.
  4. ROS bridge and Autoware implementation:For generalization purposes, the CARLA project integrates the simulator with other learning environments.
  5. Open assets:CARLA provides different maps for urban environments, allows control of weather conditions and provides a library of blueprints with the various players to be used. However, it is possible to customize these elements and to generate new ones following simple guidelines.
  6. Scenario runner:To simplify the learning process for the vehicle, CARLA provides a series of routes describing different scenarios for iteration. These also provide the basis forCARLA ChallengeLaying the groundwork, everyone can test their solutions and enter the leaderboard.

Second, carla get started in practice (quick start, no rebuild carla compilation process)

   

1、Environmental Configuration

Download and install the packaged version of carla, the package consists of both carla server as well as client parts, built specifically for windows and linux.

Configuration requirements: 6GB GPU, 32GB CPU. 20GB disk space, python version python3.7 for windows, linux supports python2.7 as well as python3.7. pip updated to the latest version.

Windows:

pip3 -v
pip3 install --upgrade pip
pip install --user pygame numpy

linux:

pip install --user pygame numpy &&
pip3 install --user pygame numpy

Two TCP ports and a good Internet connection. Defaults to 2000 and 2001. pay attention to firewalls as well as scientific internet proxies.

2, carla installation (windows version)

The carla library allows you to download different versions of carla.carla/Docs/download.md at master · carla-simulator/carla (github.com)Autonomous Driving Simulation CARLA Learninghttps://github.com/carla-simulator/carla/blob/master/Docs/download.md

Download carla (0.9.14) installation

   Release 0.9.14 · carla-simulator/carla (github.com)Autonomous Driving Simulation CARLA Learninghttps://github.com/carla-simulator/carla/releases/tag/0.9.14/

Autonomous Driving Simulation CARLA Learning

 Autonomous Driving Simulation CARLA Learning

 Autonomous Driving Simulation CARLA Learning

cd PythonAPI\examples

python3 -m pip install -r requirements.txt # Support for Python2 is provided in the CARLA release packages

python3 generate_traffic.py  

Or use Vs Code to open the D:\CARLA_0.9.14\WindowsNoEditor\PythonAPI\examples folder and run a couple of .py examples to see the effect.

Autonomous Driving Simulation CARLA Learning

 

 Autonomous Driving Simulation CARLA Learning

 

Recommended Today

The 100 Best Deep Learning Projects for Getting Started

attention (heed): Recently by the fans feedback, found that some subscribers will be the content of this column for secondary sale, hereby declare that the content of this column is for learning only, shall not be sold in any way, without the author’s permission shall not be the content of this column to exercise the […]