Skip to content
Merged
2 changes: 1 addition & 1 deletion dimos/core/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from dimos.mapping.occupancy.path_map import NavigationStrategy

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


def _get_all_numbers(s: str) -> list[float]:
Expand Down
11 changes: 10 additions & 1 deletion dimos/navigation/replanning_a_star/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from dimos.core.global_config import GlobalConfig, global_config
from dimos.core.module import Module
from dimos.core.stream import In, Out
from dimos.msgs.geometry_msgs import PoseStamped, Twist
from dimos.msgs.geometry_msgs import PointStamped, PoseStamped, Twist
from dimos.msgs.nav_msgs import OccupancyGrid, Path
from dimos.navigation.base import NavigationInterface, NavigationState
from dimos.navigation.replanning_a_star.global_planner import GlobalPlanner
Expand All @@ -31,6 +31,7 @@ class ReplanningAStarPlanner(Module, NavigationInterface):
odom: In[PoseStamped] # TODO: Use TF.
global_costmap: In[OccupancyGrid]
goal_request: In[PoseStamped]
clicked_point: In[PointStamped]
target: In[PoseStamped]

goal_reached: Out[Bool]
Expand Down Expand Up @@ -60,6 +61,14 @@ def start(self) -> None:
)
self._disposables.add(Disposable(self.target.subscribe(self._planner.handle_goal_request)))

self._disposables.add(
Disposable(
self.clicked_point.subscribe(
lambda pt: self._planner.handle_goal_request(pt.to_pose_stamped())
)
)
)

self._disposables.add(self._planner.path.subscribe(self.path.publish))

self._disposables.add(self._planner.cmd_vel.subscribe(self.cmd_vel.publish))
Expand Down
1 change: 1 addition & 0 deletions dimos/robot/all_blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"unitree-go2-agentic-mcp": "dimos.robot.unitree.go2.blueprints.agentic.unitree_go2_agentic_mcp:unitree_go2_agentic_mcp",
"unitree-go2-agentic-ollama": "dimos.robot.unitree.go2.blueprints.agentic.unitree_go2_agentic_ollama:unitree_go2_agentic_ollama",
"unitree-go2-basic": "dimos.robot.unitree.go2.blueprints.basic.unitree_go2_basic:unitree_go2_basic",
"unitree-go2-click-nav": "dimos.robot.unitree.go2.blueprints.smart.unitree_go2_click_nav:unitree_go2_click_nav",
"unitree-go2-detection": "dimos.robot.unitree.go2.blueprints.smart.unitree_go2_detection:unitree_go2_detection",
"unitree-go2-ros": "dimos.robot.unitree.go2.blueprints.smart.unitree_go2_ros:unitree_go2_ros",
"unitree-go2-spatial": "dimos.robot.unitree.go2.blueprints.smart.unitree_go2_spatial:unitree_go2_spatial",
Expand Down
6 changes: 6 additions & 0 deletions dimos/robot/unitree/go2/blueprints/basic/unitree_go2_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def _static_base_link(rr: Any) -> list[Any]:
from dimos.visualization.rerun.bridge import rerun_bridge

with_vis = autoconnect(_transports_base, rerun_bridge(**rerun_config))
case "rerun-connect":
from dimos.visualization.rerun.bridge import rerun_bridge

with_vis = autoconnect(
_transports_base, rerun_bridge(viewer_mode="connect", **rerun_config)
)
case "rerun-web":
from dimos.visualization.rerun.bridge import rerun_bridge

Expand Down
39 changes: 39 additions & 0 deletions dimos/robot/unitree/go2/blueprints/smart/unitree_go2_click_nav.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
# Copyright 2025-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.

from dimos.core.blueprints import autoconnect
from dimos.core.transport import LCMTransport
from dimos.mapping.costmapper import cost_mapper
from dimos.mapping.voxels import voxel_mapper
from dimos.msgs.geometry_msgs import PointStamped
from dimos.navigation.replanning_a_star.module import replanning_a_star_planner
from dimos.robot.unitree.go2.blueprints.basic.unitree_go2_basic import unitree_go2_basic

unitree_go2_click_nav = (
autoconnect(
unitree_go2_basic,
voxel_mapper(voxel_size=0.1),
cost_mapper(),
replanning_a_star_planner(),
)
.transports(
{
("clicked_point", PointStamped): LCMTransport("/clicked_point", PointStamped),
}
)
Comment on lines +31 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this since it's the default.

Suggested change
.transports(
{
("clicked_point", PointStamped): LCMTransport("/clicked_point", PointStamped),
}
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for visability

.global_config(n_workers=6, robot_model="unitree_go2")
)

__all__ = ["unitree_go2_click_nav"]
5 changes: 4 additions & 1 deletion dimos/visualization/rerun/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class RerunConvertible(Protocol):
def to_rerun(self) -> RerunData: ...


ViewerMode = Literal["native", "web", "none"]
ViewerMode = Literal["native", "web", "connect", "none"]


def _default_blueprint() -> Blueprint:
Expand Down Expand Up @@ -158,6 +158,7 @@ class Config(ModuleConfig):
entity_prefix: str = "world"
topic_to_entity: Callable[[Any], str] | None = None
viewer_mode: ViewerMode = "native"
connect_url: str = "rerun+http://127.0.0.1:9877/proxy"
memory_limit: str = "25%"

# Blueprint factory: callable(rrb) -> Blueprint for viewer layout configuration
Expand Down Expand Up @@ -265,6 +266,8 @@ def start(self) -> None:
elif self.config.viewer_mode == "web":
server_uri = rr.serve_grpc()
rr.serve_web_viewer(connect_to=server_uri, open_browser=False)
elif self.config.viewer_mode == "connect":
rr.connect_grpc(self.config.connect_url)
# "none" - just init, no viewer (connect externally)

if self.config.blueprint:
Expand Down
Loading