Skip to content

zrwangems/dsh-zrwang-plugin / skills/engineering/matlab/automotive/roadrunner-scenario-authoring

roadrunner-scenario-authoring

Verified

Programmatically 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.

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.

----
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall