Skip to main content
v2026.11,986 entries · CC-BY 4.0

CARLA Simulator: Architecture, Sensors, and Autonomous Driving Research Protocols

A comprehensive research guide to CARLA Simulator: client-server architecture, synchronous execution, sensor configuration, and autonomous vehicle benchmarks.

Written and maintained by CASRAI Editorial Board

Published

On this page

The CARLA simulator (Car Learning to Act) is an open-source autonomous driving simulation platform developed to support the training, prototyping, and safety validation of self-driving perception, planning, and control algorithms. Built on Epic Games’ Unreal Engine with an asynchronous or synchronous client-server architecture, CARLA simulates realistic urban environments, dynamic vehicle and pedestrian traffic, weather variations, and comprehensive sensor payloads including LiDAR, cameras, radar, and GNSS receivers.

Definition and scope of the CARLA simulator

CARLA was established in 2017 through a collaboration between the Computer Vision Center (CVC) at the Universitat Autònoma de Barcelona, Intel Labs, and the Toyota Research Institute. Its primary objective was to provide an open, standardized, and extensible simulation ecosystem for embodied artificial intelligence and automated vehicle research. Unlike proprietary vehicle dynamics packages prioritizing low-level powertrain engineering, CARLA focuses on the closed-loop interaction between an autonomous vehicle’s software stack and a photorealistic 3D environment.

The scope of CARLA encompasses five core functional subsystems:

  • Environmental Simulation: High-fidelity 3D renderings of urban, suburban, rural, and highway layouts featuring dynamic lighting, volumetric fog, customizable precipitation, and puddle accumulation modeled through Unreal Engine.
  • Actor Modeling: Physical modeling of vehicles, bicycles, motorcyclists, and articulated pedestrians that navigate the road network under autonomous or programmed behavioral control.
  • Sensor Emulation: Parameterized sensor models generating synthetic RGB video, depth maps, semantic segmentation, instance segmentation, optical flow, dynamic vision sensor (DVS) events, ray-cast LiDAR point clouds, radar clusters, and inertial measurements.
  • Traffic Management: A built-in C++ subsystem (the Traffic Manager) controlling non-player character (NPC) traffic flow, intersection priority negotiation, lane changing, and adherence to road regulations.
  • Scenario Orchestration: Support for structured testing protocols, including ASAM OpenSCENARIO standards and the CARLA ScenarioRunner framework, allowing researchers to evaluate driving policies under repeatable critical events.

In research workflows, CARLA serves as a precursor to physical proving ground tests. It allows robotics laboratories to evaluate safety-critical edge cases—such as sudden pedestrian cut-ins and low-sun glare—at zero physical risk and low computing cost.

Client-server architecture and synchronization mechanics

CARLA operates via a modular server-client architecture. The server executable executes the Unreal Engine rendering loop, updates the physics engine, and steps environmental states. Clients interact with the simulation server through C++ or Python API libraries over dedicated TCP sockets. By default, the server binds to TCP port 2000 for remote procedure calls (world state queries, actor spawning, and vehicle control commands) and TCP port 2001 for streaming sensor payloads.

Configuring the simulation execution mode is a critical operational protocol in CARLA research. CARLA provides two fundamentally distinct execution modes:

Asynchronous mode vs. synchronous mode

In asynchronous mode, the CARLA server computes physics and renders frames as quickly as hardware permits, decoupled from client responses. Sensor streams and world snapshots are dispatched over the network asynchronously. While useful for interactive visualization, asynchronous execution is unsuitable for reproducible scientific benchmarking. Variable client processing times cause non-deterministic frame drops, timing drift between sensor captures, and inconsistent control latencies.

In synchronous mode, the server halts its physical simulation loop after each frame, waiting for an explicit client trigger command before advancing to the next time step. In Python, this step is initiated by calling world.tick(). Synchronous execution guarantees that every sensor captures data at the exact same simulation timestamp, eliminating temporal jitter and enabling deterministic replication across independent compute runs.

Configuring deterministic synchronous execution

To establish deterministic execution, researchers must set both the world simulation mode and the Traffic Manager to synchronous operation, while enforcing a fixed simulation delta time:

First, the client connects to the server and retrieves the active world object. Next, settings.synchronous_mode is set to True, and settings.fixed_delta_seconds is assigned a static time step (such as 0.05 seconds, corresponding to a steady 20 Hz simulation frequency). Crucially, the accompanying Traffic Manager must also be updated via traffic_manager.set_synchronous_mode(True). If the world is set to synchronous mode while the Traffic Manager remains asynchronous, the Traffic Manager threads attempt to send commands while the server is paused, causing deadlocks or simulation drift.

Finally, production research scripts must enclose the simulation loop within a try...finally block. If an unhandled exception or client crash terminates the script without resetting settings.synchronous_mode = False, the CARLA server remains permanently blocked waiting for a tick signal, forcing a manual server restart.

Sensor simulation: cameras, LiDAR, radar, and ground truth

A central capability of CARLA is instantiating realistic sensor suites matching automated vehicle sensor rigs. Researchers instantiate sensors through the carla.BlueprintLibrary, attaching sensor actors to target vehicles with user-defined 3D spatial transforms.

Optical cameras and ground-truth perception

Optical cameras in CARLA are implemented as Unreal Engine scene capture components. Beyond standard RGB output (sensor.camera.rgb), CARLA provides exact ground-truth perception streams generated directly from the rendering pipeline without human annotation error:

  • Depth Cameras: The sensor.camera.depth component outputs depth buffers mapped to 8-bit RGB color encodings or 32-bit floating-point distances, providing millimeter-accurate distance from the focal plane.
  • Semantic Segmentation: The sensor.camera.semantic_segmentation sensor encodes pixel-wise object class labels following an expanded Cityscapes classification schema, tagging classes such as road, sidewalk, building, fence, pole, traffic light, traffic sign, vegetation, terrain, pedestrian, and vehicle.
  • Instance Segmentation: The sensor.camera.instance_segmentation sensor tags each distinct actor with a unique integer ID, allowing neural networks to disambiguate overlapping vehicle silhouettes and distinct pedestrians.
  • Optical Flow and DVS: Optical flow sensors calculate motion vectors for every rendered pixel between consecutive frames, while Dynamic Vision Sensors simulate neuromorphic event cameras registering asynchronous brightness changes.

Camera blueprints offer detailed optical attribute controls. Researchers can configure horizontal field of view (fov), focal distance, lens aperture (fstop), ISO sensor sensitivity, shutter speed, and chromatic lens distortion coefficients (lens_k and lens_kcube) to model physical lens distortion.

LiDAR and RADAR simulation

LiDAR simulation in CARLA is implemented via multi-threaded geometric ray-casting (sensor.lidar.ray_cast). The sensor sweeps the virtual 3D environment by projecting rays outward from a central rotating origin across a configured vertical field of view.

Key parameters for the ray-cast LiDAR blueprint include:

  • channels: Number of vertical laser diodes (standard configurations include 16, 32, 64, or 128 channels).
  • range: Maximum measurement distance in meters (typically configured between 50.0 and 200.0 meters).
  • points_per_second: Total pulse generation rate across all channels (e.g., 56,000 to 1,300,000 points per second).
  • rotation_frequency: Scanner rotation speed in Hertz (typically 10.0 or 20.0 Hz).
  • upper_fov and lower_fov: Vertical angular scanning bounds (e.g., +10.0 degrees to -30.0 degrees).
  • dropoff_general_rate and noise_stddev: Stochastic parameters simulating atmospheric attenuation, low surface reflectivity drop-off, and Gaussian measurement noise.

In addition to geometric LiDAR, CARLA offers a semantic LiDAR sensor (sensor.lidar.ray_cast_semantic). In this modality, each returned 3D point carries spatial Cartesian coordinates (X, Y, Z), cosine incidence angles, the ground-truth semantic object tag, and the unique actor ID of the intersected surface. This ground-truth tagging makes CARLA ideal for generating structured training corpora, mirroring principles found in synthetic data in research and establishing direct parity with benchmark repositories such as the KITTI dataset.

How CARLA is used in autonomous driving research practice

Autonomous vehicle research programs utilize CARLA across three primary algorithmic paradigms, ranging from modular industrial autonomy stacks to modern end-to-end artificial intelligence models.

1. Classical modular autonomy stacks

In a modular autonomy pipeline, perception, state estimation, mapping, planning, and control operate as discrete software modules. CARLA integrates with external robotics middleware through the official ROS and ROS 2 bridges (carla_ros_bridge). In these architectures, CARLA serves as a hardware-in-the-loop or software-in-the-loop world simulator:

  • Sensor outputs are converted into standard ROS messages (such as sensor_msgs/Image, sensor_msgs/PointCloud2, and sensor_msgs/NavSatFix).
  • Perception pipelines process raw feeds to detect 3D obstacle bounding boxes.
  • Path planners calculate collision-free trajectories adhering to lane centerlines extracted from high-definition ASAM OpenDRIVE road maps.
  • Trajectory trackers issue steering, throttle, and brake actuations back to the CARLA vehicle interface as carla.VehicleControl objects or ROS ackermann_msgs.

2. End-to-end imitation learning

In imitation learning, deep neural networks are trained to map raw sensor inputs directly to steering, acceleration, and braking commands. Research groups leverage CARLA to collect extensive expert driving demonstration datasets. By driving a vehicle with an algorithmic oracle or a human steering peripheral, the system records synchronized camera streams, navigational goal vectors, and expert control outputs across diverse weather conditions and traffic densities.

Models trained under conditional imitation learning architectures take high-level navigation instructions (such as “turn left at the next intersection” or “maintain lane”) alongside sensor frames. Once trained, these policies are deployed back into CARLA in closed-loop mode, where their ability to recover from perturbations or distribution shifts is measured quantitatively.

3. Reinforcement learning and policy optimization

Reinforcement learning (RL) explores driving policies through direct reward-driven trial and error. Researchers wrap CARLA inside standard Gymnasium interfaces. In these environments, the agent receives observations (feature vectors, bird’s-eye-view semantic grids, or camera tensors), executes actions, and receives scalar rewards based on forward velocity, lane centering, comfort (minimal jerk), and collision avoidance penalties.

Libraries such as Stable-Baselines3 reinforcement learning are widely deployed to train algorithms like Proximal Policy Optimization (PPO) or Soft Actor-Critic (SAC) in CARLA. To accelerate training throughput, laboratories run CARLA in headless mode (disabling graphical display via -RenderOffScreen) across multi-GPU compute servers.

Comparative analysis of autonomous driving simulation platforms

When selecting a simulation platform for automated vehicle and robotics research, laboratories evaluate rendering fidelity, physics realism, road network compliance, and sensor configurability. The following comparative matrix highlights structural differences between CARLA and alternative simulation environments:

Platform Underlying Graphics Engine Road Network Standard Primary Research Domain Open Source / License
CARLA Unreal Engine 4 / Unreal Engine 5 ASAM OpenDRIVE (.xodr) native Urban autonomous driving, sensor simulation, AD benchmarking Open Source (MIT License)
AirSim Unreal Engine 4 / Unity Custom terrain meshes Aerial robotics, UAVs, basic vehicle navigation Open Source (Archived by Microsoft)
LGSVL / SVL Simulator Unity Engine Lanelet2, Apollo HD, OpenDRIVE Apollo and Autoware stack validation Discontinued / Community forks
Isaac Sim / Isaac Lab NVIDIA Omniverse / RTX PhysX Universal Scene Description (USD) Robotic manipulation, mobile robotics, physics-accurate RL Proprietary core with open extensions
SUMO 2D OpenGL custom renderer SUMO XML / OpenDRIVE import Microscopic traffic flow, multi-agent congestion dynamics Open Source (EPL-2.0)

While frameworks such as Isaac Lab simulation excel at articulated robotics and contact physics on NVIDIA hardware, CARLA remains the specialized benchmark for urban driving, traffic compliance, and multi-modal perception. Furthermore, CARLA supports native co-simulation with SUMO, allowing researchers to simulate hundreds of microscopic traffic agents in SUMO while rendering realistic visual interactions in CARLA.

The structured dataset rendered below details the quantitative scoring models, infraction penalties, and execution termination criteria across the evolution of the official CARLA Autonomous Driving Leaderboard.

Where CARLA simulation matters for research laboratories and safety validation

Simulation provides the mathematical bedrock for safety assurance in autonomous mobility. Testing autonomous vehicles solely on public roads is statistically insufficient to prove functional safety; vehicles would need to traverse hundreds of millions of miles to encounter enough rare hazardous scenarios to validate fatality rates below human baselines.

CARLA addresses this validation bottleneck by enabling automated combinatorial scenario generation. Laboratories programmatically vary environmental parameters—such as ambient illumination, fog density, asphalt wetness, sun position, and traffic density—to construct comprehensive operational design domain (ODD) safety envelopes.

The CARLA Autonomous Driving Leaderboard

The global standard for evaluating autonomous driving agents within CARLA is the CARLA Autonomous Driving Leaderboard. The leaderboard evaluates full autonomy agents on secret, unseen urban routes designed to challenge perception and tactical decision-making.

Performance on the leaderboard is quantified by the Driving Score (DS), calculated as the product of the Route Completion (RC) percentage and the cumulative Infraction Penalty (IP) coefficient:

In earlier iterations (Leaderboard 1.0 and 2.0), the infraction penalty accumulated via an exponential geometric series, where each violation multiplied the agent’s remaining score multiplier by a fraction (e.g., 0.50 for a pedestrian collision, 0.60 for a vehicle collision, 0.70 for a red light). However, this compounding geometric penalty created a perverse optimization incentive known as the “early stopping” strategy: agents that committed an infraction early in a run could maximize their score by intentionally stalling or terminating the route to avoid compounding further penalties.

To eliminate this loophole, CARLA Leaderboard 2.1 introduced a linear aggregation penalty formulation. Under Leaderboard 2.1, infractions contribute linear severity weights (such as 1.0 for pedestrian collisions, 0.70 for vehicle collisions, and 0.40 for red lights) to a denominator scaling term. This ensures that agents always maintain a positive mathematical incentive to continue driving, navigate around obstacles, and complete the designated route safely.

Common misunderstandings in CARLA simulation

When adopting CARLA for academic or industrial vehicle research, engineering teams frequently encounter common operational misconceptions:

  • Assuming zero sim-to-real gap: While CARLA’s Unreal Engine rendering is photorealistic, simulated camera sensors do not exhibit the sensor blooming, dirty lens reflections, thermal CMOS noise, or dynamic range compression found in real physical cameras. Perception networks trained exclusively on synthetic CARLA imagery without domain adaptation often experience accuracy degradation when transferred to real-world camera feeds.
  • Running in asynchronous mode for scientific benchmarks: Novice researchers often leave CARLA in its default asynchronous configuration. Because asynchronous mode allows variable frame rates and sensor timestamp mismatch, results obtained in asynchronous mode cannot be reproduced deterministically. Formal scientific evaluations must employ synchronous mode with fixed delta time steps.
  • Overestimating default vehicle dynamics: By default, CARLA uses the PhysX vehicle dynamics model. While suitable for urban speeds, standard tire and suspension parameters do not accurately capture extreme tire slip angles, non-linear weight transfers, or hydroplaning during high-speed emergency maneuvers without custom vehicle telemetry tuning.
  • Relying on Traffic Manager for human psychological modeling: CARLA’s Traffic Manager manages urban vehicle flows, lane merging, and regulatory compliance. However, NPC vehicles follow rule-based waypoint graphs; they do not simulate nuanced human driver behaviors such as aggressive cut-ins, pedestrian gaze cues, or distracted driving patterns unless explicitly driven by custom behavioral models or OpenSCENARIO scripts.

Frequently asked questions

What is the CARLA simulator and what is it used for?

The CARLA simulator is an open-source autonomous driving simulation platform built on Unreal Engine. It is used by researchers and automotive engineers to train, test, and validate self-driving software systems—including computer vision models, imitation learning policies, reinforcement learning controllers, and full autonomy stacks—in realistic urban 3D environments.

How does synchronous mode differ from asynchronous mode in CARLA?

In asynchronous mode, the CARLA server runs freely and sends sensor frames whenever ready, causing non-deterministic frame drops and network timing drift. In synchronous mode, the server halts after each frame and advances only when the client issues a tick command, guaranteeing deterministic time steps and synchronized multi-sensor data collection.

Can CARLA simulate real-world sensor noise and drop-off?

Yes. CARLA sensor blueprints include configurable parameters to model real-world physical sensor phenomena. For example, LiDAR blueprints support Gaussian measurement noise, intensity drop-off based on surface angles, and stochastic point loss, while camera blueprints allow custom exposure, ISO noise, focal aperture, and lens distortion coefficients.

How does CARLA integrate with ROS and ROS 2 robotics workflows?

CARLA integrates with ROS and ROS 2 through the official carla_ros_bridge package. The bridge subscribes to CARLA server streams and publishes standard ROS sensor messages (such as camera images, point clouds, and odometry) while forwarding ROS vehicle control commands back to CARLA actors.

How are autonomous driving agents scored on the CARLA Leaderboard?

Autonomous agents are evaluated using the Driving Score metric, which combines Route Completion (percentage of route distance traveled) and an Infraction Penalty multiplier. Infractions such as colliding with pedestrians, striking vehicles, running red lights, or driving off-road scale down the penalty multiplier based on predefined severity weights.

What hardware specifications are required to run CARLA effectively?

CARLA requires a dedicated modern GPU due to its Unreal Engine graphics pipeline. A minimum configuration involves an NVIDIA GPU with at least 6 GB of VRAM (such as an RTX 2060), while optimal performance—especially when simulating multiple high-resolution cameras and LiDARs in synchronous mode—requires an NVIDIA GPU with 12 GB or more VRAM (such as an RTX 3080, RTX 4080, or data center GPU) running on Linux or Windows.

Sources

  • Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., & Koltun, V. (2017). CARLA: An Open Urban Driving Simulator. Proceedings of the 1st Annual Conference on Robot Learning (CoRL 2017), PMLR 78:1-16. https://arxiv.org/abs/1711.03938 (Checked 2026-11-14)
  • CARLA Documentation. Core Concepts, Architecture, and Synchronous Mode. https://carla.readthedocs.io/en/latest/core_concepts/ (Checked 2026-11-14)
  • CARLA Documentation. Sensor Reference and Blueprints. https://carla.readthedocs.io/en/latest/ref_sensors/ (Checked 2026-11-14)
  • CARLA Autonomous Driving Leaderboard. Evaluation Criteria, Infraction Penalties, and Benchmark Rules. https://leaderboard.carla.org/ (Checked 2026-11-14)
  • ASAM (Association for Standardization of Automation and Measuring Systems). ASAM OpenDRIVE Road Network Specification. https://www.asam.net/standards/detail/opendrive/ (Checked 2026-11-14)

Data: CARLA Leaderboard Infraction Penalty and Simulation Termination Criteria Comparison

Comparative dataset compiled from CARLA Autonomous Driving Leaderboard documentation, evaluating infraction penalty models, severity coefficients, and simulation termination thresholds between Leaderboard 2.0 and Leaderboard 2.1.

Period covered: 2017/2026. Coverage: Global.

CARLA Leaderboard Infraction Penalty and Simulation Termination Criteria Comparison
Infraction or Operational EventLeaderboard 2.0 Penalty ModelLeaderboard 2.0 Multiplier (coefficient)Leaderboard 2.1 Penalty ModelLeaderboard 2.1 Severity Weight (weight)Route Impact and Operational Threshold
Pedestrian CollisionGeometric Multiplicative Decay0.5Linear Aggregated Penalty1Direct collision with walking or standing pedestrian agent
Vehicle CollisionGeometric Multiplicative Decay0.6Linear Aggregated Penalty0.7Impact with other moving or parked motor vehicle
Static Layout CollisionGeometric Multiplicative Decay0.65Linear Aggregated Penalty0.6Impact with street barriers, poles, traffic lights, or building walls
Red Light ViolationGeometric Multiplicative Decay0.7Linear Aggregated Penalty0.4Failure to bring vehicle to a complete halt at red signal
Emergency Vehicle Failure to YieldNot Formally Modeled1Linear Aggregated Penalty0.4Failure to yield right-of-way to active responding emergency vehicle
Stop Sign ViolationGeometric Multiplicative Decay0.8Linear Aggregated Penalty0.25Failure to execute complete stop at marked stop sign intersection
Off-Road Driving ExcursionRoute Distance Deduction0Route Distance Deduction0Tires driving outside delineated lane boundaries or road shoulder
Agent Blocked InactivityHard Simulation Abort180Hard Simulation Abort180Vehicle stationary without forward progress for 180 simulation seconds
Route Deviation DistanceHard Simulation Abort30Hard Simulation Abort30Vehicle trajectory deviating more than 30 meters from planned route

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about CARLA Simulator: Architecture, Sensors, and Autonomous Driving Research Protocols

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →