[Vibed Experiment] feat: render TF tree as hierarchical Rerun entity paths#1653
Open
[Vibed Experiment] feat: render TF tree as hierarchical Rerun entity paths#1653
Conversation
Intercept TFMessages in the Rerun bridge and render transforms as hierarchical entity paths (e.g. world/base_link/camera/optical) instead of flat paths. This uses DFS traversal of the accumulated TF tree with rate-limited re-renders and cached adjacency structures for performance. - Add _render_tf_tree() with DFS walk, cycle protection, and root detection - Intercept TFMessages in _on_message with rate-limiting via min_interval_sec - Cache adjacency dict, rebuilt only when edge count changes - Add Config.tf_enabled flag to toggle TF interception - Add 5 unit tests: chain hierarchy, multiple roots, tf_disabled fallback, incremental updates, and cycle protection Closes #1627 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR closes the long-standing TODO in the Rerun bridge by giving it its own Key changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PubSub
participant RerunBridgeModule
participant MultiTBuffer
participant Rerun
PubSub->>RerunBridgeModule: _on_message(TFMessage, topic)
RerunBridgeModule->>MultiTBuffer: receive_transform(*transforms)
RerunBridgeModule->>RerunBridgeModule: check rate-limit (min_interval_sec)
alt interval elapsed
RerunBridgeModule->>RerunBridgeModule: _render_tf_tree()
note over RerunBridgeModule: Rebuild adjacency cache if new edges
loop DFS over roots
RerunBridgeModule->>MultiTBuffer: get_transform(parent, child)
MultiTBuffer-->>RerunBridgeModule: Transform | None
RerunBridgeModule->>Rerun: rr.log(entity_path, Transform3D)
end
end
RerunBridgeModule-->>PubSub: return (TF path consumed)
Reviews (1): Last reviewed commit: "CI code cleanup" | Re-trigger Greptile |
- Bridge now subscribes to MultiTBuffer callbacks instead of intercepting TFMessages and maintaining its own buffer - Added subscribe() method and children_of/roots properties to MultiTBuffer with edge-count caching for O(1) repeated access - BFS in get_transform_search uses pre-built adjacency map (O(E)) instead of calling get_connections per node - receive_tfmessage batches all transforms in a single receive_transform call - children_of returns Mapping instead of dict for immutability - Fixed tests: cycle assertion tightened to == 0, unused `call` import removed, _make_bridge initializes _last_tf_render_time and injects MultiTBuffer via _tf Addresses review comments on #1653. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
TFMessagein the Rerun bridge and render transforms as hierarchical entity paths (e.g.world/base_link/camera/optical) via DFS traversal of the accumulated TF treemin_interval_secand cache the adjacency dict (rebuilt only on new edges) for performanceConfig.tf_enabledflag, cycle protection in DFS, and 5 unit tests covering chain hierarchy, multiple roots, disabled fallback, incremental updates, and cycle protectionCloses #1627
Test plan
pytest dimos/visualization/rerun/test_tf_tree.py -v)🤖 Generated with Claude Code