Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/automotive/roadrunner-build-rrhd-map

roadrunner-build-rrhd-map

Verified

Build, convert, and import RoadRunner HD Maps (.rrhd) in MATLAB. Author lanes, lane boundaries, markings, junctions, signs, barriers, and speed limits with roadrunnerHDMap; convert Lanelet2 (.osm, Autoware) maps to RRHD; resolve RoadRunner road asset paths for markings, crosswalks, signs, signals, and barriers; and import or build .rrhd or OpenDRIVE (.xodr) files into a RoadRunner scene. Use when creating road networks for driving simulation, converting Lanelet2 or other HD map sources to RRHD, looking up road asset paths, or loading and verifying a map in RoadRunner or RoadRunner Scene Builder. Not for building scenes from recorded sensor data, running simulations, or recreating OpenSCENARIO (.xosc) scenarios.

FileKindSize
SKILL.mdskill md15.5 KB
manifest.yamlconfig557 B
references/assets/assetCatalog.mdmarkdown7.4 KB
references/assets/barriers.mdmarkdown3.6 KB
references/assets/laneMarkings.mdmarkdown5.8 KB
references/assets/laneTypes.mdmarkdown2.2 KB
references/assets/signs.mdmarkdown5.0 KB
references/assets/staticObjects.mdmarkdown5.1 KB
references/authoring/alignmentRules.mdmarkdown10.3 KB
references/authoring/apiReference.mdmarkdown9.0 KB
references/authoring/authoringWorkflow.mdmarkdown20.4 KB
references/authoring/deduplicateBoundaries.mdmarkdown4.9 KB
references/authoring/junctionPolygon.mdmarkdown6.8 KB
references/authoring/leftGapFilter.mdmarkdown6.5 KB
references/authoring/orthogonalSplit.mdmarkdown7.7 KB
references/authoring/resolveHeights.mdmarkdown2.4 KB
references/authoring/snapEndpoints.mdmarkdown4.0 KB
references/authoring/splitClosedGeometry.mdmarkdown3.8 KB
references/authoring/synthesizeCenterLine.mdmarkdown4.6 KB
references/authoring/validateMap.mdmarkdown1.1 KB
references/import/buildOptions.mdmarkdown4.0 KB
references/import/importScene.mdmarkdown12.9 KB
references/lanelet2/buildRRHD.mdmarkdown14.2 KB
references/lanelet2/conversionPipeline.mdmarkdown13.3 KB
references/lanelet2/coordinates.mdmarkdown4.9 KB
references/lanelet2/discoverRelations.mdmarkdown2.4 KB
references/lanelet2/enforcementGate.mdmarkdown3.3 KB
references/lanelet2/extractGeometry.mdmarkdown3.4 KB
references/lanelet2/extractJunctions.mdmarkdown5.0 KB
references/lanelet2/extractLanelets.mdmarkdown2.6 KB
references/lanelet2/extractNonLaneElements.mdmarkdown14.4 KB
references/lanelet2/extractSemantics.mdmarkdown4.4 KB
references/lanelet2/extractTopology.mdmarkdown5.4 KB
references/lanelet2/placedObjects.mdmarkdown4.4 KB
references/lanelet2/readOSM.mdmarkdown4.0 KB
references/lanelet2/splitClosedRoads.mdmarkdown3.0 KB
scripts/detectAlignment.mother3.3 KB
scripts/detectClosedLoop.mother5.8 KB
scripts/detectJunctions.mother12.4 KB
scripts/discoverWayTypes.mother4.8 KB
scripts/parseOSM.mother4.0 KB
scripts/resolveHeightConflicts.mother6.8 KB
scripts/resolveSignAsset.mother7.2 KB
scripts/snapConnectedEndpoints.mother4.0 KB
scripts/validateRRHD.mother6.3 KB

references/assets/signs.md

View on GitHub
# Sign Asset Mapping, Placement, and Orientation

Resolve every sign code with [scripts/resolveSignAsset.m](../../scripts/resolveSignAsset.m) — do not hand-build lookup tables.

```matlab
[assetPath, objectType, code, isFallback] = resolveSignAsset("jp_330-A", region);
[assetPath, ~, ~, isFallback] = resolveSignAsset("DE-2017/274-70", region, ProjectFolder=projectFolder);  % verify on disk
```

## Extensions and names (RoadRunner_Asset_Library, R2026a)

- Most signs are `.svg_rrx`, but several US signs are plain `.svg` (`Stop_US.svg`, `Yield_US.svg`, `NoUTurns_US.svg`, `White_Blank_US.svg`). Never assume one extension — pass `ProjectFolder` so the resolver checks both.
- Names are descriptive English with a region suffix. Numeric names such as `Sign_330-A.svg` do not exist.
- Asset paths start with `Assets/`. On disk each asset may appear only as `<asset>.rrmeta`; reference the asset path without `.rrmeta`.

| Sign | Japan | Germany | US |
|---|---|---|---|
| Stop | `Signs/Japan/Regulatory Signs/Stop_JP_01.svg_rrx` | `Signs/Germany/Regulatory Signs/Stop_DE.svg_rrx` | `Signs/US/Regulatory Signs/Stop_US.svg` |
| Yield | `Signs/Japan/Auxiliary Signs/Yield_JP.svg_rrx` | `Signs/Germany/Regulatory Signs/Yield_DE.svg_rrx` | `Signs/US/Regulatory Signs/Yield_US.svg` |
| Speed limit N | `Signs/Japan/Regulatory Signs/MaxSpeedLimit_<N>_JP.svg_rrx` (10–100) | `Signs/Germany/Regulatory Signs/MaxSpeed_<N>_DE.svg_rrx` | `Signs/US/Regulatory Signs/SpeedLimit_<N>_US.svg_rrx` |
| No U-turn | `Signs/Japan/Regulatory Signs/NoUTurns_JP.svg_rrx` | — | `Signs/US/Regulatory Signs/NoUTurns_US.svg` |
| No entry / parking / stopping | `NoEntryForVehicles_JP`, `NoParking_JP`, `NoStopping_JP` (`.svg_rrx`, Regulatory Signs) | — | — |
| One way / no overtaking / slow down | `OneWay_JP_01`, `NoOvertaking_JP`, `SlowDown_JP_01` (`.svg_rrx`, Regulatory Signs) | — | — |
| Unrecognized code (all regions) | `Signs/US/White_Blank_US.svg` | same | same |

Traffic lights resolve to `Props/Signals/Signal_3Light_Post01.fbx` with `objectType = "signal"` — RoadRunner ignores signals on RRHD import, so count and report them instead of building them.

## Codes the resolver recognizes

| Source | Examples | Resolves to |
|---|---|---|
| Keyword (any region) | `stop`, `stop_sign`, `yield`, `give_way`, `speed_limit_30`, `no_u_turn` | Region stop / yield / speed / no U-turn |
| Japan (Autoware `traffic_sign_id`, `sign_type`) | `jp_330-A` (一時停止 stop), `jp_323-40` (最高速度 speed), `jp_329` (徐行 slow down), `no_entry`, `no_parking`, `no_stopping`, `one_way`, `no_overtaking` | Japan assets |
| Germany (StVO) | `de206` stop, `de205` yield, `de274-30` speed; prefixed `DE-2017/274-70` | Germany assets |
| Germany (StVO, exact assets) | 267 no entry, 272 no U-turn, 276/277 no passing (all / trucks), 278 end speed limit, 280/281 end no passing, 282 end of restrictions, 283/286 no stopping / no parking, 264/265/266 max width / height / length, 215 roundabout, 220 one way, 237 bicycle path, 239 footpath, 301/306/307/308 priority signs | `Signs/Germany/Regulatory Signs/…`, `Signs/Germany/Directional Signs/…` |
| US (MUTCD) | `us_r1_1` stop, `us_r1_2` yield, `us_r2_1-30` speed | US assets |
| Anything else (`unknown`, `DE-2017/dynamic`, `DE-2017/267`) | — | Blank sign, `isFallback = true` — count and report |

Prefixes `traffic_sign/`, `de`, `de-2017/`, `us_`, `jp_` are stripped before matching.

## Region detection

```matlab
lat = geoRef(1); lon = geoRef(2);
if lat >= 24 && lat <= 46 && lon >= 122 && lon <= 154
    region = "Japan";
elseif lat >= 35 && lat <= 72 && lon >= -10 && lon <= 25
    region = "Germany";
else
    region = "US";   % UK, China, and other regions are not mapped — US assets
end
```

## Sign geometry and orientation

`Sign.Geometry` is a `GeoOrientedBoundingBox`:

| Property | Meaning |
|---|---|
| `Center` | `[x y z]` in map coordinates |
| `Dimension` | **Half-lengths** along the box's local axes (center to face). A 0.6 m × 0.6 m sign → `[0.02 0.3 0.3]` |
| `GeoOrientation` | **`[roll pitch heading]` in radians** — heading is the third element |

Face approaching traffic: take the nearest lane center-line segment, and rotate its travel direction by 180°.

```matlab
% laneCenters: cell array of Nx3 lane center lines in travel direction
best = inf; heading = 0;
for k = 1:numel(laneCenters)
    c = laneCenters{k};
    [d, i] = min(vecnorm(c(:,1:2) - signCenter(1:2), 2, 2));
    if d < best
        i = min(max(i, 1), size(c,1) - 1);
        seg = c(i+1,1:2) - c(i,1:2);
        heading = atan2(-seg(2), -seg(1));     % radians, facing oncoming traffic
        best = d;
    end
end
bb = roadrunner.hdmap.GeoOrientedBoundingBox;
bb.Center = signCenter;
bb.Dimension = [0.02 0.3 0.3];
bb.GeoOrientation = [0 0 heading];
```

Build one `SignType` per resolved asset path and one `Sign` per **physical** sign — for Lanelet2 maps, the Convert workflow's sign step (extractNonLaneElements.md, Step 9c) removes duplicate sign ways and regulatory elements.

----

Copyright 2026 The MathWorks, Inc.

----
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall