Pular para o conteúdo

Preview OpenSCENARIO files on GitHub — the drawtonomy Chrome extension

Este conteúdo não está disponível em sua língua ainda.

Most OpenSCENARIO work starts on GitHub. Scenarios live in a repository and arrive as pull requests, and understanding one usually means cloning the repo, setting up a simulator, and running the file just to see what it does.

drawtonomy for GitHub skips all of that. It’s a free Chrome extension that plays .xosc files right on github.com — no download, no install, no simulator.

Install from the Chrome Web Store →

Previewing esmini's scenarios on GitHub, opening one in the editor, editing an event, and exporting a trimmed clip.
Where it runsgithub.com — file pages and folder listings
What it previewsOpenSCENARIO .xosc files in public repositories
What it resolves automaticallyThe road network and vehicle catalogs the scenario needs
What it collectsNothing — no analytics, no account required

Install drawtonomy for GitHub from the Chrome Web Store. There’s nothing to configure and no account to create. Visit any GitHub page with .xosc files and it’s ready to use.

The drawtonomy for GitHub listing on the Chrome Web Store, showing a lane_change.xosc scenario previewed inline on a GitHub file page

Browse to a public repository that contains OpenSCENARIO files — for example, esmini/esmini, whose resources/ folder holds dozens of sample scenarios.

Wherever a .xosc file (or a folder full of them) appears in a GitHub listing, you’ll see a small ▶ play chip. Folders that contain scenarios show a count too, so you know how many are inside before you click.

A GitHub directory listing of esmini/resources, with play chips and scenario counts on the xosc and scenario_construct_examples folders

Click a chip and the scenario plays right there — road, vehicles, and the full event timeline — in a popup window over the page.

The cut-in.xosc scenario playing inside the preview on GitHub, with the LOGIC timeline showing CutInAndBrakeAct events

Browsing a whole folder? Use the ◀ ▶ buttons (or the arrow keys) to move to the next scenario without closing the preview. Click the file name at the top to jump straight to any scenario in the folder from a list, rather than paging through one at a time. If a repository stores one scenario per subfolder, opening a folder’s chip walks through every scenario inside it and its subfolders in one sequence.

Opening a .xosc file directly (rather than a folder) shows the same preview inline on the page, next to GitHub’s Raw / Copy / Download buttons.

KeyAction
EscClose the preview
/ Previous / next scenario
Move through the jump list
EnterOpen the selected scenario

Preview shows you what a scenario does. When you want to change it, click Open in drawtonomy to hand the same scenario to the full editor in a new tab — its road and any catalogs it needs are already resolved, so it’s ready to play immediately.

The acc-test scenario open in the full drawtonomy editor in a new tab, with the toast confirming it was opened from GitHub

The link you land on is an ordinary shareable URL — anyone can open it, with or without the extension.

Once you’re in the editor, two settings make a scenario much easier to watch:

  • Follow: Ego keeps the camera locked onto the ego vehicle, which matters for imported roads that can run for kilometres.
  • Ghost leaves a trail of past positions, so a fast manoeuvre like a cut-in reads as one clear picture instead of something you have to catch in the moment.

The acc-test scenario playing at 4x with Follow Ego and ghost trails showing the cut-in manoeuvre

See Playback for the full set of playback controls.

An imported scenario isn’t read-only. Click any event card to open the event editor and change its trigger or action, then replay to see the new behaviour.

The event editor open on LaneChange2Event, showing its simulation-time trigger and Change Lane action

The edited scenario replayed, the ghost trail showing the changed lane-change behaviour

See Actions and Triggers for what each option does.

Export a clip of just the part that matters

Section titled “Export a clip of just the part that matters”

You rarely need the whole run — often just the few seconds where something interesting happens. Export video records exactly that as a .webm file, ready to drop into a pull request comment, a ticket, or a review deck.

The EXPORT VIDEO panel with aspect ratio, camera, radius, ghost, and a Trim range of 3.85 s to 8.33 s

Set Range to Trim, drag the two handles on the seek bar to the moment you want, and click Start. You can also choose the aspect ratio, whether the camera follows the ego vehicle or fits the whole scene, and whether ghost trails are included in the recording.

The exported .webm playing in a browser tab

The extension collects nothing — no analytics, no account, nothing sent to a server of its own. Previewing a file is the same as opening that scenario on drawtonomy.com in a new tab. Full details: Chrome extension privacy policy.

  • Public repositories only. Private repos aren’t supported.
  • .xosc files only — a standalone .xodr road file isn’t previewable on its own yet.
  • Scenarios that reference a Windows-style path or a simulator’s built-in map (rather than a .xodr in the same repository) can’t resolve their road automatically; drawtonomy will ask you to supply one.
  • Preview buttons don’t currently appear in pull request “Files changed” diffs — open the file itself instead.

You can change the app URL the preview loads from, and turn on auto-preview, from the extension’s options page (toolbar popup → Options).

Everything the extension does, you can also do with a link. Append a GitHub file URL to ?open=:

https://drawtonomy.com/?open=https://github.com/esmini/esmini/blob/master/resources/xosc/cut-in.xosc

Open the esmini cut-in scenario →

That link works for anyone, extension or not — useful when sharing a scenario with a teammate. See Open and play a .xosc.