Generates Euro NCAP test scenarios and variants using the ADT Euro NCAP support package, including scenario translation, descriptor plotting, score computation, and report export.
Ships in automotive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create Euro NCAP seed scenarios, generate variants, translate between simulators, plot descriptors, and compute scores using the ADT Euro NCAP support package APIs.
variationProperties for non-NCAP scenariosUser wants Euro NCAP scenarios?
│
├─ Protocol year 2023 (or unspecified)?
│ └─ Use standalone: ncapScenario("SA AEB CCFtap")
│ - Test names use prefix: "SA AEB", "SA LSS", "VRU AEB", "VRU LSS"
│ - Supports ShowProgress name-value
│ - Returns ScenarioDescriptor
│
└─ Protocol year 2026?
└─ Use euroAssessment path:
1. ea = euroAssessment(2026)
2. configureVUT(ea, ...) — if custom VUT needed
3. descriptor = ncapScenario(ea, "CA FC CCFtap")
- Test names use prefix: "CA FC"
- Does NOT support ShowProgress
- Required for scoring/reporting workflow
| Function | Purpose | Available From |
|---|---|---|
ncapScenario | Generate seed descriptor(s) from test name | R2024a |
euroAssessment | Store 2026 protocol specs and scores | R2025a |
configureVUT | Set StabilizationTime, AssetPath on euroAssessment | R2026a |
getScenario | Convert descriptor → drivingScenario or RoadRunner | R2022b |
getScenarioDescriptor | Extract descriptor from existing drivingScenario | R2022b |
generateVariants | Generate variant descriptors from seed + variationProperties | R2023a |
plot (ScenarioDescriptor) | Plot descriptor(s), returns ScenarioDescriptorPlot | R2026a |
configure (ScenarioDescriptorPlot) | Set GridSize, Title, SubPlotTitles, CropType | R2026a |
assessmentTable | Create empty assessment table for a test | R2025a |
ncapScore | Compute score from assessment table (returns struct) | R2025a |
ncapReport | Generate visual report figure | R2025a |
exportReport | Export report to PDF/PNG/JPG file | R2026a |
table2scenario | Create ScenarioDescriptor from tabular data (sceneSpec, actorSpec, eventSpec) | R2024a |
exportScenario (roadrunner) | Export from RoadRunner to OpenSCENARIO | R2022a |
Use when you need just the seed scenario (1 descriptor), not all variants.
% 2023 standalone — single seed
descriptor = ncapScenario("SA AEB CCFtap");
% 2026 via euroAssessment — single seed
ea = euroAssessment(2026);
descriptor = ncapScenario(ea, "CA FC CCFtap");
AllScenarios=true generates the seed AND all protocol-defined variants. Do NOT use it when only the seed is requested.
Output arguments: The two-output form [descriptors, scenarioInfo] = ncapScenario(...) requires AllScenarios=true. Without it, only one output is allowed — requesting two outputs errors with "Too many output arguments".
Use when the user wants all test variants for a given scenario.
% 2023 — all variants with progress
[descriptors, scenarioInfo] = ncapScenario("SA AEB CCCscp", AllScenarios=true);
% 2026 — all variants
ea = euroAssessment(2026);
[descriptors, scenarioInfo] = ncapScenario(ea, "CA FC CCCscp", AllScenarios=true);
The ShowProgress name-value controls built-in progress display during generation.
% Show command-line progress (default behavior)
descriptor = ncapScenario("SA AEB CCRs", ShowProgress="CommandLine");
% Suppress progress
descriptor = ncapScenario("SA AEB CCRs", ShowProgress="No");
Important: ShowProgress is only supported on the standalone ncapScenario(testName) call. It is NOT supported when using the euroAssessment overload ncapScenario(ea, testName).
When the user asks to "show progress" or "display progress", use ShowProgress="CommandLine" (or omit it since it's the default). Do NOT set ShowProgress="No" and then implement manual fprintf progress.
Use getScenario to translate a descriptor to either simulator. Never export to OpenSCENARIO and re-import as a translation method.
% Descriptor → drivingScenario
ds = getScenario(descriptor, Simulator="DrivingScenario");
% Descriptor → RoadRunner (requires active RoadRunner instance)
rrApp = roadrunner("C:/path/to/project");
rrScen = getScenario(descriptor, Simulator="RoadRunner", SimulatorInstance=rrApp);
Key rules:
getScenario requires Name-Value syntax. Simulator must be specified as a Name-Value pair, not a positional argument.Simulator="DrivingScenario": accepts an array of descriptors and returns an array of drivingScenario objects.Simulator="RoadRunner": accepts only a single descriptor per call — returns one Simulink.ScenarioSimulation object. Passing an array errors with "Too many input arguments". Loop over descriptors individually for batch RoadRunner translation.| Property | Values | Notes |
|---|---|---|
GridSize | [rows cols], max product = 20 | Error if > 20 subplots |
Title | string | Figure title |
SubPlotTitles | string array | Must match descriptor count exactly |
CropType | "None", "GlobalWaypoint", "DynamicWaypoint", "RuntimeActorsCrop" | Controls plot cropping |
sdp = plot(descriptors);
configure(sdp, Title="My Scenarios", GridSize=[3 4], ...
SubPlotTitles=["Variant 1", "Variant 2", "Variant 3"]);
ScenarioDescriptorPlot supports a maximum of 20 subplots per figure via GridSize. For larger arrays, split across multiple calls:
% Plot first 20
sdp1 = plot(descriptors(1:20));
configure(sdp1, Title="Variants 1-20", GridSize=[4 5]);
% Plot remaining
sdp2 = plot(descriptors(21:end));
configure(sdp2, Title="Variants 21-30", GridSize=[2 5]);
sdp = plot(descriptor);
play(sdp); % Animate the scenario
seek(sdp, 2.5); % Jump to t=2.5s
close(sdp); % Close figure
% 1. Create assessment object
ea = euroAssessment(2026);
% 2. Configure VUT (optional)
configureVUT(ea, StabilizationTime=2, AssetPath="Vehicles/SK_SUV.fbx");
% 3. Generate all variants
[descriptors, scenarioInfo] = ncapScenario(ea, "CA FC CCFtap", AllScenarios=true);
% 4. Create assessment table and populate results
% Column names are test-dependent — inspect with at.Properties.VariableNames
% Common columns: ImpactVelocity (CCFtap, CCCscp) or RelativeImpactVelocity (CCRs, CCRm, CCRb)
at = assessmentTable(ea, "CA FC CCFtap");
at.ImpactVelocity = zeros(height(at), 1); % Replace with actual sim results
% 5. Compute score (returns struct, not scalar)
[score, updatedTable] = ncapScore(ea, "CA FC CCFtap", at);
fprintf("Total score: %.2f / %.2f\n", score.AggregateScore.Total, score.AvailableScore.Total);
% 6. Generate report figure
fig = ncapReport(ea, "CA FC CCFtap");
% 7. Export report to file
exportReport(ea, "CA FC CCFtap", "ncap_report.pdf");
Use table2scenario to create a ScenarioDescriptor from user-defined tabular data. This is the programmatic entry point when you have scenario parameters in table form rather than using the predefined NCAP test definitions.
% Scene: straight road, 100m
sceneSpec = table(1, {'Straight'}, 100, 0, NaN, ...
VariableNames=["RoadElementID", "RoadElementType", "Length_Radius", ...
"DeltaHeading", "ParentIntersectionID"]);
% Actor: one car (Ego) on road 1, lane 1
actorSpec = table(1, 1, 1, {'Car'}, {'Ego'}, ...
{'4.7, 1.8, 1.4, 0.5, 0.9, 2.8'}, {'Along'}, {'10%, 50%'}, ...
VariableNames=["ActorID", "RoadID", "LaneID", "ActorType", ...
"ActorName", "Dimension", "Heading", "RelativePosition"]);
% Event: fixed velocity start at 15 m/s
eventSpec = table(1, 1, {'FixedVelocityStart'}, 15, NaN, NaN, ...
VariableNames=["EventID", "ActorID", "EventType", "Speed", ...
"Distance", "EventTrigger"]);
descriptor = table2scenario(sceneSpec, actorSpec, eventSpec);
Key rules:
sceneSpec columns: RoadElementID, RoadElementType, Length_Radius, DeltaHeading, ParentIntersectionIDactorSpec columns: ActorID, RoadID, LaneID, ActorType, ActorName, Dimension, Heading, RelativePositioneventSpec columns: EventID, ActorID, EventType, Speed, Distance, EventTriggerScenarioDescriptor — same type as ncapScenario outputgetScenario, plot, generateVariants% Configure export options
opts = openScenarioXMLExportOptions(RelocateVehicleOrigin=true);
% Export from RoadRunner
exportScenario(rrApp, "output.xosc", "OpenSCENARIO XML", opts);
See references/export-options.md for full export configuration details.
Critical: Euro NCAP test names must be specified in full. Short names like "CCFtap" or "CCCscp" are NOT valid.
| Protocol | Prefix Pattern | Example |
|---|---|---|
| 2023 standalone | "SA AEB ...", "SA LSS ...", "VRU AEB ...", "VRU LSS ..." | "SA AEB CCFtap" |
| 2026 euroAssessment | "CA FC ..." | "CA FC CCFtap" |
The short code (e.g., CCFtap, CCCscp, CCRs) is always the LAST part of the full name.
See references/ncap-test-names.md for the complete lookup table of all valid test names.
| Mistake | Why It's Wrong | Correct Approach |
|---|---|---|
ncapScenario("CCFtap") | Short names are not valid | ncapScenario("SA AEB CCFtap") |
ncapScenario("SA AEB CCFtap") for 2026 | Wrong prefix for 2026 protocol | ncapScenario(ea, "CA FC CCFtap") with ea = euroAssessment(2026) |
getScenario(d, "RoadRunner") | Positional arg not supported | getScenario(d, Simulator="RoadRunner", SimulatorInstance=rrApp) |
Setting ShowProgress="No" then using fprintf | Defeats built-in progress | Omit ShowProgress (default is "CommandLine") or set ShowProgress="CommandLine" |
Using AllScenarios=true for seed-only | Generates all variants unnecessarily | Omit AllScenarios for seed only |
| DSD export → OpenSCENARIO → importScenario for RR | Roundabout, breaks pedestrians | getScenario(d, Simulator="RoadRunner", SimulatorInstance=rrApp) |
Inventing VUTType or NcapYear params | These don't exist | Use configureVUT(ea, AssetPath=...) and euroAssessment(2026) |
ShowProgress with euroAssessment overload | Not supported on that overload | Only use with standalone ncapScenario(testName) |
[d, info] = ncapScenario(ea, name) without AllScenarios | "Too many output arguments" error | Use single output for seed, or add AllScenarios=true for two outputs |
configureVUT called AFTER ncapScenario | Silently has no effect — config not applied | Always call configureVUT BEFORE ncapScenario |
SubPlotTitles count ≠ descriptor count | "Invalid size of subplot titles" error | Provide exactly one title per descriptor |
CropType="tight" or other invented values | Invalid value error | Use: "None", "GlobalWaypoint", "DynamicWaypoint", or "RuntimeActorsCrop" |
plot(descriptors) with GridSize > [4 5] | Max 20 subplots per figure | Split array into chunks of ≤20 |
fprintf("%.2f", score) after ncapScore | score is a struct, not scalar | Access score.AggregateScore.Total for the numeric value |
exportReport(ea, name, "report.html") | HTML not supported | Use .pdf, .png, or .jpg extension |
at.ImpactVelocity = ... for CCRs/CCRm/CCRb tests | Column is RelativeImpactVelocity, not ImpactVelocity | Check at.Properties.VariableNames after assessmentTable — use the actual column name |
getScenario(descriptors, Simulator="RoadRunner", ...) with array | RoadRunner only accepts one descriptor at a time | Loop: for i=1:numel(descriptors), getScenario(descriptors(i), ...); end |
euroAssessment(2026) for any 2026-protocol workflow (scoring, reporting, configureVUT)ncapScenario(testName) for simple 2023 generation without scoringgetScenario for ALL simulator translations — never export+reimportexportReport (R2026a) for file export — do not write custom report export codeexportScenario (roadrunner method) for OpenSCENARIO export from RoadRunnerRelocateVehicleOrigin=true in export options when rear axle reference is neededCopyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/automotive:matlab-use-ncap-protocolfrom automotive
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin automotive9 skills in this plugin
/matlab-cosimulate-sumo-simulinkBuild Simulink models that co-simulate with Eclipse SUMO traffic simulator. Use when creating SUMO-Simulink co-simulation, traffic simulation, TraCI connection, vehicle-in-the-loop testing, or ADAS scenario validation with SUMO. Covers Server/Client setup, Reader/Writer/Actor block configuration, random traffic generation, ego vehicle control, and SUMO file creation. Also use when the user mentions SumoInterfaceLibrary, .sumocfg files, or wants to connect Simulink to an external traffic simulator.
/matlab-fit-tire-modelFit a tire model (Magic Formula 6.2/5.2/5.1, Dugoff, or Fiala) to measured tire force and moment data using the Vehicle Dynamics Blockset Extended Tire Features API (tireData.import, tireModel.new, tireModel.fit, tireModel.export). Use when fitting, parameterizing, or calibrating a tire model from tire measurement data (TYDEX, Calspan, MTS, or text/CSV from any test source), creating a .tir file, or building a Magic Formula tire model from test data. Also use for the individual steps: importing TYDEX, Calspan, MTS, or CSV tire data (file extensions `.tdx` for TYDEX; `.data`, `.tim`, `.rsp` for MTS; any other extension read as text) into a tireData object, exporting a tire model to .tir, inspecting, smoothing, cropping, or plotting tire measurement data or a model's response, or converting a fitted model to another type.
/matlab-import-driving-dataImport recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-use-scenario-builder./matlab-use-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, 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./roadrunner-author-scenarioCreate and edit RoadRunner scenarios in MATLAB with roadrunnerAPI: add actors, routes and phase logic, validate and repair a scenario, or recreate an OpenSCENARIO 1.x (.xosc) file as an editable scenario. Use when building a RoadRunner scenario from a description (cut-in, pedestrian crossing, lead-follow and similar), fixing one that fails validation, or rebuilding, recreating or converting a .xosc file in MATLAB. Do NOT use when the user says "import" a .xosc file — call importScenario instead. Not for exporting to OpenSCENARIO, simulation (use roadrunner-simulate-scenario), recorded sensor data (use matlab-use-scenario-builder), Euro NCAP protocol tests (use matlab-use-ncap-protocol), drivingScenario/Driving Scenario Designer scenarios, or OpenSCENARIO 2.x (.osc) files. Triggers on: roadrunnerAPI, RoadRunner scenario authoring, add actor, create route, phase logic, cut-in scenario, pedestrian crossing, scenario from MATLAB, OpenSCENARIO, xosc to MATLAB, recreate xosc.
/roadrunner-build-rrhd-mapBuild, convert, and import RoadRunner HD Maps (.rrhd) in MATLAB. Author lanes, lane boundaries, markings, junctions, signs, barriers, and speed limits with roadrunnerHDMap; convert Lanelet2 (.osm, Autoware) maps to RRHD; resolve RoadRunner road asset paths for markings, crosswalks, signs, signals, and barriers; and import or build .rrhd or OpenDRIVE (.xodr) files into a RoadRunner scene. Use when creating road networks for driving simulation, converting Lanelet2 or other HD map sources to RRHD, looking up road asset paths, or loading and verifying a map in RoadRunner or RoadRunner Scene Builder. Not for building scenes from recorded sensor data, running simulations, or recreating OpenSCENARIO (.xosc) scenarios.
Other plugins' skills for the same job