
Roadrunner Scenario Simulating
Expert guidance for simulating RoadRunner scenarios via the MATLAB programmatic API and...
Install
npx skills add matlab/matlab-agentic-toolkit --skill roadrunner-scenario-simulating -g -a claude-code -y- Repository
- matlab/matlab-agentic-toolkit1.2k
- Category
- Writing
- Updated
- 9d ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Expert guidance for simulating RoadRunner scenarios via the MATLAB programmatic API and Simulink co-simulation. Use when the user wants to run a simulation, step through a simulation, control actors during co-simulation, add observers, attach sensors, retrieve simulation logs, or read/write scenario variables. Covers simulateScenario, createSimulation, ScenarioSimulation set/get, ActorSimulation getAttribute/setAttribute, addObserver, SensorSimulation, Simulink co-sim blocks, and publishActorBehavior. NOT for project setup, scene building, scenario authoring, or trajectory export.
RoadRunner Scenario Simulation
Simulate RoadRunner scenarios, step through simulations, control actors in co-simulation, add observers, attach sensors, and retrieve results, from MATLAB and Simulink.
When to Use
- User wants to run a RoadRunner scenario simulation
- User wants to step through a simulation frame-by-frame
- User wants to control an actor externally (co-simulation)
- User wants to observe simulation state (read-only monitoring)
- User wants to add sensors and read target poses or lane boundaries
- User wants to retrieve simulation logs programmatically
- User wants to read or write scenario variables
- User asks about co-simulation with Simulink
- User asks about publishing actor behaviors
When NOT to Use
- Launching or connecting to RoadRunner
- Authoring scenarios (adding actors, paths, behaviors in the editor)
- Building or editing scenes (roads, terrain, assets)
- Exporting actor trajectories to CSV, use
exportActorTrajectoryToCSVdirectly - Working with
drivingScenario(that is a DIFFERENT toolbox, Automated Driving Toolbox)
Critical: Do NOT Confuse With drivingScenario
drivingScenario (from Automated Driving Toolbox) is a MATLAB-native scenario tool.
RoadRunner Scenario simulation uses completely different APIs on the roadrunner object.
Never mix these two, they are unrelated.
Decision Tree
User wants to simulate →
├── Just run to completion? → Workflow A (simulateScenario)
├── Need step control OR programmatic log? → Workflow B (createSimulation)
├── Need to read actor state during sim? → Workflow C (getAttribute)
├── Need external actor control? →
│ ├── From MATLAB? → Workflow D (System object co-sim)
│ └── From Simulink? → Workflow E (Simulink blocks)
├── Need read-only monitoring? → Workflow F (Observers)
└── Need sensor data during sim? → Workflow G (SensorSimulation)
