BASA: Generation of New Driving Scenarios in CARLA Using OpenSCENARIO
13.02.2026, Abschlussarbeiten, Bachelor- und Masterarbeiten
Motivation
Scenario-based testing is central for validating autonomous driving and ADAS functions. CARLA supports standardized scenario definitions via OpenSCENARIO, enabling reproducible and shareable test cases. However, manually creating diverse scenarios is time-consuming and error-prone.
This thesis aims to build a scalable pipeline that automatically generates new OpenSCENARIO files and executes them in CARLA.
Goal
Develop a toolchain that programmatically generates novel and valid OpenSCENARIO scenarios, executes them automatically in CARLA, and exports a scenario suite together with metadata and basic quality checks.
Tasks / Work Packages
WP1 – Survey and Environment Setup
Study the OpenSCENARIO specification with particular focus on the key entities such as Storyboard, Entities, Actions, Triggers, and Conditions. Understand the structure of the OpenSCENARIO XML schema. Set up the CARLA environment and configure the scenario execution workflow using ScenarioRunner or the CARLA Python API. Create a minimal example scenario and validate its successful execution in CARLA.
WP2 – Scenario Template Library
Design reusable scenario templates including cut-in scenarios, lead vehicle emergency braking, pedestrian crossing, and junction conflict scenarios. Define parameterizable elements such as spawn positions, vehicle speeds, routes and waypoints, lateral and longitudinal offsets, traffic density, trigger distances, as well as weather and time of day. Ensure that the templates are modular, well-structured, and easily extendable.
WP3 – Scenario Generator
Implement a Python-based scenario generator that samples parameters from configurable distributions and automatically generates valid .xosc files. Integrate XML schema validation and constraint checking, for example to ensure collision-free spawn positions. Support deterministic generation through configurable random seeds to ensure reproducibility.
WP4 – Execution in CARLA
Develop an automated pipeline for batch execution of generated scenarios in CARLA. Log execution status including success or failure, collision events, minimum distance between actors, and Time-To-Collision if feasible. Implement robust error handling for runtime failures. Store all logs and results in a structured format such as CSV or JSON.
WP5 – Dataset Packaging and Documentation
Generate a scenario suite consisting of approximately 200 to 1000 scenarios. Create a metadata table that includes scenario ID, template type, parameter values, execution results, and key runtime metrics. Provide replay instructions, usage documentation, a guide for adding new templates, and a guide for validation and batch execution.
Expected Deliverables
A Python-based scenario generation toolkit that produces valid OpenSCENARIO files. A reusable scenario template library. An execution script for running scenarios in CARLA with logging functionality. A documented scenario dataset. A final report describing the system design, implementation, evaluation results, and limitations.
Required Skills
>>Python, Git, basic software engineering
>>Familiarity with CARLA/OpenSCENARIO helpful but not mandatory
Work can begin immediately.
Please send me an email along with a current transcript of records and your resume, to: yuan_avs.gao@tum.de
Kontakt: yuan_avs.gao@tum.de