Build, convert, and import RoadRunner HD Maps (.rrhd) in MATLAB. Author lanes, junctions, signs, barriers; convert Lanelet2 (.osm) maps to RRHD; resolve asset paths; import .rrhd or OpenDRIVE (.xodr) into a RoadRunner scene.
Ships in automotive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build RoadRunner HD Map (.rrhd) content with the roadrunnerHDMap API, convert Lanelet2 maps to RRHD, resolve asset paths, and import the result into a RoadRunner scene. Pick the workflow from the router below and load only the references it lists.
.osm file (with type=lanelet relations) to .rrhd.rrhd or OpenDRIVE .xodr file into a RoadRunner sceneroadrunner.hdmap.* property names or constructor syntax, alignment (green grass), missing assets, validateRRHD or enforcement-gate failures; check Critical API Gotchas firstroadrunner-manage-projectroadrunner-author-scenarioroadrunner-simulate-scenariomatlab-use-scenario-builder.xosc) file — use roadrunner-author-scenario (this skill only imports the .xodr scene it references)roadrunner-author-scenario (this skill covers crosswalk markings).net.xml, .sumocfg) or OpenDRIVE for Eclipse SUMO co-simulation — use matlab-cosimulate-sumo-simulinkhighway=* ways, no type=lanelet relations) — not supported; to build roads from OpenStreetMap with recorded GPS data, use matlab-use-scenario-builder*.rg.osm, only routing_cost ways, no relations) — no geometry to convertmatlab-create-uav-scenarioroadrunner.hdmap API (indexing, dimension mismatch in your own code) — use matlab-debug-code| User intent | Workflow | Load |
|---|---|---|
| Build RRHD from scratch | Author | authoring/* + assets/* |
Convert Lanelet2 .osm → .rrhd | Convert | lanelet2/* → authoring/* → assets/* |
| Resolve an asset path only | Assets | assets/* |
Import / build .rrhd or .xodr in RoadRunner | Import | import/* |
| End-to-end Lanelet2 → RoadRunner scene | Convert, then Import | lanelet2/* → authoring/* → assets/* → import/* |
.m files and run with run_matlab_file; edit on error. Exception: the user asks to "show the pattern" or "do not execute".rrMap = roadrunnerHDMap; first — loads the roadrunner.hdmap.* namespace.roadrunner.hdmap.* classes — use Name=Value (RelativeAssetPath(AssetPath=...), AlignedReference(Reference=..., Alignment=...)) or create-then-assign.ClassName.empty, never [].Alignment="Backward". Keep source elevation (never flatten Z)."Forward".write() and before importScene.Assets/; extension selects the style (.rrlms, .rrcws, .rrpms, .rrext, signs .svg_rrx or .svg). Resolve signs with resolveSignAsset and pass ProjectFolder to verify assets exist.rrApp from roadrunner-manage-project; copy the file into the project folder, use ImportStep="Load" by default, never hardcode asphalt detection, and preserve junctions when the map has them (OSM-derived maps from matlab-use-scenario-builder follow that skill's overlap-group default instead).| Wrong | Correct |
|---|---|
LeftBoundary / RightBoundary | LeftLaneBoundary / RightLaneBoundary (AlignedReference) |
RelativeAssetPath("path") | RelativeAssetPath(AssetPath="path") |
AlignedReference(ref, "Forward") | AlignedReference(Reference=ref, Alignment="Forward") |
lane.Predecessors = [] | lane.Predecessors = roadrunner.hdmap.AlignedReference.empty |
Junction.Geometry = polygon | wrap in MultiPolygon; ring property is ExteriorRing |
MarkingReference.MarkingID = 5 | MarkingID takes a Reference object |
pa.StartFraction / EndFraction | pa.Span = [0 1] |
cm.CurveMarkingTypeID, b.BarrierTypeID | MarkingTypeReference, BarrierTypeReference |
Sign.BoundingBox, bb.Position | Sign.Geometry = GeoOrientedBoundingBox with Center, Dimension, GeoOrientation |
GeoOrientation = [headingDeg 0 0], full-size Dimension | GeoOrientation = [roll pitch heading] in radians; Dimension = half-lengths |
SpeedLimit.Speed, Unit="KPH" | Value (int32), VelocityUnit="Kph" |
b = a; b.ID = "x" to copy an object | roadrunner.hdmap.* classes are handles — assignment shares the object; construct a new one to copy |
Full class/property table: references/authoring/apiReference.md. For classes or options not covered there, check help <class>, then matlab-read-documentation — do not guess property names.
detectJunctions for overlapping lanes, or junctionPolygon.md for hand-authored polygons. Closed loops / tracks: splitClosedGeometry.md, orthogonalSplit.md.validateRRHD), then write(rrMap, file).Run every step — the map is incomplete without junctions, curve markings, barriers, signs, and speed limits. Full step-by-step instructions, code constraints, and invariants: conversionPipeline.md.
| Step | Reference |
|---|---|
1. Parse OSM (parseOSM) | readOSM.md |
2. Validate format (type=lanelet present; reject standard OSM and routing graphs) | conversionPipeline.md |
| 3. Extract lanelets; discover ALL way and relation types | extractLanelets.md, discoverRelations.md |
4. Origin, projection, way geometry (geomMap); alignment and center lines | coordinates.md, extractGeometry.md |
| 5. Split closed roads | splitClosedRoads.md |
| 6. Topology (node matching, opposing filter, left-gap filter) | extractTopology.md, leftGapFilter.md |
7. Junctions — geometric, from overlapping lane footprints (detectJunctions, run in Step 9) | extractJunctions.md |
| 8. Semantics (markings, lane types, speed limits; crosswalks → CurveMarkings) | extractSemantics.md |
| 9. Build RRHD objects + non-lane elements | buildRRHD.md, extractNonLaneElements.md, placedObjects.md; signs via resolveSignAsset (signs.md) |
| 10. Post-process: snap, heights, dedup | snapEndpoints.md, resolveHeights.md, deduplicateBoundaries.md |
11. Enforcement gate, then write() | enforcementGate.md |
After writing, print unmapped element counts, then continue with Import into RoadRunner if the user wants to view the map.
Start with assetCatalog.md — extension rules, curve markings and crosswalks, signals, stencils, materials, default assets, region detection. Detailed tables:
| Element | Reference |
|---|---|
| Lane markings (incl. Japan/Germany variants) | laneMarkings.md |
| Signs (US MUTCD, German StVO, Japanese) | signs.md |
| Barriers and extrusions | barriers.md |
| Props and static objects | staticObjects.md |
| Lane types | laneTypes.md |
Requires a connected rrApp (from roadrunner-manage-project). Follow importScene.md: new scene → copy file into the project folder → enforcement gate → importScene with ImportStep="Load" → build only when asked. Choose build options (asphalt detection, junction preservation, bridges) from map content with buildOptions.md.
For one-off calls, use evaluate_matlab_code with project_path set to this skill's scripts/ folder. Generated .m files run with run_matlab_file execute in their own folder, so add the folder explicitly at the top and remove it at the end:
skillScripts = "<absolute path to this skill>/scripts";
addpath(skillScripts);
% ... generated pipeline ...
rmpath(skillScripts);
| Script | Inputs | Output | Example |
|---|---|---|---|
parseOSM | osmFile (string, Lanelet2 .osm) | ll2 struct: .nodes, .ways, .relations (containers.Map), .sourceFile | ll2 = parseOSM("map.osm"); |
discoverWayTypes | ways (containers.Map from parseOSM) | discovery struct of way buckets (stop lines, markings, barriers, signs, lights, unmapped); each way carries .wayID | d = discoverWayTypes(ll2.ways); |
detectAlignment | centerGeom, leftBndGeom, rightBndGeom (Nx3) | [leftAlignment, rightAlignment] ("Forward"/"Backward") | [la, ra] = detectAlignment(c, L, R); |
snapConnectedEndpoints | lanes, laneBoundaries, optional threshold (m, default 1.0) | [lanes, laneBoundaries, snapCount] | [ln, lb, n] = snapConnectedEndpoints(ln, lb); |
resolveHeightConflicts | lanes, laneBoundaries, optional zStep (m, default 0.15), MinSeparation= (m, default 2.0), JunctionLaneIDs= (skip crossings inside junctions) | [lanes, laneBoundaries, info] — info.nComponents, .nConflicts, .nZLevels, .maxZ, .lanesAdjusted; offsets are added to source Z | [ln, lb, info] = resolveHeightConflicts(ln, lb); |
resolveSignAsset | rawCode (string), region ("Japan"/"Germany"/"US"), optional ProjectFolder= | [assetPath, objectType, code, isFallback] — objectType "sign"/"signal"; unrecognized codes → blank sign | [p, t] = resolveSignAsset("jp_330-A", "Japan"); |
detectClosedLoop | rrMap (roadrunnerHDMap), optional MinLoopLength= (m, default 100), MinRingLength= (m, default 30) | [hasClosedLoop, info] — info.reason, .loopLanes, .loopLength, .nRings (roundabouts) | [tf, info] = detectClosedLoop(m); |
detectJunctions | lanes, laneBoundaries, optional MinOverlapArea= (0.01), MinOverlapFraction= (0), MinJunctionArea= (15), DropDivergeMerge= (false), MergeGap= (1 m), SideBySideLength= (4 m) | [junctions, info] — Junction array (union of member lane footprints); info.laneCounts, .areas, .centers, .junctionLaneIDs | [J, info] = detectJunctions(lanes, laneBoundaries); |
validateRRHD | rrMap (roadrunnerHDMap) | report struct: .errors, .warnings, .isValid | r = validateRRHD(rrMap); |
| Function | Purpose |
|---|---|
roadrunnerHDMap, read, write | Create, read, and write HD Map objects |
roadrunner.hdmap.Lane, LaneBoundary, LaneMarking, Junction | Core road entities |
roadrunner.hdmap.AlignedReference, RelativeAssetPath, ParametricAttribution | References, asset paths, marking/speed spans |
xmlread | Parse Lanelet2 OSM XML |
importScene, roadrunnerHDMapImportOptions, roadrunnerHDMapBuildOptions | Import and build a map in RoadRunner |
enableOverlapGroupsOptions, autoDetectBridgesOptions | Junction preservation and bridge detection |
SignalTypes/Signals on .rrhd import — signals survive MATLAB write/read but do not appear in the scene.curbstone ways are reported, not built.isFallback); report their count so the user can map them.roadrunner.hdmap.* constructors: Name=Value or create-then-assign — never positionalClassName.empty for empty typed arrays; Nx3 geometry everywherecontainers.Map for indexed lookups in conversions; print a discovery summary — never silently drop elementsimportScene; ImportStep="Load" unless a build is requestedtiledlayout/nexttile for multi-panel figuresCopyright 2026 The MathWorks, Inc.
manifest.yaml (opens in a new tab)references/assets/assetCatalog.md (opens in a new tab)references/assets/barriers.md (opens in a new tab)references/assets/laneMarkings.md (opens in a new tab)references/assets/laneTypes.md (opens in a new tab)references/assets/signs.md (opens in a new tab)references/assets/staticObjects.md (opens in a new tab)references/authoring/alignmentRules.md (opens in a new tab)references/authoring/apiReference.md (opens in a new tab)references/authoring/authoringWorkflow.md (opens in a new tab)references/authoring/deduplicateBoundaries.md (opens in a new tab)references/authoring/junctionPolygon.md (opens in a new tab)references/authoring/leftGapFilter.md (opens in a new tab)references/authoring/orthogonalSplit.md (opens in a new tab)references/authoring/resolveHeights.md (opens in a new tab)references/authoring/snapEndpoints.md (opens in a new tab)references/authoring/splitClosedGeometry.md (opens in a new tab)references/authoring/synthesizeCenterLine.md (opens in a new tab)references/authoring/validateMap.md (opens in a new tab)references/import/buildOptions.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
roadrunner, hd-maps, lanelet2, opendrive, driving-simulation, matlab
/automotive:roadrunner-build-rrhd-mapfrom automotive
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin automotive9 skills in this plugin
/matlab-cosimulate-sumo-simulinkBuild 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.
/matlab-fit-tire-modelFit a tire model (Magic Formula 6.2/5.2/5.1, Dugoff, or Fiala) to measured tire force and moment data using the Vehicle Dynamics Blockset Extended Tire Features API (tireData.import, tireModel.new, tireModel.fit, tireModel.export). Use when fitting, parameterizing, or calibrating a tire model from tire measurement data (TYDEX, Calspan, MTS, or text/CSV from any test source), creating a .tir file, or building a Magic Formula tire model from test data. Also use for the individual steps: importing TYDEX, Calspan, MTS, or CSV tire data (file extensions `.tdx` for TYDEX; `.data`, `.tim`, `.rsp` for MTS; any other extension read as text) into a tireData object, exporting a tire model to .tir, inspecting, smoothing, cropping, or plotting tire measurement data or a model's response, or converting a fitted model to another type.
/matlab-import-driving-dataImport recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-use-scenario-builder./matlab-use-ncap-protocolGenerate Euro NCAP test scenarios and variants using the ADT Euro NCAP support package. Use when creating NCAP seed scenarios, generating variants, translating between drivingScenario and RoadRunner, plotting scenario descriptors, computing NCAP scores, or exporting reports. Triggers on: ncapScenario, euroAssessment, getScenario, getScenarioDescriptor, generateVariants, ScenarioDescriptor, ScenarioDescriptorPlot, ncapScore, ncapReport, exportReport, configureVUT, assessmentTable, Euro NCAP, CCRs, CCRm, CCRb, CCFtap, CCCscp, CPNA, CPFA, CBNA, variant generation.
/matlab-use-scenario-builderGenerate driving scenes, scenarios, road surfaces, and 3D content from scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar augmentation, traffic-sign placement, vision-based vehicle classification for actor assets. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-import-driving-data./roadrunner-author-scenarioCreate and edit RoadRunner scenarios in MATLAB with roadrunnerAPI: add actors, routes and phase logic, validate and repair a scenario, or recreate an OpenSCENARIO 1.x (.xosc) file as an editable scenario. Use when building a RoadRunner scenario from a description (cut-in, pedestrian crossing, lead-follow and similar), fixing one that fails validation, or rebuilding, recreating or converting a .xosc file in MATLAB. Do NOT use when the user says "import" a .xosc file — call importScenario instead. Not for exporting to OpenSCENARIO, simulation (use roadrunner-simulate-scenario), recorded sensor data (use matlab-use-scenario-builder), Euro NCAP protocol tests (use matlab-use-ncap-protocol), drivingScenario/Driving Scenario Designer scenarios, or OpenSCENARIO 2.x (.osc) files. Triggers on: roadrunnerAPI, RoadRunner scenario authoring, add actor, create route, phase logic, cut-in scenario, pedestrian crossing, scenario from MATLAB, OpenSCENARIO, xosc to MATLAB, recreate xosc.
Other plugins' skills for the same job