SkillAgentSearch skills...

matlab-use-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.

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-use-scenario-builder

Installs into whichever agent you are using.

About this skill
šŸ“„

SKILL.md

Installable skill definition

Quality Score

84/100

Category

Automation

Supported Platforms

Universal

Tags

Our assessment of matlab-use-scenario-builder

matlab-use-scenario-builder scores 84/100 on our quality scale, 2084th of 2,769 Automation skills we index.

Its SKILL.md is 56 KB long, well organised into 29 sections with 6 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
21/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so matlab-use-scenario-builder is actively maintained.
  • Our last check on 2026-11-06 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

matlab-use-scenario-builder compared with similar skills

All 4 of these similar skills score higher than matlab-use-scenario-builder; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-use-scenario-builder (this skill)by matlab841.1k2mo agoSKILL.md
Agent-Reachby Panniantong100112.7k9d agoCLAUDE.md
rufloby ruvnet10082.0ktodayCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.9k8d agoCLAUDE.md
Scraplingby D4Vinci100103.9ktodayMCP Server

Frequently asked questions

How do I install matlab-use-scenario-builder?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-use-scenario-builder. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-use-scenario-builder work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-use-scenario-builder safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-use-scenario-builder still maintained?
The repository was last updated about 2 months ago, so matlab-use-scenario-builder is actively maintained.

name: matlab-use-scenario-builder description: "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, 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-import-driving-data." license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "2.0"

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 road scene from aerial lidar — adding trees + buildings (Variant A) or improving OSM elevation / banking / gradient / height only (Variant B) — see Workflow 16
  • User wants to add traffic signs from recorded camera + lidar logs with pre-detected sign bounding boxes — see Workflow 17
  • User needs to generate 3D mesh assets from a single camera image
  • User needs to extract critical scenario events (cut-ins, hard brakes, near-misses) from recorded drives
  • User needs accurate non-ego tracks via sensor fusion (multiSensorTargetTracker) before scenario building
  • User mentions multi-sensor preprocessing: synchronization, alignment, offset correction, cropping, timestamp normalization

When NOT to Use

  • 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-import-driving-data skill, then return here for trajectory smoothing and scenario generation
  • 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-import-driving-data
  • User is debugging general MATLAB code unrelated to Scenario Builder — use matlab-debug-code
  • User wants to install MATLAB toolboxes or check installed products — use matlab-list-products or matlab-install-products
  • 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
  • Task is about non-driving sensor data (medical imaging, audio, etc.) — out of scope

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.

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 — hazardous scenarios not yet identified — and converting recorded driving logs (especially critical events, ADAS disengagements, and long-tail situations) into simulation-ready scenarios is a key strategy to reduce that unknown unsafe area. Scenario Builder provides the pipeline from recorded data → reproducible simulation scenario.

Prerequisite: The MATLAB session must have the Scenario Builder for Automated Driving Toolbox support package installed. Verify with:

isfile(which("scenariobuilder.Trajectory"))

Workflow Catalog

This skill supports 18 workflows. Workflows 1–3 and 6 (the core happy path) are inline below. Workflow 4 has a minimal inline pattern with a pointer to its detailed reference. Workflows 5, 7–18 live in references/ and are loaded on demand.

| # | Workflow | Where | Load when user says | |---|----------|-------|---------------------| | 1 | Import Raw Sensor Data | inline | "load my GPS/camera/lidar/actor data" | | 2 | Build GPS Data and Extract Trajectory | inline | "build ego trajectory from GPS" | | 3 | Import Actor Tracks and Create Trajectories | inline | "actor tracks", "non-ego trajectories" | | 4 | Export Trajectories to RoadRunner | inline (minimal) + workflow-04-roadrunner-export-detail.md | "export to RoadRunner", "RR scene", "simulate scenario" | | 5 | Inspect Multi-Sensor Data (drivingLogAnalyzer) | see matlab-import-driving-data skill | "visualize / inspect / explore / analyze this dataset", "multi-sensor data", "drivingLogAnalyzer", "DLA" — route to matlab-import-driving-data, not handled here | | 6 | Preprocess, Synchronize, Crop, Offset | inline | "sync", "crop", "normalize timestamps" | | 7 | Height Correction for Scenes with Elevation | workflow-07-height-correction.md | "Z=0 but roads have elevation", "adjustHeight", "HERE HD scene + GPS", "OpenDRIVE scene + GPS", "pre-built scene with terrain" | | 8 | Localize Ego Using Lane Detections | workflow-08-lane-localization.md | "lane localization", "snap to lane center", "localizeEgoUsingLanes" | | 9 | Add Static Objects to RoadRunner HD Map | workflow-09-static-objects.md | "add trees/signs/poles/buildings to RR" | | 10 | Road Surface (OpenCRG) | workflow-10-road-surface-opencrg.md | "road surface", "OpenCRG", "vehicle dynamics from lidar" | | 11 | Point Cloud Georeferencing & Elevation | workflow-11-point-cloud-georef.md | "addElevation", "georeferenced point cloud", "per-frame lidar" | | 12 | 3D Asset Generation from Images | workflow-12-3d-asset-generation.md | "imageAssetGenerator", "TripoSR", "3D asset from photo" | | 13 | Extract Key Scenario Events | workflow-13-event-extraction.md | "cut-ins", "near-miss", "hard brake", "ADAS disengagement" | | 14 | Sensor Fusion Tracking | workflow-14-sensor-fusion-tracking.md | "noisy detections", "ID switches", "multiSensorTargetTracker" | | 15 | Driving Scenario Designer (drivingScenario object) | workflow-15-driving-scenario-designer.md | explicit only: "Driving Scenario Designer", "DSD", "open in drivingScenarioDesigner", "build a drivingScenario object" | | 16 | Road Scene Augmentation from Aerial Lidar | workflow-16-aerial-lidar-augmentation.md | "augment / enhance / improve the scene with trees / buildings", "single lat/lon US — generate scene", "USGS aerial lidar", "improve OSM elevation / banking / gradient / height", .las / .laz aerial input | | 17 | Traffic Signs from Recorded Camera + Lidar | workflow-17-traffic-signs-from-sensor-data.md | "add traffic signs", "place signs on the map", "signs from camera detections + lidar" (pre-detected sign boxes required) | | 18 | Vehicle Classification from Camera | workflow-18-vehicle-classification.md | "classify vehicles", "vehicle color", "vehicle type", "actor asset type", "what kind of car", "realistic actors", "use real colors" | | 19 | Ego Lane Inference from Camera | workflow-19-ego-lane-inference.md | "which lane am I in", "predict lane index", "ego lane", "lane count", auto-fires before startLaneIdx question in Step 7 when vision is available |

Related references (not workflows): visualization-patterns.md — full code for camera-playback video saving (loaded after Rule 2 decision). osm-flat-scene-gotchas.md — common pitfalls on OSM flat scenes (Z handling, importScene options, stale sim, image-frame datasets).

STOP — Common Agent Failures (check BEFORE writing code)

  1. Missing enableOverlapGroupsOptions(IsEnabled=false) on importScene for RRHD
  2. Skipping lane localization when scene=OSM + Raw GPS + camera (REQUIRED per matrix)
  3. Skipping comparison video gate before reporting task complete
  4. Exporting ego to RoadRunner BEFORE importing roads (OSM scene must exist first)
  5. Using importScene on a saved .rrscene — use openScene(rrApp, file) instead (importScene requires a format string and is for RRHD/OpenDRIVE)
  6. Rebuilding CameraData without SensorParameters= — loses intrinsics, silently downgrades Mode 1 → Mode 3
  7. Comparison video uses raw camera on left — use the track-overlaid video (or BEV+Camera) when available

Mandatory Execution Order (evaluate BEFORE writing code)

When the prompt is "generate scenario from data" (short or long), execute in this order:

  1. addpath(scripts/) — skill helper functions (openFile, plotActorCircles, etc.)
  2. Load data → create objects → Rule 5 timestamp scale detection + normalize
  3. Plot GPS + trajectory side-by-side (VALIDATION — confirm data loaded correctly)
  4. Camera validation video (Rule 2 decision tree) → questdlg popup (BEFORE any RR export)
  5. Multi-GPS gate (if >1 GPS series) → compare video → ASK which series
  6. Establish scene: OSM download + importScene WITH enableOverlapGroupsOptions(IsEnabled=false) — Roads MUST exist before any exportToRoadRunner call
  7. Build ego trajectory → localization decision matrix (Rule 4 Step 7) — OSM + Raw GPS + camera = REQUIRED, no ASK needed — Otherwise: ASK or Skip per matrix
  8. Export ego + actors to RoadRunner (no Orientation=, flatten Z on flat scenes, preserve Orientation= on ego rebuild)
  9. Simulate (`setCamer

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryAutomation
Updated2mo ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium
matlab-use-scenario-builder — Universal Skill: Install & Safety Check | SkillAgent