matlab-scenario-builder
Generate 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, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRI
npx skills add matlab/matlab-agentic-toolkit --skill matlab-scenario-builder --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Generates driving scenes, scenarios, road surfaces, and 3D content from scenariobuilder.* sensor data using Scenario Builder for Automated Driving Toolbox. BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar augmentation, traffic-sign placement, vision-based vehicle classification for actor assets. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-driving-data-importer.
Scenario Builder is a support package that ships with MATLAB as part of the Automated Driving Toolbox and can export outputs to multiple simulator formats for validation and safety analysis. It emphasizes converting recorded driving logs into reproducible simulation scenarios and supporting standards-focused scenario coverage.
Prerequisite: The MATLAB session must have the Scenario Builder for Automated Driving Toolbox support package installed. Verify with:
isfile(which("scenariobuilder.Trajectory"))
How it works
- The skill provides 18 workflows; the core path covers importing raw sensor data, building ego trajectories, and exporting to external targets. It performs data preparation steps, builds trajectories, localizes ego position, adds static objects, and exports to simulators like RoadRunner or drivingScenario objects. It also supports event extraction, sensor fusion tracking, and elevation/georeferencing of point clouds.
- It instructs to validate data, establish a scene with roads (OSM), build ego trajectories, export ego/actor data to RoadRunner, and run a validation/video workflow. It emphasizes the use of explicit checks and conditional branching (e.g., when to export, how to visualize, and which tools to use for verification).
- The workflow table includes specific triggers like requests to export to RoadRunner, add static objects, extract events, or augment with aerial lidar data. It also notes steps for visualization and validation, including the required pre-checks for camera intrinsics and height, and the use of a progress table to track step completion.
When to use it
- When you have recorded driving data (GPS/GNSS, camera, lidar, actor tracks) and need to convert it into a simulation-ready scenario.
- When exporting trajectories or scenarios to RoadRunner, drivingScenario, ASAM OpenSCENARIO/OpenDRIVE/OpenCRG/OpenSCENARIO, or Unreal Engine. Default target is RoadRunner unless explicitly asked to use Driving Scenario Designer or build a drivingScenario object.
- When you need to extract road-surface data (OpenCRG), add elevation, georeference point clouds, localize ego on a map with lane detections, add static objects to a map, augment scenes with aerial lidar, or generate 3D mesh assets from images.
- When you need to extract critical scenario events (cut-ins, hard brakes, near-misses) or perform sensor-fusion tracking for non-ego actors.
What it can touch
- The skill interfaces with multiple tools and formats: RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, Unreal Engine. It references sensor data inputs like GPS, camera, lidar, and actor tracks, and supports pre-processing steps such as synchronization and offset correction. Specific tool names and file targets are used in the workflow details (e.g., RoadRunner export, drivingScenario object, OpenDRIVE, OpenCRG, and Unreal Engine).
Caveats
- Not for raw-data import or multi-sensor sync/crop/offset/timestamp normalization; those tasks are directed to matlab-driving-data-importer.
- Requires Scenario Builder for Automated Driving Toolbox to be installed.
- License is NOASSERTION.
- Some workflows referenced as on-demand reside in references/ (not expanded here).
# Scenario Builder for MATLAB ## When to Use - User has recorded driving data (GPS/GNSS, camera, lidar, actor tracks) and needs to convert it into a simulation-ready scenario - 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). - User mentions safety standards (SOTIF / ISO 21448, ISO 26262) and scenario coverage from real-world data - User needs to extract a road surface (OpenCRG) from lidar for vehicle-dynamics or chassis testing - User needs to add elevation to an HD map, georeference point clouds, or extract per-frame point clouds along an ego path - User needs to localize an ego trajectory on a map using lane detections (RVLD preferred, CLRNet fallback) - User needs to add static objects (signs, trees, poles, buildings, barriers) to a RoadRunner HD Map from cuboid detections - User wants to **augment / enhance / improve** a
- When to Use
- When NOT to Use
- Workflow Catalog
- STOP — Common Agent Failures (check BEFORE writing code)
- Mandatory Execution Order (evaluate BEFORE writing code)
- IMPORTANT — Execution Rules
- Rule 1: Show Steps Taken with Progress Table
- Rule 2: Visualization
- Rule 3: Ask User About Available Map/Scene Before Choosing Road Source
- Rule 4: Follow the RoadRunner Scenario Creation Workflow
- Rule 5: Ensure Timestamps Are in Seconds and All Sensors Are Synchronized
- Rule 6: Explain Expected Data Format Before Importing
- Rule 7: Generate and Run a MATLAB Script
- Rule 8: Ask User for RoadRunner Paths
What does the matlab-scenario-builder skill do?
Generate 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, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRI
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-scenario-builder --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
