
Roadrunner Convert Lanelet2 To Rrhd
Convert Lanelet2 maps (.osm) to RoadRunner HD Map (.rrhd) format using MATLAB.
Install
npx skills add matlab/matlab-agentic-toolkit --skill roadrunner-convert-lanelet2-to-rrhd -g -a claude-code -y- Repository
- matlab/matlab-agentic-toolkit1.2k
- Category
- Engineering
- Updated
- 8d ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Convert Lanelet2 maps (.osm) to RoadRunner HD Map (.rrhd) format using MATLAB. Use when converting Lanelet2 maps into RoadRunner Scene Builder, building driving scenes from open-source map data, or transforming road network definitions for simulation.
Lanelet2 to RRHD Converter
Converts Lanelet2 .osm files to RoadRunner HD Map .rrhd format.
When to Use
- Converting a Lanelet2
.osmfile to RoadRunner HD Map.rrhdformat - Importing Lanelet2 maps into RoadRunner via MATLAB
- Building RRHD from
.osmsources that containtype=laneletrelations - Need full pipeline: parse, geometry, topology, semantics, junctions, barriers, signs, markings
When NOT to Use
- Input is a standard OpenStreetMap file (highway=* ways without
type=laneletrelations) - Input is OpenDRIVE
.xodr, import directly viaroadrunner-import-scene - Building RRHD from scratch without a source file, use
roadrunner-rrhd-authoring - Only need asset path lookups, use
roadrunner-asset-mapping
Key Rules
- Always write to .m files when executing code. Never put multi-line MATLAB code directly in
evaluate_matlab_code. Write to a.mfile, run withrun_matlab_file, edit on error. Exception: if the user asks to "show the pattern" or says "do not execute", show code inline without writing files. - ALL pipeline steps are mandatory. Do NOT stop after writing lanes/boundaries, junctions, curve markings, barriers, signs, and speed limits must all be built.
- Boundary geometry is IMMUTABLE. Never flip, resample, project, or modify boundary points.
- One boundary object per way. Deduplicate via
wayToBndIDmap. - Detect alignment for EVERY lane. Never hardcode
"Forward"for all boundaries. - Center line density: 1 point per meter minimum. Use
max(10, round(avgLen), nLeft, nRight). - Run enforcement gate before
write(). Alignment, spatial, extension, and completeness checks are mandatory. - No nested function definitions. Code runs in script context, all logic inline or anonymous functions.
