Skip to content

feat(scenario_generation): report a rollout as vector scene geometry - #51

Draft
HansRobo wants to merge 1 commit into
tier4-mainfrom
pr/scenario-sim-scene-trace
Draft

HansRobo wants to merge 1 commit into
tier4-mainfrom
pr/scenario-sim-scene-trace

Conversation

@HansRobo

Copy link
Copy Markdown
Owner

What

A scenario_sim rollout can report what happened as geometry instead of as pixels.

Per tick it appends one frame to scene_trace.jsonl.gz: the pre-step scene and the map-frame
plan the renderer is handed, with clearance and collision attached once the ego's history is warm
(warm-up ticks carry nulls, because nothing scored them). Per map it writes one asset, shared by
every case on that map, into the run directory rather than the case directory.

It imports no matplotlib and invokes no encoder, so a run that draws nothing still reports what
happened. RolloutConfig.write_scene_trace gates it.

Why

PNG or mp4 output answers "what did this look like" but not "where was the ego, what was around it,
and what did it plan". The trace is small enough to keep for a whole suite and is what a browser
replay reads.

Note for review

write_scene_trace currently defaults to True, so every run starts writing
scene_trace.jsonl.gz and a map asset. Happy to flip it to opt-in if that default is not wanted.

Tests

tests/test_scene_trace.py (new): the frame the writer emits, the warm-up nulls, and the map
asset's placement and reuse.

scenario_generation/tests/: 257 passed / 15 skipped / 2 failed. The two failures are
test_map_cache.py, which is red on tier4-main itself and is fixed by #48.

@HansRobo
HansRobo force-pushed the pr/scenario-sim-scene-trace branch 2 times, most recently from b7b2fa3 to 961631f Compare August 21, 2026 06:40
A rollout writes what happened as geometry rather than as pixels: one gzipped JSONL
frame per tick with the pre-step scene and the map-frame plan, plus one map asset per
map shared by every case on it. It imports no matplotlib and invokes no encoder, so a
run that draws nothing still reports what happened.

Warm-up ticks carry null metrics: nothing scored them.
@HansRobo
HansRobo force-pushed the pr/scenario-sim-scene-trace branch from 961631f to 6e78c24 Compare August 27, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant