roadrunner-scenario-authoring
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.
npx skills add matlab/matlab-agentic-toolkit --skill roadrunner-scenario-authoring --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Programmatically create RoadRunner scenarios from MATLAB: actors, routes, phase logic, and validation — all via roadrunnerAPI.
How it works
Follows a step-by-step workflow:
- Ensure an active RoadRunner session exists and set up MATLAB path to the skill scripts.
- Initialize a scenario with openScene, newScenario, and access API objects (roadrunnerAPI, Scenario, PhaseLogic, Project).
- Survey the scene to determine valid actor placement using helperSceneAwareness or HD Map exports.
- Add actors either in batch (recommended for multiple actors) or manually, creating assets and anchoring positions.
- Position actors with various anchoring options (scene anchors, autoAnchor, or relative anchoring to another actor).
- Create routes when needed to enforce path-following behavior for actors that require it.
- Build and modify phase logic: initialize phases, adjust actions (e.g., ChangeSpeedAction, ChangeLaneAction), and set end conditions on phases (e.g., LongitudinalDistanceToActorCondition).
- Validate the scenario with validate(rrs) and provide a summary of created elements without simulating unless requested.
- The workflow emphasizes not simulating by default and ensuring each actor has proper routes and anchoring as required.
When to use it
- When adding actors (vehicles, pedestrians, objects) to a RoadRunner scenario
- When creating routes and waypoints for actors
- When building scenario logic: phases, conditions, actions
- When authoring patterns like cut-in, pedestrian crossing, lead-follow, or emergency brake
- When placing actors on roads using anchor-based or HD Map positioning
- When validating scenario structure before simulation
What it can touch
Processes require the roadrunnerAPI and related MATLAB-based helpers documented in the skill. It uses MATLAB scripts and functions such as openScene, newScenario, ro RoadrunnerAPI, helperSceneAwareness, helperPlaceActors, getAnchors, findSceneAnchor, autoAnchor, addActor, InitialPoint, Route, setEndCondition, and validate.
Caveats
- Always set an Actor on ActorActionPhase and condition objects.
- Do not duplicate action types within a single phase.
- Character actors require routes; otherwise validation fails.
- Use proper anchoring proximity (autoAnchor requires within 5m of road surface).
- End conditions must be associated with phases and are not to be duplicated; use setEndCondition appropriately.
- Do not simulate unless explicitly requested by the user.
- Do not guess ambiguous prompts; present decomposition and physics analysis for confirmation before executing code.
- Lane-change actions require lane-following mode; routes should not be added to those actors.
- Route points should use autoAnchor; do not combine anchorToPoint with ForwardOffset on route points.
- For route creation, vehicles routes should set seg.Freeform = false to follow road geometry; do not disable freeform for pedestrians.
- Collision or timing outcomes are not claimed from the code alone; only simulation yields ground truth.
# RoadRunner Scenario Authoring Programmatically create RoadRunner scenarios from MATLAB: actors, routes, phase logic, and validation — all via `roadrunnerAPI`. ## When to Use - Adding actors (vehicles, pedestrians, objects) to a RoadRunner scenario - Creating routes and waypoints for actors - Building scenario logic: phases, conditions, actions - Authoring common patterns: cut-in, pedestrian crossing, lead-follow, emergency brake - Placing actors on roads using anchor-based or HD Map positioning - Validating scenario structure before simulation ## When NOT to Use - Connecting to or launching RoadRunner → use `roadrunner-core` - Building scenarios from recorded sensor data → use `matlab-scenario-builder` - Authoring road geometry (lanes, junctions) → use `roadrunner-rrhd-authoring` - Importing maps or scenes → use `roadrunner-import-scene` - Simulating or exporting scenarios → use `roadrunner-scenario-simulating` ## Workflow ### 1. Ensure Session Verify `rrApp` exists. If not, ensure RoadRunner is connected first (e.g., via `roadrunner-core` or manually). ```matlab if ~exist('rrApp', 'var') || ~isvalid(rrApp) error("No active RoadRunner session. Use the roadrunner-core skill."); en
- When to Use
- When NOT to Use
- Workflow
- 1. Ensure Session
- 2. Initialize Scenario
- 3. Scene Awareness
- 4. Add Actors
- 5. Position Actors (Anchoring)
- 6. Create Routes (When Needed)
- 7. Build Phase Logic
- 8. Validate and Report
- Scenario Decomposition
- Scenario Defaults (auto-created by RoadRunner)
- Hard Constraints
What does the roadrunner-scenario-authoring skill do?
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.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill roadrunner-scenario-authoring --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
