Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c3b2544
mapping
paul-nechifor Nov 29, 2025
ddf381f
move inflation
paul-nechifor Dec 9, 2025
130da36
break things out
paul-nechifor Dec 9, 2025
f4890c9
Merge branch 'dev' into mapping
paul-nechifor Dec 10, 2025
98c899b
fix typing and imports
paul-nechifor Dec 10, 2025
3edcf9b
move resampling
paul-nechifor Dec 10, 2025
e1a51d3
add test for resampling
paul-nechifor Dec 10, 2025
bb6a809
smooth_path
paul-nechifor Dec 10, 2025
9814f63
many changes
paul-nechifor Dec 11, 2025
8548c0b
remove path when stopped
paul-nechifor Dec 15, 2025
62ce4de
remove voronoi
paul-nechifor Dec 15, 2025
e6a1ad7
add voronoi gradient
paul-nechifor Dec 15, 2025
93685bb
remove simple planner
paul-nechifor Dec 15, 2025
ca5ead8
navigation updates
paul-nechifor Dec 15, 2025
2d6ea5f
multiple changes
paul-nechifor Dec 16, 2025
4917ff4
add back deleted code
paul-nechifor Dec 17, 2025
fd366cc
fix tests
paul-nechifor Dec 17, 2025
61ad191
fix header
paul-nechifor Dec 17, 2025
0beef85
fix bad fixture
paul-nechifor Dec 17, 2025
d7ef9bb
fix linting
paul-nechifor Dec 17, 2025
0ede7eb
001
paul-nechifor Dec 17, 2025
5e142a2
check if stuck
paul-nechifor Dec 18, 2025
771df08
try multiple sizes
paul-nechifor Dec 18, 2025
8347f13
minor fixes
paul-nechifor Dec 18, 2025
485a69d
move local_costmap from map.py
paul-nechifor Dec 18, 2025
1925e15
Merge branch 'dev' into mapping
paul-nechifor Dec 18, 2025
1215efa
linting
paul-nechifor Dec 18, 2025
6868247
fix test
paul-nechifor Dec 18, 2025
5af8bc9
tweaks
paul-nechifor Dec 18, 2025
cbfa7d3
add pd control
paul-nechifor Dec 19, 2025
f417bed
improvements
paul-nechifor Dec 19, 2025
0bedaae
unnecessary set
paul-nechifor Dec 19, 2025
37c533c
minor fixes
paul-nechifor Dec 19, 2025
3c9d974
get unique state
paul-nechifor Dec 19, 2025
662c8c0
move the time check to the global planner
paul-nechifor Dec 19, 2025
7895dea
reduce speed
paul-nechifor Dec 19, 2025
610fce5
remove assertion which does not work in CI
paul-nechifor Dec 19, 2025
2cbf19b
add minimum velocity
paul-nechifor Dec 20, 2025
62e7599
fix
paul-nechifor Dec 20, 2025
24ee6dd
remove duplicate
paul-nechifor Dec 20, 2025
435b131
check if veers off track
paul-nechifor Dec 20, 2025
95148ba
safety issues
paul-nechifor Dec 21, 2025
4655f41
fix threading issue
paul-nechifor Dec 21, 2025
f586de0
Merge branch 'dev' into mapping
paul-nechifor Dec 22, 2025
d1ec605
remove prints
paul-nechifor Dec 22, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ yolo11n.pt
.claude

/logs

*.so
3 changes: 3 additions & 0 deletions data/.lfs/apartment.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think we should move all these into some planner/ dir or something? I assume we either need most or none

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, I'm not sure. There are quite a few things which need to be moved in there and doing it in this PR would make it even bigger than it already is. I'll add this on my todo list.

Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/astar_corner_general.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/astar_corner_min_cost.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/astar_general.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/astar_min_cost.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/expected_occupancy_scene.xml.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/gradient_simple.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/gradient_voronoi.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/inflation_simple.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/make_navigation_map_mixed.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/make_navigation_map_simple.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/make_path_mask_full.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/make_path_mask_two_meters.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/occupancy_general.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/occupancy_simple.npy.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/occupancy_simple.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/overlay_occupied.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/resample_path_simple.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/resample_path_smooth.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/smooth_occupied.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/three_paths.npy.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/three_paths.ply.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/three_paths.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/visualize_occupancy_rainbow.png.tar.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions data/.lfs/visualize_occupancy_turbo.png.tar.gz
Git LFS file not shown
2 changes: 0 additions & 2 deletions dimos/agents2/skills/google_maps_skill_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import json
from typing import Any

from reactivex.disposable import Disposable

from dimos.core.core import rpc
from dimos.core.skill_module import SkillModule
from dimos.core.stream import In
Expand Down
12 changes: 12 additions & 0 deletions dimos/core/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
from dimos.core.stream import In, Out
from dimos.core.transport import LCMTransport, pLCMTransport
from dimos.utils.generic import short_id
from dimos.utils.logging_config import setup_logger

logger = setup_logger()


@dataclass(frozen=True)
Expand Down Expand Up @@ -205,6 +208,15 @@ def _connect_transports(self, module_coordinator: ModuleCoordinator) -> None:
for module, original_name in connections[(remapped_name, type)]:
instance = module_coordinator.get_instance(module)
instance.set_transport(original_name, transport) # type: ignore[union-attr]
logger.info(
"Transport",
name=remapped_name,
original_name=original_name,
topic=str(getattr(transport, "topic", None)),
type=f"{type.__module__}.{type.__qualname__}",
module=module.__name__,
transport=transport.__class__.__name__,
)

def _connect_rpc_methods(self, module_coordinator: ModuleCoordinator) -> None:
# Gather all RPC methods.
Expand Down
29 changes: 29 additions & 0 deletions dimos/core/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,36 @@
# limitations under the License.

from functools import cached_property
import re

from pydantic_settings import BaseSettings, SettingsConfigDict

from dimos.mapping.occupancy.path_map import NavigationStrategy
from dimos.navigation.global_planner.types import AStarAlgorithm


def _get_all_numbers(s: str) -> list[float]:
return [float(x) for x in re.findall(r"-?\d+\.?\d*", s)]


class GlobalConfig(BaseSettings):
robot_ip: str | None = None
simulation: bool = False
replay: bool = False
n_dask_workers: int = 2
memory_limit: str = "auto"
mujoco_camera_position: str | None = None
mujoco_room: str | None = None
mujoco_room_from_occupancy: str | None = None
mujoco_global_costmap_from_occupancy: str | None = None
mujoco_global_map_from_pointcloud: str | None = None
mujoco_start_pos: str = "-1.0, 1.0"
robot_model: str | None = None
robot_width: float = 0.3
robot_rotation_diameter: float = 0.6
planner_strategy: NavigationStrategy = "simple"
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm not a fan of centralized config that's expanded like this in a single place, "core" shouldn't care about your particular "planner_strategy"

we have a standard for shared config that comes with Configurable, overlayed on top of ModuleConfig, that also applies defaults.

class Config(ModuleConfig):

For global config we should be able to easily apply a deep dict, like

{
"memory_limit": ..., 
"n_dask_workers": ...

# this is class name
"astar_navigator": { 
    "strategy": ...
}
}

then if we want convenient CLI we can play with some sort of deep matching etc, but for a start --astar_navigator_strategy=... is also ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of these are meant to serve as a sort of feature flags: added as a way to test which is working better and removed once we're certain which is best.

The issue with a nested config is where to place the value. In this example, planner_strategy is used by make_navigation_map which is used by both navigation/global_planner/planner.py and navigation/replanning_a_star/navigation_map.py. So I'm not sure where to put it in this particular case.

I'm okay with using a nested config, though. Do you think it would be better if you added the code to read/pass the config? I'd do it myself, but I'm sensing a slight difference of opinion here (for example on yaml too) so it would be cool if I could see what you have in mind. 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

aha this is important so let's make sure that I understand your perspective first also, don't want to trample over it if I don't understand it :D :D

Copy link
Contributor

Choose a reason for hiding this comment

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

had a talk, implementing a config system in a separate PR

astar_algorithm: AStarAlgorithm = "min_cost"
planner_robot_speed: float | None = None

model_config = SettingsConfigDict(
env_file=".env",
Expand All @@ -40,3 +58,14 @@ def unitree_connection_type(self) -> str:
if self.simulation:
return "mujoco"
return "webrtc"

@cached_property
def mujoco_start_pos_float(self) -> tuple[float, float]:
x, y = _get_all_numbers(self.mujoco_start_pos)
return (x, y)

@cached_property
def mujoco_camera_position_float(self) -> tuple[float, ...] | None:
if self.mujoco_camera_position is None:
return None
return tuple(_get_all_numbers(self.mujoco_camera_position))
4 changes: 2 additions & 2 deletions dimos/core/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def broadcast(self, _, msg) -> None: # type: ignore[no-untyped-def]

self.shm.publish(self.topic, msg)

def subscribe(self, callback: Callable[[T], None], selfstream: In[T] = None) -> None: # type: ignore[assignment, override]
def subscribe(self, callback: Callable[[T], None], selfstream: In[T] | None = None) -> None: # type: ignore[assignment, override]
if not self._started:
self.shm.start()
self._started = True
Expand All @@ -174,7 +174,7 @@ def broadcast(self, _, msg) -> None: # type: ignore[no-untyped-def]

self.shm.publish(self.topic, msg)

def subscribe(self, callback: Callable[[T], None], selfstream: In[T] = None) -> None: # type: ignore[assignment, override]
def subscribe(self, callback: Callable[[T], None], selfstream: In[T] | None = None) -> None: # type: ignore[assignment, override]
if not self._started:
self.shm.start()
self._started = True
Expand Down
30 changes: 30 additions & 0 deletions dimos/mapping/occupancy/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2025 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 numpy as np
import pytest

from dimos.mapping.occupancy.gradient import gradient
from dimos.msgs.nav_msgs.OccupancyGrid import OccupancyGrid
from dimos.utils.data import get_data


@pytest.fixture
def occupancy() -> OccupancyGrid:
return OccupancyGrid(np.load(get_data("occupancy_simple.npy")))


@pytest.fixture
def occupancy_gradient(occupancy) -> OccupancyGrid:
return gradient(occupancy, max_distance=1.5)
Loading
Loading