feat(viewer): native Rerun CLI arg handling via run_with_app_wrapper()#14
Merged
spomichter merged 1 commit intomainfrom Mar 16, 2026
Merged
feat(viewer): native Rerun CLI arg handling via run_with_app_wrapper()#14spomichter merged 1 commit intomainfrom
spomichter merged 1 commit intomainfrom
Conversation
…apper Replace custom Args struct (5 flags) with Rerun's full CLI parser. All stock Rerun flags now work: --connect, --serve-grpc, --serve-web, --memory-limit, --port, --bind, --save, subcommands (reset, rrd, auth), etc. DimOS behavior (keyboard teleop, click-to-nav) injected via AppWrapper callback that wraps re_viewer::App in DimosApp — only for the native viewer path. All other modes (headless gRPC, web viewer, save) work identically to stock Rerun. viewer.rs: 265 → 92 lines.
c17fa2a to
2e989cf
Compare
This was referenced Mar 17, 2026
spomichter
added a commit
that referenced
this pull request
Mar 18, 2026
* feat: deag, click on enable * fix: remove logging * fix: reposition default * fix: default position * fix(viewer): restore click-to-nav via StartupOptionsPatch PR #14's run_with_app_wrapper rewrote viewer.rs and dropped the on_event handler for click-to-navigate. This restores it properly: - Add StartupOptionsPatch struct to rerun entrypoint with on_event callback - Wire Ctrl+click -> PointStamped LCM on /clicked_point in viewer.rs - Arc<AtomicBool> for ctrl state sharing (Send required by AppWrapper) - 100ms debounce on nav goal publishing --------- Co-authored-by: ruthwikdasyam <ruthwikdasyam@gmail.com>
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
Replace dimos-viewer's custom 5-flag Args struct with Rerun's full native CLI parser. All ~30 stock Rerun flags now work unchanged (
--connect,--serve-grpc,--serve-web,--memory-limit,--port,--bind,--save, subcommands, etc.).DimOS behavior (keyboard teleop, click-to-nav) is injected cleanly via two new extension points:
AppWrapper— wrapsre_viewer::AppinDimosAppfor keyboard teleop overlayStartupOptionsPatch— patchesStartupOptionsafter CLI parsing (injectson_eventfor click-to-nav)Changes
Native CLI args
viewer.rs: 265 → ~100 lines. Delegates torerun::run_with_app_wrapper()instead of manual setup.reset,rrd,auth), and.rrdfile loading work.--openflag removed; unknown flags properly rejected by clap.Ctrl+click nav goals
/clicked_pointArc<AtomicBool>shared between DimosApp (writes ctrl state) andon_eventcallback (reads it)Keyboard teleop overlay
Multi-robot teleop
KeyboardHandler.set_active_robot(Some("/world/go2"))publishes to/world/go2/cmd_velNone= default/cmd_velchannelRerun entrypoint extensions
pub type AppWrapper— wraps App before eframe gets itpub type StartupOptionsPatch— patches StartupOptions post-CLI-parsepub fn run_with_app_wrapper()— likerun()but with both hooksArgs,native_startup_options_from_argspub for downstream useTesting
14/14 CLI integration tests, 27+ unit tests pass.
cargo build -p dimos-viewer --release cargo test -p dimos-viewer --lib --release ./target/release/dimos-viewer --help ./target/release/dimos-viewer --connect rerun+http://127.0.0.1:9876/proxy ./target/release/dimos-viewer --serve-grpc --port 9877Breaking Changes
--openflag removed (use Rerun's native--connectinstead)--port 9877if needed)