roadrunner-scenario-authoring

Author RoadRunner driving scenarios programmatically from MATLAB using roadrunnerAPI.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill roadrunner-scenario-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: roadrunner-scenario-authoring
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/automotive/roadrunner-scenario-authoring
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill roadrunner-scenario-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Building RoadRunner driving scenarios by hand through the GUI is slow and error-prone, and programmatic authoring with roadrunnerAPI involves many subtle rules around actor placement, anchoring, routes, and phase logic that are easy to get wrong.

Core Features & Use Cases

  • Actor and Route Authoring: Add vehicles, pedestrians, and props, anchor them to lanes via HD Map queries or autoAnchor, and build routes with waypoints and curve configuration.
  • Phase Logic Construction: Create sequential and parallel phases with actions (ChangeSpeedAction, ChangeLaneAction, gap-keeping) and trigger conditions (distance, time, speed, collision).
  • Physics-First Design and Validation: Derive speeds, gaps, and trigger timing kinematically before coding, then validate the scenario structure with validate(rrs).
  • Use Case: Create a cut-in scenario where a target vehicle merges in front of a faster ego vehicle, with a distance-based trigger and verified lane-change safety margins, all generated from MATLAB code.

Quick Start

Ask your AI agent to create a RoadRunner cut-in scenario with an ego vehicle and a target vehicle on adjacent lanes using the roadrunner-scenario-authoring skill.

Frequently Asked Questions about roadrunner-scenario-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a RoadRunner scenario programmatically from MATLAB?

Use roadrunnerAPI to get the Scenario object, add actors with addActor, anchor them with autoAnchor, then build phase logic with addPhaseInSerial, setEndCondition, and addAction. Finish by calling validate(rrs) to check the scenario structure.

How do I add a pedestrian crossing scenario in RoadRunner?

Load a character asset with getAsset using the CharacterAsset type, place it via HD Map position, and add a route with waypoints in the perpendicular crossing direction computed from the road heading. Character actors always require routes or validation fails.

Why does ChangeLaneAction not work on my RoadRunner actor?

ChangeLaneAction only works in lane-following mode, meaning the actor must have no route waypoints. If the actor has a route, it is in path-following mode and lane changes are ignored; remove the route to enable lane changes.

Why does my distance trigger condition never fire in RoadRunner?

LongitudinalDistanceToActorCondition only fires when the two actors have different speeds, because the gap must change over time. Also verify the initial separation exceeds the trigger distance, otherwise the condition fires immediately.

What MATLAB and RoadRunner versions are required for roadrunnerAPI scenario authoring?

The scenario authoring functions such as roadrunnerAPI, addActor, and setEndCondition require MATLAB R2025a or later with RoadRunner, RoadRunner Scenario, and Automated Driving Toolbox installed. Some actions like SynchronizeAction require R2026a.

When should I not use programmatic scenario authoring in RoadRunner?

Do not use it for connecting to RoadRunner, authoring road geometry, importing maps, or simulating scenarios, as those are separate workflows. Head-on collisions are also unsupported because LaneOffset must be positive.