zrwangems/dsh-zrwang-plugin / skills/engineering/matlab/automotive/roadrunner-scenario-authoring
roadrunner-scenario-authoring
VerifiedProgrammatically author RoadRunner scenarios from MATLAB using roadrunnerAPI. Use when adding actors, creating routes, building scenario logic (phases, conditions, actions), placing vehicles/pedestrians, defining cut-in/crossing/ follow scenarios, or any programmatic scenario creation in RoadRunner. Triggers on: roadrunnerAPI, scenario authoring, add actor, create route, phase logic, cut-in scenario, pedestrian crossing, scenario from MATLAB.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 26.5 KB |
| manifest.yaml | config | 540 B |
| references/actions-and-conditions.md | markdown | 11.6 KB |
| references/asset-catalog.md | markdown | 4.2 KB |
| references/collision-utility.md | markdown | 3.2 KB |
| references/lane-connectivity.md | markdown | 4.5 KB |
| references/physics-first-design.md | markdown | 6.2 KB |
| references/routes-and-points.md | markdown | 6.7 KB |
| references/scenario-templates.md | markdown | 16.4 KB |
| references/scene-awareness.md | markdown | 5.0 KB |
| scripts/helperAnalyzeHDMapLanes.m | other | 7.5 KB |
| scripts/helperClassifyRoadFeatures.m | other | 15.3 KB |
| scripts/helperGetPositionFromHDMap.m | other | 6.5 KB |
| scripts/helperPlaceActors.m | other | 5.8 KB |
| scripts/helperSceneAwareness.m | other | 11.3 KB |
| scripts/helperSurveyLanes.m | other | 3.0 KB |
scripts/helperSurveyLanes.m
View on GitHubfunction laneTable = helperSurveyLanes(rrHDMap, options)
%helperSurveyLanes Filter and sort lanes from an HD Map by type, direction, and length.
%
% laneTable = helperSurveyLanes(rrHDMap)
% laneTable = helperSurveyLanes(rrHDMap, LaneType="Sidewalk", MinLength=50)
%
% Returns a table sorted by length descending with columns:
% Index, LaneID, Length, Direction, LaneType, StartPos, EndPos
%
% This is a helper function for example purposes and may be removed or
% modified in the future.
arguments
rrHDMap
options.LaneType (1,1) string = "Driving"
options.MinLength (1,1) double = 0
options.TravelDirection (1,1) string = ""
options.LaneIDs (:,1) string = ""
end
% Build lane ID filter set (empty means no filter)
laneIDFilter = options.LaneIDs(options.LaneIDs ~= "");
hasLaneIDFilter = ~isempty(laneIDFilter);
allLanes = rrHDMap.Lanes;
indices = [];
laneIDs = {};
lengths = [];
directions = {};
laneTypes = {};
startPositions = {};
endPositions = {};
filtIdx = 0;
for i = 1:numel(allLanes)
lane = allLanes(i);
if hasLaneIDFilter && ~ismember(string(lane.ID), laneIDFilter)
continue;
end
if ~strcmpi(lane.LaneType, options.LaneType)
continue;
end
if options.TravelDirection ~= "" && ~strcmpi(lane.TravelDirection, options.TravelDirection)
continue;
end
geom = lane.Geometry;
if size(geom, 1) < 2
continue;
end
if size(geom, 2) == 2
geom = [geom, zeros(size(geom, 1), 1)]; %#ok<AGROW>
end
laneLen = sum(sqrt(sum(diff(geom).^2, 2)));
if laneLen < options.MinLength
continue;
end
filtIdx = filtIdx + 1;
indices(end+1) = filtIdx; %#ok<AGROW>
laneIDs{end+1} = string(lane.ID); %#ok<AGROW>
lengths(end+1) = round(laneLen, 2); %#ok<AGROW>
directions{end+1} = string(lane.TravelDirection); %#ok<AGROW>
laneTypes{end+1} = string(lane.LaneType); %#ok<AGROW>
startPositions{end+1} = geom(1, :); %#ok<AGROW>
endPositions{end+1} = geom(end, :); %#ok<AGROW>
end
if filtIdx == 0
warning("helperSurveyLanes:NoLanes", ...
"No lanes found matching filters (LaneType=%s, Direction=%s, MinLength=%.1f).", ...
options.LaneType, options.TravelDirection, options.MinLength);
laneTable = table();
return;
end
laneTable = table( ...
indices(:), ...
vertcat(laneIDs{:}), ...
lengths(:), ...
vertcat(directions{:}), ...
vertcat(laneTypes{:}), ...
vertcat(startPositions{:}), ...
vertcat(endPositions{:}), ...
'VariableNames', {'Index', 'LaneID', 'Length', 'Direction', 'LaneType', 'StartPos', 'EndPos'});
laneTable = sortrows(laneTable, 'Length', 'descend');
laneTable.Index = (1:height(laneTable))';
end
% Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |