CommonRoad scenario editor, export, and planner replay
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Draw a scenario or open one you already have, export it as CommonRoad XML, solve it with your own motion planner, and replay the planner’s solution in drawtonomy with the official checker’s verdict on the badge.
CommonRoad (TU Munich) is the benchmark format for motion-planning research: lanelets, other traffic as recorded trajectories, and a planning problem for the ego. drawtonomy is the two ends of that loop, the authoring side and the viewing side.
Three ways in
Section titled “Three ways in”Every row ends at the same place: a CommonRoad XML your planner reads, a solution you replay, and a verdict on the badge.
| Start from | How | What you get |
|---|---|---|
| A scenario you draw | lanes, vehicles, speeds, an ego mark and a goal lane on the canvas | a CommonRoad 2020a scenario with lanelets, dynamicObstacle trajectories and a planningProblem |
| An existing OpenSCENARIO file | drop the .xosc and its .xodr, or open it straight from GitHub with ?open= | the same export, from a scenario you already own. See Export a scenario |
| A CommonRoad benchmark scenario | drop the .xml on the canvas | the scenario on an editable canvas; elements drawtonomy does not draw are carried through, so an unedited re-export is the original file back |
Once a solution exists, all three replay the same way: drop the
solution.xml and the ego follows the planner’s trajectory while the ego you
drew stays visible as a ghost. Drop the .verdict.json next to it and the
run badge ends in RUN PASS or RUN FAIL, with Checker PASS 4/4 or
Checker FAIL 2/4 in its tooltip and in the toast, plus the failing checks,
the obstacle involved and the time range in the tooltip and on the timeline.
The shortest route for you
Section titled “The shortest route for you”- You develop a motion planner and want scenarios beyond the benchmark corpus.
Go to Bring your own planner.
It starts at
pip installand ends with a naive planner failing and an IDM planner passing on the same scene. - You have OpenSCENARIO files and want to run a planner against them. Start at Export a scenario, then follow Bring your own planner.
- You need the official verdict and the evidence behind it. Go to Verdict reference for the four checks, the sidecar format and how the badge reads.
What the loop looks like
Section titled “What the loop looks like”
Before Play: the vehicle marked as Ego and the goal, a 50 m stretch of lane put down with one click. That is the whole planning problem.

The scenario as drawn: an unreactive ego at 108 km/h meets the cut-in at t = 12.9 s and the badge reads RUN FAIL. That is the problem the planner has to solve.

Export writes the CommonRoad scenario XML, plus the ego you drew as a reference solution file.

The exported file replayed by commonroad-io with no planner: the ego you
drew hits the cut-in at the same 12.9 s.

The reactive planner solves it and drives on to the goal: obstacle collision, road boundary, goal reached and kinematic feasibility all pass.

Back in drawtonomy: the planner’s ego (white) passes left of the cut-in on the green planned trajectory, and the badge reads RUN PASS at the end.
Share it as a link
Section titled “Share it as a link”Once the scenario, the solution and the verdict live in a GitHub repository,
one URL opens all three, with no install and no extension: append the
scenario’s GitHub file URL to ?open=, then add &solution= and &verdict=
(either relative to the scenario file or as full GitHub URLs). Only ?open=
is required. The same three parameters work against a local folder that
drawtonomy-cr open is
serving.
https://drawtonomy.com/?open=https://github.com/acme/scenarios/blob/main/cut-in/ZAM_CutIn-1_1_T-1.xml &solution=ZAM_CutIn-1_1_T-1_solution.xml &verdict=ZAM_CutIn-1_1_T-1_solution.verdict.jsonCan I convert OpenSCENARIO to CommonRoad?
Section titled “Can I convert OpenSCENARIO to CommonRoad?”Yes. Open a .xosc together with its .xodr, mark the ego, pick a goal lane,
then Export ▸ .xml (CommonRoad). The road network becomes lanelets,
every other actor becomes a dynamicObstacle with its trajectory, and the ego
becomes the planningProblem. The steps are in
Export a scenario.
Which CommonRoad version does drawtonomy read and write?
Section titled “Which CommonRoad version does drawtonomy read and write?”CommonRoad XML 2020a, for both scenario and solution files. The output is
validated against the official XSD and read unchanged by commonroad-io, the
drivability checker and commonroad-reactive-planner.
Does drawtonomy run the official drivability checker?
Section titled “Does drawtonomy run the official drivability checker?”No. drawtonomy writes the scenario and replays the solution;
commonroad-drivability-checker decides whether the solution passed. The
drawtonomy-cr verdict command runs the four official checks and writes a
small JSON sidecar that drawtonomy shows on the run badge. See
Verdict reference.
Do I need the planning trace?
Section titled “Do I need the planning trace?”No. The solution.xml is the only required file. A
planning trace is optional and
adds what the planner intended at each replanning cycle on top of what it
drove.
Is this Linux only?
Section titled “Is this Linux only?”The editor, the export and the replay run in any browser. Only the official
checker needs Linux x86_64, because that is the only platform
commonroad-drivability-checker ships wheels for. Without it, verdict exits
with code 3 and one line saying so, and everything else still works.
Do I have to install anything to open a CommonRoad file?
Section titled “Do I have to install anything to open a CommonRoad file?”No. drawtonomy.com reads CommonRoad .xml in the
browser. pip install drawtonomy-commonroad is only needed for the verdict
step and the drawtonomy-cr open loop.
Can I use my own vehicle model?
Section titled “Can I use my own vehicle model?”Yes. The solution declares the CommonRoad vehicle model (KS, PM, …) and
vehicle type (BMW_320i, …) that the checker judges with. Declare the same
body in a planning trace so
drawtonomy draws what the checker saw.
Status
Section titled “Status”| Format | CommonRoad XML 2020a (scenario + solution) |
| Package | pip install drawtonomy-commonroad (PyPI), Python 3.11+ |
| Validated with | official XSD · commonroad-io read/write round-trip · drivability checker · commonroad-reactive-planner · import to re-export round-trip over the 635 hand-crafted scenarios of the official benchmark corpus |
| Ego / goal | mark the ego as external control, pick a goal lane on the canvas |
| Import | CommonRoad scenario .xml (2020a): lanelets, obstacles, planning problem, goal lane; unsupported elements carried through to re-export |
| Replay inputs | CommonRoad solution.xml · checker verdict (.verdict.json) · planning trace · esmini .csv log · drawtonomy recording |
| Share | ?open=<GitHub file URL>, plus &solution= / &verdict= |
| Not drawn | traffic signs, traffic lights and intersections are carried through on import and re-export, but are not editable on the canvas |
| Availability | in the app at drawtonomy.com, no install |
Have a planner workflow you would like this to fit, or a benchmark scenario that does not open cleanly? Get in touch.
Related: Open and play a .xosc, Export formats, drawtonomy for GitHub.