콘텐츠로 이동

CommonRoad scenario editor, export, and planner replay

이 콘텐츠는 아직 번역되지 않았습니다.

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.

Open a cut-in .xosc from GitHub, mark the ego and a goal lane, export CommonRoad XML, let commonroad-reactive-planner solve it, and replay the solution back in drawtonomy.

Every row ends at the same place: a CommonRoad XML your planner reads, a solution you replay, and a verdict on the badge.

Start fromHowWhat you get
A scenario you drawlanes, vehicles, speeds, an ego mark and a goal lane on the canvasa CommonRoad 2020a scenario with lanelets, dynamicObstacle trajectories and a planningProblem
An existing OpenSCENARIO filedrop 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 scenariodrop the .xml on the canvasthe 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.

  • You develop a motion planner and want scenarios beyond the benchmark corpus. Go to Bring your own planner. It starts at pip install and 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.

The drawtonomy canvas before Play: a 50 m goal stretch highlighted in tan on the right lane, and the Attributes panel for the Ego showing "Ego (external control)" ticked the Goal row reading "Lane 10" with 62.1 to 112.1 m next to it

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 unreactive ego overlapping the cutting-in vehicle at t = 12.9 s in drawtonomy, the RUN FAIL badge lit in the transport bar

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.

The Export menu listing .xml (CommonRoad) and .xml (CommonRoad solution) next to Lanelet2 and OpenDRIVE

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

The same file rendered by commonroad-io's official renderer: grey lanelets, the orange ego overlapping the blue obstacle, a dotted future trajectory ahead of them

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

commonroad-reactive-planner's ego passing left of the cut-in vehicle, drawn in the official renderer

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

The planner's solution replayed in drawtonomy: the ego passes left of the cutting-in vehicle along the green planned trajectory

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.

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.json

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.

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.

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.

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.

FormatCommonRoad XML 2020a (scenario + solution)
Packagepip install drawtonomy-commonroad (PyPI), Python 3.11+
Validated withofficial 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 / goalmark the ego as external control, pick a goal lane on the canvas
ImportCommonRoad scenario .xml (2020a): lanelets, obstacles, planning problem, goal lane; unsupported elements carried through to re-export
Replay inputsCommonRoad solution.xml · checker verdict (.verdict.json) · planning trace · esmini .csv log · drawtonomy recording
Share?open=<GitHub file URL>, plus &solution= / &verdict=
Not drawntraffic signs, traffic lights and intersections are carried through on import and re-export, but are not editable on the canvas
Availabilityin 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.