roadrunner-build-scenario-from-osc

Recreate RoadRunner scenarios programmatically from OpenSCENARIO 1.x files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Rebuilding a driving scenario from an OpenSCENARIO (.xosc) file in RoadRunner by hand is error-prone: positions must be translated from lane/road coordinates to world coordinates, parameter expressions and catalog references must be resolved, and phase logic topology must be preserved. This Skill interprets the .xosc file and produces a reviewed scenario description that is then built in RoadRunner via the roadrunner-scenario-authoring skill.

Core Features & Use Cases

  • OpenSCENARIO interpretation: Parses .xosc files, resolves parameter expressions and catalog references, and translates LanePosition, RoadPosition, and relative positions to world coordinates using the referenced .xodr file.
  • Phase logic reconstruction: Maps XOSC actions and conditions to RoadRunner API types, collapses placeholder Acts, and preserves serial/parallel topology and relative speed references.
  • Two-step reviewed workflow: Produces a structured scenario description for user approval, then delegates scene import and scenario building to dependent skills.
  • Use Case: A standards body provides a Euro NCAP test as a .xosc file; use this Skill to recreate the exact scenario in RoadRunner as a MATLAB-driven scenario without manually translating coordinates or triggers.

Quick Start

Recreate the scenario defined in my attached .xosc file as a RoadRunner scenario using this skill.

Frequently Asked Questions about roadrunner-build-scenario-from-osc

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

FAQPage Schema
How do I convert an OpenSCENARIO .xosc file to a RoadRunner scenario?

Provide the .xosc file and this Skill parses it, resolves parameters and catalog references, translates positions to world coordinates, and produces a scenario description. After your approval, it delegates building to the roadrunner-scenario-authoring skill.

How do I generate a MATLAB script from an OpenSCENARIO file?

This Skill interprets the .xosc file and produces a structured scenario description, then invokes the roadrunner-scenario-authoring skill which generates and executes the MATLAB code. It does not write MATLAB code directly.

Should I use this skill or RoadRunner's importScenario for .xosc files?

If you say "import" a .xosc file, use RoadRunner's built-in importScenario API directly, which works for simple cases. Use this Skill when you want programmatic reconstruction with full control over positions, phase logic, and relative references.

Does this skill support all OpenSCENARIO position types?

It supports WorldPosition, LanePosition, RoadPosition, RelativeObjectPosition, RelativeRoadPosition, and RelativeLanePosition, translating them to world coordinates via the referenced .xodr file. Unsupported constructs are explicitly flagged in the scenario description rather than silently omitted.

What are the limitations when recreating scenarios from OpenSCENARIO?

FollowTrajectoryAction and AssignRouteAction are only supported when their trigger chain resolves to t=0. TimeToCollisionCondition and lateral RelativeDistanceCondition are not supported by the RoadRunner API, and actor heading cannot be set since actors align with road direction.