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 |
references/collision-utility.md
View on GitHub# Collision Utility Reference
Configures collision analysis between two specific actors. Access via `scnro.CollisionUtility`.
## Properties
| Property | Type | Description |
|----------|------|-------------|
| `Actor1` | Vehicle | First actor (typically ego) |
| `Actor2` | Vehicle | Second actor (target) |
| `Actor1CoordinateSystem` | string | Collision point mode for actor 1 |
| `Actor2CoordinateSystem` | string | Collision point mode for actor 2 |
| `Actor1CollisionPoint` | numeric | Normalized bounding box location [0, 4) |
| `Actor2CollisionPoint` | numeric | Normalized bounding box location [0, 4) |
| `Actor1CollisionPointOffset` | [x, y] | Origin-relative offset for actor 1 |
| `Actor2CollisionPointOffset` | [x, y] | Origin-relative offset for actor 2 |
| `Result` | struct | Collision time, wait actor, wait duration, step size (read-only) |
| `ComputedActor1CollisionPointWorldCoord` | [x y z] | Actor 1 collision point after simulation (read-only) |
| `ComputedActor2CollisionPointWorldCoord` | [x y z] | Actor 2 collision point after simulation (read-only) |
| `ComputedCollisionPointDistance` | numeric | Distance between collision points after simulation (read-only) |
## CollisionPointCoordinateSystem Enum
| Value | Description |
|-------|-------------|
| `"normalizedCollisionPoint"` | Normalized coordinates [0-4) around bounding box perimeter |
| `"vehicleOriginOffset"` | x, y offset from vehicle origin |
### Normalized Collision Point Reference
The bounding box perimeter is parameterized from 0 to 4:
- `0.0` — rear center
- `1.0` — right center
- `2.0` — front center
- `3.0` — left center
- Values between represent interpolated positions along edges
## Usage Pattern
```matlab
% Configure collision analysis for a cut-in scenario
cu = scnro.CollisionUtility;
cu.Actor1 = ego;
cu.Actor2 = target;
% Monitor front-center of ego vs rear-center of target
cu.Actor1CoordinateSystem = "normalizedCollisionPoint";
cu.Actor1CollisionPoint = 2.0; % Front-center of ego
cu.Actor2CoordinateSystem = "normalizedCollisionPoint";
cu.Actor2CollisionPoint = 0.0; % Rear-center of target
% After simulation, read results:
% cu.Result contains collision timing information
% cu.ComputedCollisionPointDistance gives final distance
```
## When to Use CollisionUtility
- **Pre-simulation analysis** — determine if/when actors will collide given their paths
- **Specific impact point monitoring** — track exact collision locations on vehicles
- **Safety margin verification** — check distances between specific points on actors
**Note:** This is separate from `CollisionCondition` (which is a phase trigger). CollisionUtility provides analytical data; CollisionCondition triggers scenario failure.
## Relationship to CollisionCondition
| Feature | CollisionCondition | CollisionUtility |
|---------|-------------------|-----------------|
| Purpose | Trigger phase end/scenario fail | Analyze collision details |
| When used | During scenario authoring (phase logic) | For detailed analysis configuration |
| Output | Boolean (collision happened) | Timing, positions, distances |
| Set via | `setEndCondition` / `setFailCondition` | Direct property assignment |
----
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 |