Agent skill · Backend & API

matlab-cosimulate-sumo-simulink

Build Simulink models that co-simulate with Eclipse SUMO traffic simulator. Use when creating SUMO-Simulink co-simulation, traffic simulation, TraCI connection, vehicle-in-the-loop testing, or ADAS scenario validation with SUMO. Covers Server/Client setup, Reader/Writer/Actor block configuration, random traffic generation, ego vehicle control, and SUMO file creation. Also use when the user mentions SumoInterfaceLibrary, .sumocfg files, or wants to connect Simulink to an external traffic simulator.

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
npx skills add matlab/matlab-agentic-toolkit --skill matlab-cosimulate-sumo-simulink --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 19 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Path: skills-catalog/automotive/matlab-cosimulate-sumo-simulink/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides the construction of a Simulink model that runs a synchronized co-simulation with Eclipse SUMO. It uses the SumoInterfaceLibrary blocks to implement a SUMO Server and Client, connect to SUMO via TraCI, and manage Readers, Writers, and Actor blocks for vehicle state, traffic generation, and ego-vehicle control. It covers spawning/removing vehicles, random traffic, and SUMO file creation and configuration, including using SumoInterfaceLibrary blocks for visualization, and handling SUMO files like .sumocfg and .rou.xml when connected to an external traffic simulator.

How it works

  • Establishes a SUMO Server block configured with ServerFile (.sumocfg), ServerPort, ServerNumClients, EnablePacing, PacingRate, and SampleTime; and a SUMO Client block with ClientAddress, ClientPort, ClientOrder, and SampleTime. The ClientPort must match the ServerPort, and pacing should be enabled to keep the simulation in sync.
  • Provides a preferred construction path using SATK (if available) to auto-layout and reference newly-added blocks; otherwise, it falls back to add_block/add_line operations expressed in a single JSON payload.
  • Guides preparing SUMO scenario files: prompts for a .sumocfg, optionally generates a basic network.net.xml with netgenerate, and explains minimal route file rules and OpenDRIVE import via netconvert.
  • Describes patterns for adding Readers, Writers, and Actors inside Enabled Subsystems, including gating for delayed-spawn vehicles and ensuring vehicle existence before reading/writing vehicle topics.
  • Details the block parameters for various topics (Vehicle, Simulation, Visualization) and how to wire them (e.g., Speed, Position, ID lists, Track Vehicle visualization).
  • Provides examples for single-shot triggers, ego-vehicle control approaches, dynamic spawning with distinct routes, and spawn-then-teleport workarounds for Position-based spawning.
  • Documents known issues and workarounds, notably SUMO_HOME trailing separator handling and SpawnMethod='Position' edge-case handling.

When to use it

  • When building a Simulink model that connects to Eclipse SUMO.
  • When setting up traffic co-simulation for ADAS/AD controller testing.
  • When reading vehicle states from SUMO into Simulink or sending control commands from Simulink to SUMO.
  • When spawning/removing vehicles dynamically and generating random traffic without route files.

What it can touch

  • SUMO Server and Client blocks from Sum oInterfaceLibrary
  • Reader and Writer blocks for vehicle topics (Speed, Position, Position3D, Acceleration, Angle, ID lists, etc.)
  • Visualization Writer blocks (e.g., Track Vehicle, Schema) with one-shot Enabled Subsystems
  • Actor blocks for spawning vehicles with attributes like departLane, departSpeed, and routeID
  • MATLAB commands for preparing SUMO scenarios and model-building steps

Caveats

  • SUMO-related actions assume prerequisites: Eclipse SUMO installed with SUMO_HOME set, and the Automated Driving Toolbox Interface for Eclipse SUMO Traffic Simulator support package installed.
  • Writers/Readers crash if the target vehicle does not exist; gate them in Enabled Subsystems for delayed-spawn vehicles.
  • SpawnMethod='Position' is reported as broken; workaround provided via a spawn-then-teleport pattern.
  • The knowledge notes that a trailing separator on SUMO_HOME is required on Windows to avoid launch failures.
From the SKILL.md

# Build SUMO-Simulink Co-simulation Create Simulink models that run synchronized co-simulation with Eclipse SUMO using the `SumoInterfaceLibrary` blocks from the Automated Driving Toolbox Interface for Eclipse SUMO Traffic Simulator. ## When to Use - Building a Simulink model that connects to Eclipse SUMO - Setting up traffic co-simulation for ADAS/AD controller testing - Reading vehicle states (position, speed) from SUMO into Simulink - Controlling an ego vehicle in SUMO from a Simulink controller - Spawning or removing vehicles dynamically during simulation - Generating random background traffic without writing route files ## When NOT to Use - Pure SUMO simulation without Simulink (use SUMO's CLI or Python TraCI directly) - Vehicle dynamics modeling (use Vehicle Dynamics Blockset) - Scenario design with Driving Scenario Designer (different workflow) ## Prerequisites 1. **Eclipse SUMO installed** with `SUMO_HOME` environment variable set 2. **Support package installed**: "Automated Driving Toolbox Interface for Eclipse SUMO Traffic Simulator" 3. **Windows: append trailing separator to `SUMO_HOME`** — The Server block's launcher concatenates `SUMO_HOME + "bin\..."` without a separa

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Prerequisites
  4. Preferred Construction Path
  5. Workflow
  6. Idempotent Build Template
  7. 1. Prepare SUMO Scenario Files
  8. 2. Create Server and Client
  9. 3–6. Add Readers, Writers, Actors, Save and Run
  10. Block Reference
  11. Server Block
  12. Client Block
  13. Reader Block — Vehicle Topics
  14. Reader Block — Simulation Topics (no input port)
Ships with 1 file
  • manifest.yaml
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-cosimulate-sumo-simulink skill do?

Build Simulink models that co-simulate with Eclipse SUMO traffic simulator. Use when creating SUMO-Simulink co-simulation, traffic simulation, TraCI connection, vehicle-in-the-loop testing, or ADAS scenario validation with SUMO. Covers Server/Client setup, Reader/Writer/Actor block configuration, random traffic generation, ego vehicle control, and SUMO file creation. Also use when the user mentions SumoInterfaceLibrary, .sumocfg files, or wants to connect Simulink to an external traffic simulator.

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-cosimulate-sumo-simulink --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.

Keep going