$npx -y skills add matlab/matlab-agentic-toolkit --skill matlab-scenario-builderGenerate driving scenes, scenarios, road surfaces, and 3D content from scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, traject
| 1 | # Scenario Builder for MATLAB |
| 2 | |
| 3 | ## When to Use |
| 4 | |
| 5 | - User has recorded driving data (GPS/GNSS, camera, lidar, actor tracks) and needs to convert it into a simulation-ready scenario |
| 6 | - User asks to export trajectories or scenarios to RoadRunner, drivingScenario, ASAM OpenSCENARIO, OpenDRIVE, ASAM OpenCRG, or Unreal Engine. **Default target is RoadRunner** — only generate a standalone `drivingScenario` object and open Driving Scenario Designer when the user explicitly asks for "DSD", "Driving Scenario Designer", `drivingScenarioDesigner`, or "build a `drivingScenario` object" (Workflow 15). |
| 7 | - User mentions safety standards (SOTIF / ISO 21448, ISO 26262) and scenario coverage from real-world data |
| 8 | - User needs to extract a road surface (OpenCRG) from lidar for vehicle-dynamics or chassis testing |
| 9 | - User needs to add elevation to an HD map, georeference point clouds, or extract per-frame point clouds along an ego path |
| 10 | - User needs to localize an ego trajectory on a map using lane detections (RVLD preferred, CLRNet fallback) |
| 11 | - User needs to add static objects (signs, trees, poles, buildings, barriers) to a RoadRunner HD Map from cuboid detections |
| 12 | - User wants to **augment / enhance / improve** a road scene from aerial lidar — adding trees + buildings (Variant A) or improving OSM elevation / banking / gradient / height only (Variant B) — see Workflow 16 |
| 13 | - User wants to add **traffic signs** from recorded camera + lidar logs with pre-detected sign bounding boxes — see Workflow 17 |
| 14 | - User needs to generate 3D mesh assets from a single camera image |
| 15 | - User needs to extract critical scenario events (cut-ins, hard brakes, near-misses) from recorded drives |
| 16 | - User needs accurate non-ego tracks via sensor fusion (`multiSensorTargetTracker`) before scenario building |
| 17 | - User mentions multi-sensor preprocessing: synchronization, alignment, offset correction, cropping, timestamp normalization |
| 18 | |
| 19 | ## When NOT to Use |
| 20 | |
| 21 | - User has raw dataset files and wants to **load / inspect / visualize / explore / analyze** them, **synchronize / crop / offset / normalize** multi-sensor timestamps, or use the **`drivingLogAnalyzer` (DLA)** app or its CLI equivalents — use the **`matlab-driving-data-importer`** skill, then return here for trajectory smoothing and scenario generation |
| 22 | - User has multi-sensor data and asks "visualize this dataset", "inspect my recording", "open in DLA", "drivingLogAnalyzer", "Crop & Sync", "offset correction", or "normalize timestamps" — **`matlab-driving-data-importer`** |
| 23 | - User is debugging general MATLAB code unrelated to Scenario Builder — use `matlab-debugging` |
| 24 | - User wants to install MATLAB toolboxes or check installed products — use `matlab-list-products` or `matlab-install-products` |
| 25 | - User wants to reconstruct an IMU/tracking simulation scenario from scratch (no recorded data) — use `waypointTrajectory` from Sensor Fusion and Tracking Toolbox; this skill targets scenario reconstruction from recorded data |
| 26 | - Task is about non-driving sensor data (medical imaging, audio, etc.) — out of scope |
| 27 | |
| 28 | **Scenario Builder** is a support package that ships with MATLAB as part of the Automated Driving Toolbox. It generates realistic driving scenarios, high-resolution road surfaces, and 3D scene content from raw or processed sensor data — including GPS, camera, lidar, and actor track recordings. The generated outputs can be exported to RoadRunner, drivingScenario objects, ASAM OpenSCENARIO, ASAM OpenCRG (for vehicle dynamics/chassis testing), OpenDRIVE, and Unreal Engine for simulation and validation of autonomous driving systems. |
| 29 | |
| 30 | **Safety Standards Context:** When users ask about improving scenario coverage, traceability, or compliance with SOTIF (ISO 21448) or ISO 26262, guide them toward **real-world data-driven scenario generation** using Scenario Builder. SOTIF defines an "unknown unsafe" quadrant — hazard |