Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1d59b38
feat: add RerunBridge module and CLI tool
leshy Jan 29, 2026
1d41769
rerun bridge blueprint
leshy Jan 30, 2026
543fbd3
adding stop method to bridge
leshy Jan 30, 2026
99fd5fc
working on rerun conversion to bridge
leshy Jan 30, 2026
a12a955
small cleanup
leshy Jan 30, 2026
c001f37
supress treid warning
leshy Jan 30, 2026
4886723
occupancygrid meshing rewrite
leshy Jan 30, 2026
19ff943
bridge inline imports
leshy Jan 30, 2026
b189926
implemented to_observable for dimos standard callbacks
leshy Jan 31, 2026
d0d3fb3
settled on the temporary bridge api
leshy Jan 31, 2026
e0e1aef
Merge remote-tracking branch 'origin/dev' into feat/rerun-bridge
leshy Jan 31, 2026
9900c2f
restructure of pubsub patterns, good bridge match api
leshy Jan 31, 2026
6344b0d
planner uses occupancygrid now, bridge improvements
leshy Feb 1, 2026
433c786
image pickle fix
leshy Feb 1, 2026
d9a841c
paul good vis
leshy Feb 1, 2026
ed0b926
renamed visual transforms to converters
leshy Feb 1, 2026
7eae78e
small cleamnup, pulled image from dev
leshy Feb 1, 2026
f05ce21
looks nice
leshy Feb 1, 2026
fe36ba3
camerainfo knows how to render itself in the space
leshy Feb 1, 2026
7273ab3
Merge dev into feat/rerun-bridge
leshy Feb 1, 2026
4eff56c
typing for to_rerun calls
leshy Feb 1, 2026
b49b596
utils type fix
leshy Feb 1, 2026
1c76ebe
better transport comment
leshy Feb 1, 2026
16843de
base blueprints defined
leshy Feb 1, 2026
a7f5c84
small restructure
leshy Feb 1, 2026
834fe3b
old rerun kicked out
leshy Feb 1, 2026
dc5604d
typing cleanup
leshy Feb 1, 2026
93865b8
blueprints update
leshy Feb 1, 2026
face6e5
type fixes, manip type ignores
leshy Feb 1, 2026
810e79e
occupancygrid is never an image
leshy Feb 1, 2026
9d32431
tf cleanup
leshy Feb 2, 2026
7844b00
bridge comments, box for go2
leshy Feb 2, 2026
5673c7d
small comments
leshy Feb 3, 2026
085fd34
Merge branch 'dev' into feat/rerun-bridge
leshy Feb 3, 2026
670c3d3
turn off local rerun
leshy Feb 3, 2026
eeeea9c
fix mypy type errors in CameraInfo and drake_world
leshy Feb 3, 2026
be4f4df
merge dev, keep local docs
leshy Feb 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions dimos/core/base_blueprints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 2026 Dimensional Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import platform

from dimos.constants import DEFAULT_CAPACITY_COLOR_IMAGE
from dimos.core.blueprints import Blueprint, autoconnect
from dimos.core.transport import (
pSHMTransport,
)
from dimos.msgs.sensor_msgs import Image
from dimos.robot.foxglove_bridge import foxglove_bridge
from dimos.visualization.rerun.bridge import rerun_bridge


def base_blueprint() -> Blueprint:
from dimos.core.global_config import GlobalConfig

_config = GlobalConfig()

# Mac has some issue with high bandwidth UDP, so we use pSHMTransport for color_image
# actually we can use pSHMTransport for all platforms, and for all streams
# TODO need a global transport toggle on blueprints/global config
mac_transports: dict[tuple[str, type], pSHMTransport[Image]] = {
("color_image", Image): pSHMTransport(
"color_image", default_capacity=DEFAULT_CAPACITY_COLOR_IMAGE
),
}

base = (
autoconnect() if platform.system() == "Linux" else autoconnect().transports(mac_transports)
)

with_vis = None

if _config.viewer_backend == "foxglove":
with_vis = autoconnect(
base,
foxglove_bridge(shm_channels=["/color_image#sensor_msgs.Image"]),
)
elif _config.viewer_backend == "rerun":
with_vis = autoconnect(base, rerun_bridge())
elif _config.viewer_backend == "rerun-web":
with_vis = autoconnect(base, rerun_bridge(viewer_mode="web"))
else:
with_vis = base

return with_vis
64 changes: 0 additions & 64 deletions dimos/core/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
from types import MappingProxyType
from typing import Any, Literal, get_args, get_origin, get_type_hints

import rerun as rr
import rerun.blueprint as rrb

from dimos.core.global_config import GlobalConfig
from dimos.core.module import Module, is_module_type
from dimos.core.module_coordinator import ModuleCoordinator
Expand Down Expand Up @@ -456,62 +453,6 @@ def _connect_rpc_methods(self, module_coordinator: ModuleCoordinator) -> None:
requested_method_name, rpc_methods_dot[requested_method_name]
)

def _init_rerun_blueprint(self, module_coordinator: ModuleCoordinator) -> None:
"""Compose and send Rerun blueprint from module contributions.

Collects rerun_views() from all modules and composes them into a unified layout.
"""
# Collect view contributions from all modules
side_panels = []
for blueprint in self.blueprints:
if hasattr(blueprint.module, "rerun_views"):
views = blueprint.module.rerun_views()
if views:
side_panels.extend(views)

# Always include latency panel if we have any panels
if side_panels:
side_panels.append(
rrb.TimeSeriesView(
name="Latency (ms)",
origin="/metrics",
contents=[
"+ /metrics/voxel_map/latency_ms",
"+ /metrics/costmap/latency_ms",
],
)
)

# Compose final layout
if side_panels:
composed_blueprint = rrb.Blueprint(
rrb.Horizontal(
rrb.Spatial3DView(
name="3D View",
origin="world",
background=[0, 0, 0],
),
rrb.Vertical(*side_panels, row_shares=[2] + [1] * (len(side_panels) - 1)),
column_shares=[3, 1],
),
rrb.TimePanel(state="collapsed"),
rrb.SelectionPanel(state="collapsed"),
rrb.BlueprintPanel(state="collapsed"),
)
rr.send_blueprint(composed_blueprint)

def _start_rerun(self, global_config: GlobalConfig) -> None:
# Initialize Rerun server before deploying modules (if backend is Rerun)
if global_config.rerun_enabled and global_config.viewer_backend.startswith("rerun"):
try:
from dimos.dashboard.rerun_init import init_rerun_server

server_addr = init_rerun_server(viewer_mode=global_config.viewer_backend)
global_config.model_copy(update={"rerun_server_addr": server_addr})
logger.info("Rerun server initialized", addr=server_addr)
except Exception as e:
logger.warning(f"Failed to initialize Rerun server: {e}")

def build(
self,
global_config: GlobalConfig | None = None,
Expand All @@ -525,7 +466,6 @@ def build(

self._check_requirements()
self._verify_no_name_conflicts()
self._start_rerun(global_config)

module_coordinator = ModuleCoordinator(global_config=global_config)
module_coordinator.start()
Expand All @@ -538,10 +478,6 @@ def build(

module_coordinator.start_all_modules()

# Compose and send Rerun blueprint from module contributions
if global_config.viewer_backend.startswith("rerun"):
self._init_rerun_blueprint(module_coordinator)

return module_coordinator


Expand Down
4 changes: 2 additions & 2 deletions dimos/core/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from dimos.mapping.occupancy.path_map import NavigationStrategy

ViewerBackend: TypeAlias = Literal["rerun-web", "rerun-native", "foxglove"]
ViewerBackend: TypeAlias = Literal["rerun", "rerun-web", "foxglove", "none"]


def _get_all_numbers(s: str) -> list[float]:
Expand All @@ -33,7 +33,7 @@ class GlobalConfig(BaseSettings):
replay: bool = False
rerun_enabled: bool = True
rerun_server_addr: str | None = None
viewer_backend: ViewerBackend = "rerun-native"
viewer_backend: ViewerBackend = "none"
n_dask_workers: int = 2
memory_limit: str = "auto"
mujoco_camera_position: str | None = None
Expand Down
20 changes: 20 additions & 0 deletions dimos/core/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@

T = TypeVar("T") # type: ignore[misc]

# TODO
# Transports need to be rewritten and simplified,
#
# there is no need for them to get a reference to "a stream" on publish/subscribe calls
# this is a legacy from dask transports.
#
# new transport should literally have 2 functions (next to start/stop)
# "send(msg)" and "receive(callback)" and that's all
#
# we can also consider pubsubs conforming directly to Transport specs
# and removing PubSubTransport glue entirely
#
# Why not ONLY pubsubs without Transport abstraction?
#
# General idea for transports (and why they exist at all)
# is that they can be * anything * like
#
# a web camera rtsp stream for Image, audio stream from mic, etc
# http binary streams, tcp connections etc


class PubSubTransport(Transport[T]):
topic: Any
Expand Down
34 changes: 0 additions & 34 deletions dimos/dashboard/__init__.py

This file was deleted.

Binary file removed dimos/dashboard/dimos.rbl
Binary file not shown.
166 changes: 0 additions & 166 deletions dimos/dashboard/rerun_init.py

This file was deleted.

Loading
Loading