feat: replay blueprint - dimos --replay-db <memory.db> run replay - #3738
Draft
spomichter wants to merge 6 commits into
Draft
feat: replay blueprint - dimos --replay-db <memory.db> run replay#3738spomichter wants to merge 6 commits into
spomichter wants to merge 6 commits into
Conversation
…orded stream - ReplayModule publishes each Out from store.replay() at recorded timing; replay_module(dataset) builds the subclass with the recording's ports (baked_host pattern: assigned at module level, rebuilt in workers from REPLAY_DB / REPLAY_TOPICS env). - replay blueprint = vis_module + Replay, Rerun layout generated from the recorded stream types (3D world + one 2D view per image stream). - dimos replay <file> [--topics] [--speed] [--loop] sets the env and delegates to dimos run replay; extra args pass through. - Replay.pin_anchor(): anchor at the earliest recorded ts before any stream subscribes, so earlier-starting streams keep their first frames.
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
…exports REPLAY_DB for workers
…ild Outs from dataset so workers match
… has the config then), not from import-time class state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dimos --replay-db <memory.db> run replayplays a--recordrecording back onto the bus as a blueprint, rosbag-play style: every recorded stream is anOutport of aReplayModule, so lcmspy/dimos spy, Rerun, and any consumer see it exactly like a live robot.Design
ReplayModule(dimos/memory/replay_module.py):start()opens the store, pins one replay anchor at the earliest recorded ts, and subscribesstore.replay().stream(name).observable()to eachOut.speed,loop,seek,durationare module config (--replay.speedetc.).replay_module(dataset)builds the subclass with oneOut[type]per recorded stream (types from the store registry), soautoconnectcan wire them; the blueprint readsglobal_config.replay_dbat import (--replay-dbmust be a file path).ReplayModule.__init__also creates any missingOutfrom itsdatasetconfig, so a worker that imported the port-less class (workers re-import blueprint modules before receiving the global config) ends up with the same ports. No env vars;lifecycle.pyis untouched. Without a recording the class has no ports, so the blueprint registry never touches a database.replayblueprint (dimos/memory/blueprints.py) =vis_module+Replay. The Rerun layout is generated from the recorded types: one 2D view perImagestream, one 3D world view.Replay.pin_anchor(): without it the anchor pins on the first subscribed stream and streams that start earlier lose their first frames.--replay/ReplayConnectionare untouched; that path fakes a robot from the shipped datasets, this one replays any recording generically.Docs: to be added to
docs/usage/recording.mdonce #3737 lands.Test plan
test_replay_module.py: ports andstream_typescome from the recording, topic filter, bad pattern raises listing names, empty dataset -> no ports; a module instance publishes the recorded messages in order on itsOutspytest dimos/memory dimos/cli dimos/core/coordination+ blueprint registry: passing; mypy cleandimos --replay-db recordings/<run-id>/memory.db run replay(Zenoh, Xvfb): bridge deploys, all 7 recorded streams back on the bus at recorded rates (lidar/odom/tf1.7 Hz,color_image1.9, maps 0.3)color_image+ 3D world (lidar, global map, costmap), 11 entities, 27.6 s timeline