From 1083f4653f7b47a5711dd0e380f67c18734109e1 Mon Sep 17 00:00:00 2001 From: spomichter Date: Wed, 11 Mar 2026 16:55:11 +0000 Subject: [PATCH 1/2] fix(rerun): only rate-limit heavy message types (Image, PointCloud2) The blanket per-entity-path rate limiter (PR #1509) was dropping low-frequency but critical messages like navigation Path and PointStamped (click-to-nav). Only rate-limit types with large payloads that actually cause viewer OOM: Image (~1 MB/frame) and PointCloud2 (~600-800 KB/frame). Light messages (Path, Twist, TF, EntityMarkers, etc.) now pass through unthrottled. --- dimos/visualization/rerun/bridge.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dimos/visualization/rerun/bridge.py b/dimos/visualization/rerun/bridge.py index 85180fa40..74b43810c 100644 --- a/dimos/visualization/rerun/bridge.py +++ b/dimos/visualization/rerun/bridge.py @@ -36,10 +36,19 @@ from dimos.core.core import rpc from dimos.core.module import Module, ModuleConfig +from dimos.msgs.sensor_msgs import Image +from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 from dimos.protocol.pubsub.impl.lcmpubsub import LCM from dimos.protocol.pubsub.patterns import Glob, pattern_matches from dimos.utils.logging_config import setup_logger +# Message types with large payloads that need rate-limiting. +# Image (~1 MB/frame at 30 fps) and PointCloud2 (~600-800 KB/frame) +# cause viewer OOM if logged at full rate. Light messages +# (Path, PointStamped, Twist, TF, EntityMarkers …) pass through +# unthrottled so navigation overlays and user input are never dropped. +_HEAVY_MSG_TYPES: tuple[type, ...] = (Image, PointCloud2) + RERUN_GRPC_PORT = 9876 RERUN_WEB_PORT = 9090 @@ -254,10 +263,11 @@ def _on_message(self, msg: Any, topic: Any) -> None: # convert a potentially complex topic object into an str rerun entity path entity_path: str = self._get_entity_path(topic) - # Rate-limit per entity path to prevent viewer memory exhaustion. - # High-bandwidth streams (e.g. 30fps camera) would otherwise flood - # the viewer with data faster than it can evict, causing OOM. - if self.config.min_interval_sec > 0: + # Rate-limit heavy data types to prevent viewer memory exhaustion. + # High-bandwidth streams (e.g. 30fps camera, lidar) would otherwise + # flood the viewer faster than it can evict, causing OOM. Light + # messages (Path, PointStamped, TF, etc.) pass through unthrottled. + if self.config.min_interval_sec > 0 and isinstance(msg, _HEAVY_MSG_TYPES): now = time.monotonic() last = self._last_log.get(entity_path, 0.0) if now - last < self.config.min_interval_sec: From cba0c47b9e9d3acd36a19c8ee63b85fe3ef43b48 Mon Sep 17 00:00:00 2001 From: s Date: Wed, 11 Mar 2026 10:27:09 -0700 Subject: [PATCH 2/2] Fix import pointcloud2 Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- dimos/visualization/rerun/bridge.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dimos/visualization/rerun/bridge.py b/dimos/visualization/rerun/bridge.py index 74b43810c..9bba9dd82 100644 --- a/dimos/visualization/rerun/bridge.py +++ b/dimos/visualization/rerun/bridge.py @@ -36,8 +36,7 @@ from dimos.core.core import rpc from dimos.core.module import Module, ModuleConfig -from dimos.msgs.sensor_msgs import Image -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.msgs.sensor_msgs import Image, PointCloud2 from dimos.protocol.pubsub.impl.lcmpubsub import LCM from dimos.protocol.pubsub.patterns import Glob, pattern_matches from dimos.utils.logging_config import setup_logger