-
Notifications
You must be signed in to change notification settings - Fork 700
go2 dds decoding improvements #2521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,8 +27,32 @@ def rerun( | |
| out: str = typer.Option(None, "--out", help="Output .rrd (default: alongside the source)"), | ||
| seconds: float = typer.Option(None, "--seconds", help="Only the first N seconds"), | ||
| no_gui: bool = typer.Option(False, "--no-gui", help="Write the .rrd but don't open the viewer"), | ||
| root: str = typer.Option( | ||
| None, "--root", help="Nest every stream under this entity path (<root>/<name>)" | ||
| ), | ||
| ) -> None: | ||
| """Render a memory2 store into rerun (writes a .rrd, then opens the viewer).""" | ||
| from dimos.memory2.cli.render import open_store, render_store | ||
| from dimos.memory2.cli.dataset import open_dataset | ||
| from dimos.memory2.cli.render import render_store | ||
|
|
||
| render_store(open_store(path), out=out, seconds=seconds, no_gui=no_gui) | ||
| render_store(open_dataset(path), out=out, seconds=seconds, no_gui=no_gui, root=root) | ||
|
|
||
|
|
||
| @mem_app.command() | ||
| def summary( | ||
| dataset: str = typer.Argument(..., help="Dataset .db/.mcap: bare name (cwd or data/) or path"), | ||
| ) -> None: | ||
| """Print per-stream counts and time ranges for a recorded dataset.""" | ||
| from dimos.memory2.cli.dataset import open_dataset | ||
|
|
||
| store = open_dataset(dataset) | ||
| with store: | ||
| for name in store.list_streams(): | ||
| store.streams[name] # register so summary() includes it | ||
| print(store.summary()) | ||
|
|
||
| # mcap files may carry channels we have no codec for (e.g. h264 video); | ||
| # list them so the inventory is complete rather than silently filtered. | ||
| uncodec = getattr(store, "uncodec_channels", None) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like this approach of getting random methods by name. If you specifically need |
||
| for topic, (count, schema) in sorted(uncodec().items()) if uncodec else []: | ||
| print(f" (no codec) {topic}: {count} msgs [{schema or '?'}]") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better to use |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kinda indicates a deficiency in the API if you have to include empty statements to get
.summary()to work.Shouldn't
.summary()loop over the streams instead?