1818
1919from dataclasses import dataclass , field
2020from functools import lru_cache
21- import time
2221from typing import (
2322 TYPE_CHECKING ,
2423 Any ,
@@ -163,14 +162,15 @@ def _resolve_viewer_mode() -> ViewerMode:
163162class Config (ModuleConfig ):
164163 """Configuration for RerunBridgeModule."""
165164
166- pubsubs : list [SubscribeAllCapable [Any , Any ]] = field (default_factory = lambda : [LCM ()])
165+ pubsubs : list [SubscribeAllCapable [Any , Any ]] = field (
166+ default_factory = lambda : [LCM (autoconf = True )]
167+ )
167168
168169 visual_override : dict [Glob | str , Callable [[Any ], Archetype ]] = field (default_factory = dict )
169170
170171 # Static items logged once after start. Maps entity_path -> callable(rr) returning Archetype
171172 static : dict [str , Callable [[Any ], Archetype ]] = field (default_factory = dict )
172173
173- min_interval_sec : float = 0.1 # Rate-limit per entity path (default: 10 Hz max)
174174 entity_prefix : str = "world"
175175 topic_to_entity : Callable [[Any ], str ] | None = None
176176 viewer_mode : ViewerMode = field (default_factory = _resolve_viewer_mode )
@@ -191,7 +191,7 @@ class RerunBridgeModule(Module):
191191 Example:
192192 from dimos.protocol.pubsub.impl.lcmpubsub import LCM
193193
194- lcm = LCM()
194+ lcm = LCM(autoconf=True )
195195 bridge = RerunBridgeModule(pubsubs=[lcm])
196196 bridge.start()
197197 # All messages with to_rerun() are now logged to Rerun
@@ -254,18 +254,6 @@ def _on_message(self, msg: Any, topic: Any) -> None:
254254 # convert a potentially complex topic object into an str rerun entity path
255255 entity_path : str = self ._get_entity_path (topic )
256256
257- # Rate-limit per entity path to prevent viewer memory exhaustion.
258- # High-bandwidth streams (e.g. 30fps camera) would otherwise flood
259- # the viewer with data faster than it can evict, causing OOM.
260- if self .config .min_interval_sec > 0 :
261- now = time .monotonic ()
262- if not hasattr (self , "_last_log" ):
263- self ._last_log : dict [str , float ] = {}
264- last = self ._last_log .get (entity_path , 0.0 )
265- if now - last < self .config .min_interval_sec :
266- return
267- self ._last_log [entity_path ] = now
268-
269257 # apply visual overrides (including final_convert which handles .to_rerun())
270258 rerun_data : RerunData | None = self ._visual_override_for_entity_path (entity_path )(msg )
271259
@@ -286,7 +274,6 @@ def start(self) -> None:
286274
287275 super ().start ()
288276
289- self ._last_log .clear ()
290277 logger .info ("Rerun bridge starting" , viewer_mode = self .config .viewer_mode )
291278
292279 # Initialize and spawn Rerun viewer
@@ -357,16 +344,12 @@ def run_bridge(
357344 """Start a RerunBridgeModule with default LCM config and block until interrupted."""
358345 import signal
359346
360- from dimos .protocol .service .lcmservice import autoconf
361-
362- autoconf (check_only = True )
363-
364347 bridge = RerunBridgeModule (
365348 viewer_mode = viewer_mode ,
366349 memory_limit = memory_limit ,
367350 # any pubsub that supports subscribe_all and topic that supports str(topic)
368351 # is acceptable here
369- pubsubs = [LCM ()],
352+ pubsubs = [LCM (autoconf = True )],
370353 )
371354
372355 bridge .start ()
0 commit comments