Roadrunner Import Sceneのロゴ

Roadrunner Import Scene

組織人気
matlab
roadrunner-import-scene

Import HD Map or OpenDRIVE files into a RoadRunner scene using MATLAB. Use when loading driving scenes in RoadRunner or RoadRunner Scene Builder, importing RRHD, OpenDRIVE, or other RoadRunner-supported formats for simulation, or verifying Lanelet2-to-RRHD conversion results visually. Requires rrApp handle from roadrunner-core.

概要

公開者matlab
リポジトリmatlab-agentic-toolkit
スキル名roadrunner-import-scene
スター
1.2K
フォーク
138
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    matlabがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Roadrunner Import Scene」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/automotive/roadrunner-import-scene
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit.git /tmp/matlab-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/matlab-agentic-toolkit/skills-catalog/automotive/roadrunner-import-scene .claude/skills/roadrunner-import-scene
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRoadrunner Import Sceneを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にRoadrunner Import Sceneを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Roadrunner Import Sceneは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

RoadRunner Scene Import

Import map files into a RoadRunner scene for visualization, verification, and building.

When to Use

  • Importing a .rrhd file into RoadRunner for visual verification
  • Importing an OpenDRIVE .xodr file into RoadRunner
  • Verifying converted maps after Lanelet2-to-RRHD or other conversions
  • Configuring build options (asphalt surfaces, bridge detection, junction preservation)

When NOT to Use

  • Launching RoadRunner or managing projects — use roadrunner-core
  • Building RRHD map content — use roadrunner-rrhd-authoring
  • Converting Lanelet2 to RRHD — use roadrunner-convert-lanelet2-to-rrhd
  • Looking up asset paths — 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 .m file, run with run_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.
  • Requires rrApp from roadrunner-core. Do not launch or connect to RoadRunner in this skill. If rrApp does not exist, invoke roadrunner-core first.
  • Always copy file to project folder. Use status(rrApp).Project.Filename and copyfile() explicitly in every import workflow — never omit or hide behind a variable.
  • Always set bridgeOpts.IsEnabled = true explicitly. Never rely on constructor defaults for bridge auto-detection.
  • Run enforcement gates before importScene. File location, extension, and build-option checks are mandatory.
  • Load before Build by default. Use ImportStep="Load" unless user explicitly requests a full build.
  • NEVER hardcode DetectAsphaltSurfaces = true for converted maps. Always inspect the RRHD for closed-loop topology first. Closed-loop networks (most Lanelet2 conversions) MUST use DetectAsphaltSurfaces = false — asphalt detection fills the interior of loops.
  • ALWAYS preserve junctions when they exist. If tempMap.Junctions is non-empty, you MUST set overlapOpts.IsEnabled = true, overlapOpts.PreserveJunctionLanes = true, and overlapOpts.PreserveJunctionShape = true. Never rely on RoadRunner's auto-detection to re-infer junctions — it discards authored geometry.

Prerequisites

  • A valid rrApp handle must exist (produced by roadrunner-core skill)
  • A RoadRunner project must be open
  • If rrApp does not exist, invoke roadrunner-core first to launch and connect

Connection, launching, and project lifecycle are owned by roadrunner-core. This skill assumes rrApp is already available.

Import Workflow

Step 1: Create a Fresh Scene

Always create a new scene before importing to avoid stale data:

matlab
newScene(rrApp);

Step 2: Copy File to Project (MANDATORY — always show explicitly)

RoadRunner requires imported files to be inside the project folder. You MUST always include this exact pattern in your generated code — never assume the file is already there or hide it behind a variable:

matlab
st = status(rrApp);
projectFolder = st.Project.Filename;
[~, fileName, ext] = fileparts(sourceFile);
destFile = fullfile(projectFolder, fileName + ext);
copyfile(sourceFile, destFile);

NEVER omit the copyfile() call or the status(rrApp).Project.Filename lookup. Even if you define a destFile variable elsewhere, you MUST show both the project path retrieval and the copy operation explicitly in every import workflow.

Step 3: Import the Map

RoadRunner HD Map (.rrhd)

Load only (inspect RRHD view before build):

matlab
importOpts = roadrunnerHDMapImportOptions;
importOpts.ImportStep = "Load";
importScene(rrApp, destFile, "RoadRunner HD Map", importOpts);

Full import with build (use conditional logic — NEVER hardcode asphalt/junction settings):

Do NOT copy a fixed template. Always use the "Conditional Build Options" section below to determine the correct settings based on RRHD content. The enforcement gate will reject hardcoded DetectAsphaltSurfaces = true for RRHD files.

IMPORTANT: When enabling bridge auto-detection, you MUST always write bridgeOpts.IsEnabled = true explicitly. Do NOT rely on the constructor default — the line must appear in the generated code.

Conditional Build Options (MANDATORY — apply based on map content)

Inspect the RRHD content before choosing build options. The following rules determine when to enable/disable specific settings:

ConditionActionReason
No Junctions in RRHD (empty or zero)Set overlapOpts.IsEnabled = falseWithout explicit junction definitions, overlap detection uses only geometry and produces incorrect groupings
Closed-loop road network (lanes form rings)Set buildOpts.DetectAsphaltSurfaces = falseAsphalt detection fills interior of closed loops, creating unwanted surface polygons
Explicit Junctions present in RRHDSet overlapOpts.PreserveJunctionLanes = true and overlapOpts.PreserveJunctionShape = truePreserves authored junction geometry and lane connectivity instead of re-inferring from geometry

Example: Import with junction-aware options:

matlab
importOpts = roadrunnerHDMapImportOptions;
buildOpts = roadrunnerHDMapBuildOptions;
buildOpts.ClearSceneOfExistingData = true;

% Read RRHD to inspect content before build
tempMap = roadrunnerHDMap;
read(tempMap, destFile);

% Conditional: asphalt surfaces
hasClosedLoops = false;  % Detect from lane topology (any lane chain forming a cycle)
if hasClosedLoops
    buildOpts.DetectAsphaltSurfaces = false;
else
    buildOpts.DetectAsphaltSurfaces = true;
end

% Conditional: overlap groups / junctions
overlapOpts = enableOverlapGroupsOptions;
if isempty(tempMap.Junctions) || numel(tempMap.Junctions) == 0
    overlapOpts.IsEnabled = false;
else
    overlapOpts.IsEnabled = true;
    overlapOpts.PreserveJunctionLanes = true;
    overlapOpts.PreserveJunctionShape = true;
end
buildOpts.EnableOverlapGroupsOptions = overlapOpts;

bridgeOpts = autoDetectBridgesOptions;
bridgeOpts.IsEnabled = true;
buildOpts.AutoDetectBridgesOptions = bridgeOpts;

importOpts.BuildOptions = buildOpts;
importScene(rrApp, destFile, "RoadRunner HD Map", importOpts);
OpenDRIVE (.xodr)
matlab
importOpts = openDriveImportOptions;
importOpts.ImportSignals = true;
importOpts.ImportObjects = true;
importScene(rrApp, destFile, "OpenDRIVE", importOpts);

Step 4: Save the Scene

matlab
[~, sceneName] = fileparts(sourceFile);
saveScene(rrApp, sceneName);

Import Options Reference

roadrunnerHDMapImportOptions

PropertyDescription
ImportStep"Load" (RRHD view only) or "Unspecified" (full load+build)
LoadOptionsroadrunnerHDMapLoadOptions — offset, projection
BuildOptionsroadrunnerHDMapBuildOptions — build configuration

roadrunnerHDMapBuildOptions

PropertyDescriptionDefault
ClearSceneOfExistingDataRemove existing scene contentauto
DetectAsphaltSurfacesGenerate road surfacesauto
FitCrossSectionsFit lane cross sectionsauto
CurvatureBlendCurvature blending factorauto
UseLaneGroupsGroup lanes for editing (R2024a+)auto
CombineTransitionLanesMerge transition lanes (R2025a+)auto
AutoDetectBridgesOptionsautoDetectBridgesOptions objectauto
EnableOverlapGroupsOptionsenableOverlapGroupsOptions object (junctions)auto
FixUnrealisticRoadElevationCorrect elevation jumps from HD sourcesauto
FixInconsistentLaneConnectionsRemove physically unrealistic lane linksauto

enableOverlapGroupsOptions

PropertyDescriptionDefault
IsEnabledUse junction location info (false = geometric overlaps)auto
PreserveJunctionLanesKeep original junction lanes from imported mapauto
PreserveJunctionShapeKeep junction polygon geometry from imported mapauto
GroupNameName of the overlap groupauto

openDriveImportOptions

PropertyDescription
ImportSignalsImport traffic signals
ImportObjectsImport static objects
LaneOptionsLane conversion settings
OffsetScene position offset
ProjectionGeospatial projection
ImportRegionRegion filter (R2024a+)

Supported Formats

Format NameFile TypeSince
"RoadRunner HD Map".rrhdR2022b
"OpenDRIVE".xodrR2022a
"HERE HD Map"(catalog)R2024a
"TomTom HD Map"(catalog)R2024b

Default Behavior

When the user asks to "import a map" or "load into RoadRunner":

  1. Ensure rrApp exists (invoke roadrunner-core if not)
  2. Create a new scene (clean slate)
  3. Copy file to project Assets folder
  4. Import with Load only (ImportStep="Load") so user can verify RRHD view
  5. Save the scene with the filename as scene name

Only perform a full build (with BuildOptions) when the user explicitly asks to build or the RRHD view has been verified.

When building, always inspect the RRHD content first and apply the conditional build options from the "Conditional Build Options" section above. Never use fixed/hardcoded build options without checking map content.

Key Functions

FunctionPurpose
newScene(rrApp)Create fresh scene (clean slate)
status(rrApp)Get project info (.Project.Filename)
importScene(rrApp, file, format, opts)Import map file into scene
saveScene(rrApp, name)Save current scene
roadrunnerHDMapImportOptionsCreate import options (set ImportStep, BuildOptions)
roadrunnerHDMapBuildOptionsCreate build options (asphalt, bridges, junctions)
autoDetectBridgesOptionsBridge detection settings (IsEnabled)
enableOverlapGroupsOptionsJunction preservation (PreserveJunctionLanes, PreserveJunctionShape)
openDriveImportOptionsOpenDRIVE-specific import options

Enforcement Gate (MANDATORY — run before import)

You MUST execute these checks before calling importScene. Do NOT skip.

matlab
%% --- ENFORCEMENT: RoadRunner is connected ---
try
    st = status(rrApp);
    assert(~isempty(st.Project.Filename), 'No project open');
    fprintf('RoadRunner connected, project: %s\n', st.Project.Filename);
catch
    error('RoadRunner:NotConnected', ...
        'No RoadRunner instance connected. Run the Connection Strategy block first.');
end

%% --- ENFORCEMENT: File is inside project folder ---
projectFolder = st.Project.Filename;
assert(startsWith(destFile, projectFolder) || isfile(destFile), ...
    'Import file must be inside the project folder. Copy it first.');
fprintf('File location check: PASS\n');

%% --- ENFORCEMENT: File extension matches format ---
[~, ~, ext] = fileparts(destFile);
if formatName == "RoadRunner HD Map"
    assert(ext == ".rrhd", 'Expected .rrhd file for RoadRunner HD Map format');
elseif formatName == "OpenDRIVE"
    assert(ext == ".xodr", 'Expected .xodr file for OpenDRIVE format');
end
fprintf('Format check: PASS\n');

%% --- ENFORCEMENT: Build options match RRHD content (MANDATORY for .rrhd) ---
if ext == ".rrhd"
    tempMap = roadrunnerHDMap;
    read(tempMap, destFile);

    % Junction preservation check
    if ~isempty(tempMap.Junctions) && numel(tempMap.Junctions) > 0
        assert(exist('overlapOpts','var') == 1 && overlapOpts.IsEnabled == true ...
            && overlapOpts.PreserveJunctionLanes == true ...
            && overlapOpts.PreserveJunctionShape == true, ...
            'RRHD has %d junctions — you MUST enable PreserveJunctionLanes and PreserveJunctionShape.', ...
            numel(tempMap.Junctions));
        fprintf('Junction preservation check: PASS (%d junctions preserved)\n', numel(tempMap.Junctions));
    end

    % Closed-loop / asphalt check — detect topology cycles (multi-lane or self-loop)
    hasClosedLoop = false;
    lanes = tempMap.Lanes;
    nLanes = numel(lanes);
    laneIDs = cell(1, nLanes);
    for li2 = 1:nLanes, laneIDs{li2} = char(lanes(li2).ID); end
    laneIDSet = containers.Map(laneIDs, num2cell(1:nLanes));
    % BFS from each lane: if we revisit a lane, there's a cycle
    visited = false(1, numel(lanes));
    for startIdx = 1:numel(lanes)
        if visited(startIdx), continue; end
        queue = startIdx; seen = false(1, numel(lanes)); seen(startIdx) = true;
        while ~isempty(queue)
            ci = queue(1); queue(1) = [];
            visited(ci) = true;
            succs = lanes(ci).Successors;
            for si = 1:numel(succs)
                sid = char(succs(si).Reference.ID);
                if laneIDSet.isKey(sid)
                    ni = laneIDSet(sid);
                    if ni == startIdx
                        hasClosedLoop = true; break;
                    end
                    if ~seen(ni), seen(ni) = true; queue(end+1) = ni; end
                end
            end
            if hasClosedLoop, break; end
        end
        if hasClosedLoop, break; end
    end
    if hasClosedLoop
        assert(buildOpts.DetectAsphaltSurfaces == false, ...
            'DetectAsphaltSurfaces must be false for closed-loop maps (fills interior). Set it explicitly.');
        fprintf('Asphalt detection check: PASS (disabled for closed-loop)\n');
    else
        fprintf('Asphalt detection check: PASS (no closed-loop detected)\n');
    end
end

Conventions

  • Always specify format name string exactly: "RoadRunner HD Map", "OpenDRIVE"
  • Use SOS form for IIR stability (BuildOptions handles this internally)
  • Show all file-staging code explicitly (status, fileparts, fullfile, copyfile)
  • Use tiledlayout/nexttile for multi-panel figures (not subplot)
  • Pin destFile to the project folder path — never use temp or relative paths for import

Copyright 2026 The MathWorks, Inc.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Roadrunner Import Scene」では何ができますか?

Import HD Map or OpenDRIVE files into a RoadRunner scene using MATLAB. Use when loading driving scenes in RoadRunner or RoadRunner Scene Builder, importing RRHD, OpenDRIVE, or other RoadRunner-supported formats for simulation, or verifying Lanelet2-to-RRHD conversion results visually. Requires rrApp handle from roadrunner-core.

TypingMindでRoadrunner Import Sceneを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Roadrunner Import Sceneはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRoadrunner Import Sceneをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/automotive/roadrunner-import-sceneを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Roadrunner Import Sceneを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Roadrunner Import Sceneで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRoadrunner Import Sceneを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Roadrunner Import Scene」は無料ですか?

matlabがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇