Skip to content

Commit 520a87c

Browse files
committed
Merge origin/dev into ruthwik_teleop
2 parents a7fcc50 + 168aef4 commit 520a87c

File tree

178 files changed

+13612
-5216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+13612
-5216
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ yolo11n.pt
5454
# symlink one of .envrc.* if you'd like to use
5555
.envrc
5656
.claude
57+
**/CLAUDE.md
5758
.direnv/
5859

5960
/logs

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<br>
88

9-
[![Discord](https://img.shields.io/discord/1341146487186391173?style=flat-square&logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/8m6HMArf)
9+
[![Discord](https://img.shields.io/discord/1341146487186391173?style=flat-square&logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/dimos)
1010
[![Stars](https://img.shields.io/github/stars/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/stargazers)
1111
[![Forks](https://img.shields.io/github/forks/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/fork)
1212
[![Contributors](https://img.shields.io/github/contributors/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/graphs/contributors)
@@ -71,9 +71,9 @@ Supported/tested matrix:
7171
| Platform | Status | Tested | Required System deps |
7272
| --- | --- | --- | --- |
7373
| Linux | supported | Ubuntu 22.04, 24.04 | See below |
74-
| macOS | experimental beta | not CI-tested | `brew install gnu-sed gcc portaudio git-lfs libjpeg-turbo python` |
74+
| macOS | experimental beta | not CI-tested | `brew install gnu-sed gcc portaudio git-lfs libjpeg-turbo python; export ARCHFLAGS="-arch $(uname -m)"` |
7575

76-
Note: macOS is usable but expect inconsistent/flaky behavior (rather than hard errors/crashes).
76+
Note: macOS is usable but expect inconsistent/flaky behavior (rather than hard errors/crashes). Setting `ARCHFLAGS` is likely optional, but some systems it is required to avoid a `clang` error.
7777

7878
```sh
7979
sudo apt-get update
@@ -152,7 +152,7 @@ from dimos.core import In, Module, Out, rpc
152152
from dimos.core.blueprints import autoconnect
153153
from dimos.msgs.geometry_msgs import Twist
154154
from dimos.msgs.sensor_msgs import Image
155-
from dimos.msgs.sensor_msgs.image_impls.AbstractImage import ImageFormat
155+
from dimos.msgs.sensor_msgs.Image import ImageFormat
156156

157157
class RobotConnection(Module):
158158
cmd_vel: In[Twist]
@@ -189,7 +189,7 @@ if __name__ == "__main__":
189189
### Blueprints
190190

191191
Blueprints are how robots are constructed on Dimensional; instructions for how to construct and wire modules. You compose them with
192-
`autoconnect(...)`, which connects streams by `(name, type)` and returns a `ModuleBlueprintSet`.
192+
`autoconnect(...)`, which connects streams by `(name, type)` and returns a `Blueprint`.
193193

194194
Blueprints can be composed, remapped, and have transports overridden if `autoconnect()` fails due to conflicting variable names or `In[]` and `Out[]` message types.
195195

bin/dev

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
#!/usr/bin/env bash
22
REPO_ROOT=$(git rev-parse --show-toplevel)
33
REL_PATH=$(realpath --relative-to="$REPO_ROOT" "$(pwd)")
4-
IMAGE="ghcr.io/dimensionalos/dev"
5-
IMAGE_NAME="$IMAGE:dev"
4+
IMAGE="ghcr.io/dimensionalos/ros-dev"
5+
IMAGE_TAG="$IMAGE:dev"
66

77
image_exists() {
8-
docker image inspect "${IMAGE_NAME}" &>/dev/null
8+
docker image inspect "${IMAGE_TAG}" &>/dev/null
99
}
1010

1111
image_pull() {
12-
docker pull "$IMAGE_NAME"
12+
docker pull "$IMAGE_TAG"
1313
}
1414

1515
ensure_image_downloaded() {
1616
if ! image_exists "$1"; then
17-
echo "Image ${IMAGE_NAME} not found. Pulling..."
17+
echo "Image ${IMAGE_TAG} not found. Pulling..."
1818
image_pull "$1"
1919
fi
2020
}
2121

2222
check_image_running() {
23-
if docker ps -q --filter "ancestor=${IMAGE_NAME}" | grep -q .; then
23+
if docker ps -q --filter "ancestor=${IMAGE_TAG}" | grep -q .; then
2424
return 0
2525
else
2626
return 1
2727
fi
2828
}
2929

3030
stop_image() {
31-
if check_image_running ${IMAGE_NAME}; then
32-
echo "Stopping containers from image ${IMAGE_NAME}..."
33-
docker stop $(docker ps -q --filter "ancestor=${IMAGE_NAME}")
31+
if check_image_running ${IMAGE_TAG}; then
32+
echo "Stopping containers from image ${IMAGE_TAG}..."
33+
docker stop $(docker ps -q --filter "ancestor=${IMAGE_TAG}")
3434
else
35-
echo "No containers from image ${IMAGE_NAME} are running."
35+
echo "No containers from image ${IMAGE_TAG} are running."
3636
fi
3737
}
3838

3939

40-
get_tag() {
40+
get_branch_tag() {
4141
local branch_name
4242
branch_name=$(git rev-parse --abbrev-ref HEAD)
4343

@@ -58,16 +58,16 @@ get_tag() {
5858

5959
build_image() {
6060
local image_tag
61-
image_tag=$(get_tag)
61+
image_tag=$(get_branch_tag)
6262

6363
docker build \
6464
--build-arg GIT_COMMIT=$(git rev-parse --short HEAD) \
6565
--build-arg GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) \
66-
-t "ghcr.io/dimensionalos/dev:${image_tag}" -f docker/dev/Dockerfile .
66+
-t "ghcr.io/dimensionalos/ros-dev:${image_tag}" -f docker/dev/Dockerfile .
6767
}
6868

6969
remove_image() {
70-
local tag=$(get_tag)
70+
local tag=$(get_branch_tag)
7171
docker rm -f "dimos-dev-${tag}" 2>/dev/null || true
7272
}
7373

@@ -141,7 +141,7 @@ else
141141
shift
142142
;;
143143
pull)
144-
docker pull ghcr.io/dimensionalos/dev:dev
144+
docker pull "${IMAGE_TAG}"
145145
shift
146146
;;
147147
*)

data/.lfs/piper_description.tar.gz

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d4ce51d4ea15f29d80e69b0fff4a4d667f086e010329bb5c66980a881f1ee539
3+
size 3091511

data/.lfs/xarm_description.tar.gz

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:82634d767b1f96474b9273500d3f8123f0df9dd1f7e1d84f369e65b3d257f00f
3+
size 12703173

dimos/agents/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
from langchain_core.messages import (
2-
AIMessage,
3-
HumanMessage,
4-
MessageLikeRepresentation,
5-
SystemMessage,
6-
ToolCall,
7-
ToolMessage,
8-
)
9-
101
from dimos.agents.agent import Agent, deploy
112
from dimos.agents.spec import AgentSpec
123
from dimos.agents.vlm_agent import VLMAgent

dimos/agents_deprecated/agent.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from dotenv import load_dotenv
3737
from openai import NOT_GIVEN, OpenAI
3838
from pydantic import BaseModel
39-
from reactivex import Observable, Observer, create, empty, just, operators as RxOps
39+
from reactivex import Observable, Observer, create, empty, just, operators as rxops
4040
from reactivex.disposable import CompositeDisposable, Disposable
4141
from reactivex.subject import Subject
4242

@@ -201,19 +201,19 @@ def __init__(
201201
if (input_data_stream is None)
202202
else (
203203
input_query_stream.pipe( # type: ignore[misc, union-attr]
204-
RxOps.with_latest_from(input_data_stream),
205-
RxOps.map(
204+
rxops.with_latest_from(input_data_stream),
205+
rxops.map(
206206
lambda combined: {
207207
"query": combined[0], # type: ignore[index]
208208
"objects": combined[1] # type: ignore[index]
209209
if len(combined) > 1 # type: ignore[arg-type]
210210
else "No object data available",
211211
}
212212
),
213-
RxOps.map(
213+
rxops.map(
214214
lambda data: f"{data['query']}\n\nCurrent objects detected:\n{data['objects']}" # type: ignore[index]
215215
),
216-
RxOps.do_action(
216+
rxops.do_action(
217217
lambda x: print(f"\033[34mEnriched query: {x.split(chr(10))[0]}\033[0m") # type: ignore[arg-type]
218218
or [print(f"\033[34m{line}\033[0m") for line in x.split(chr(10))[1:]] # type: ignore[var-annotated]
219219
),
@@ -513,9 +513,9 @@ def _process_frame(emission) -> Observable: # type: ignore[no-untyped-def, type
513513
frame = emission
514514
return just(frame).pipe( # type: ignore[call-overload, no-any-return]
515515
MyOps.print_emission(id="B", **print_emission_args), # type: ignore[arg-type]
516-
RxOps.observe_on(self.pool_scheduler),
516+
rxops.observe_on(self.pool_scheduler),
517517
MyOps.print_emission(id="C", **print_emission_args), # type: ignore[arg-type]
518-
RxOps.subscribe_on(self.pool_scheduler),
518+
rxops.subscribe_on(self.pool_scheduler),
519519
MyOps.print_emission(id="D", **print_emission_args), # type: ignore[arg-type]
520520
MyVidOps.with_jpeg_export(
521521
self.frame_processor, # type: ignore[arg-type]
@@ -525,13 +525,13 @@ def _process_frame(emission) -> Observable: # type: ignore[no-untyped-def, type
525525
MyOps.print_emission(id="E", **print_emission_args), # type: ignore[arg-type]
526526
MyVidOps.encode_image(),
527527
MyOps.print_emission(id="F", **print_emission_args), # type: ignore[arg-type]
528-
RxOps.filter(
528+
rxops.filter(
529529
lambda base64_and_dims: base64_and_dims is not None
530530
and base64_and_dims[0] is not None # type: ignore[index]
531531
and base64_and_dims[1] is not None # type: ignore[index]
532532
),
533533
MyOps.print_emission(id="G", **print_emission_args), # type: ignore[arg-type]
534-
RxOps.flat_map(
534+
rxops.flat_map(
535535
lambda base64_and_dims: create( # type: ignore[arg-type, return-value]
536536
lambda observer, _: self._observable_query(
537537
observer, # type: ignore[arg-type]
@@ -555,11 +555,11 @@ def process_if_free(emission): # type: ignore[no-untyped-def]
555555
is_processing[0] = True
556556
return _process_frame(emission).pipe(
557557
MyOps.print_emission(id="I", **print_emission_args), # type: ignore[arg-type]
558-
RxOps.observe_on(self.pool_scheduler),
558+
rxops.observe_on(self.pool_scheduler),
559559
MyOps.print_emission(id="J", **print_emission_args), # type: ignore[arg-type]
560-
RxOps.subscribe_on(self.pool_scheduler),
560+
rxops.subscribe_on(self.pool_scheduler),
561561
MyOps.print_emission(id="K", **print_emission_args), # type: ignore[arg-type]
562-
RxOps.do_action(
562+
rxops.do_action(
563563
on_completed=lambda: is_processing.__setitem__(0, False),
564564
on_error=lambda e: is_processing.__setitem__(0, False),
565565
),
@@ -568,7 +568,7 @@ def process_if_free(emission): # type: ignore[no-untyped-def]
568568

569569
observable = frame_observable.pipe(
570570
MyOps.print_emission(id="A", **print_emission_args), # type: ignore[arg-type]
571-
RxOps.flat_map(process_if_free),
571+
rxops.flat_map(process_if_free),
572572
MyOps.print_emission(id="M", **print_emission_args), # type: ignore[arg-type]
573573
)
574574

@@ -601,7 +601,7 @@ def _process_query(query) -> Observable: # type: ignore[no-untyped-def, type-ar
601601
"""
602602
return just(query).pipe(
603603
MyOps.print_emission(id="Pr A", **print_emission_args), # type: ignore[arg-type]
604-
RxOps.flat_map(
604+
rxops.flat_map(
605605
lambda query: create( # type: ignore[arg-type, return-value]
606606
lambda observer, _: self._observable_query(observer, incoming_query=query) # type: ignore[arg-type]
607607
)
@@ -622,11 +622,11 @@ def process_if_free(query): # type: ignore[no-untyped-def]
622622
logger.info("Processing Query.")
623623
return _process_query(query).pipe(
624624
MyOps.print_emission(id="B", **print_emission_args), # type: ignore[arg-type]
625-
RxOps.observe_on(self.pool_scheduler),
625+
rxops.observe_on(self.pool_scheduler),
626626
MyOps.print_emission(id="C", **print_emission_args), # type: ignore[arg-type]
627-
RxOps.subscribe_on(self.pool_scheduler),
627+
rxops.subscribe_on(self.pool_scheduler),
628628
MyOps.print_emission(id="D", **print_emission_args), # type: ignore[arg-type]
629-
RxOps.do_action(
629+
rxops.do_action(
630630
on_completed=lambda: is_processing.__setitem__(0, False),
631631
on_error=lambda e: is_processing.__setitem__(0, False),
632632
),
@@ -635,7 +635,7 @@ def process_if_free(query): # type: ignore[no-untyped-def]
635635

636636
observable = query_observable.pipe(
637637
MyOps.print_emission(id="A", **print_emission_args), # type: ignore[arg-type]
638-
RxOps.flat_map(lambda query: process_if_free(query)), # type: ignore[no-untyped-call]
638+
rxops.flat_map(lambda query: process_if_free(query)), # type: ignore[no-untyped-call]
639639
MyOps.print_emission(id="F", **print_emission_args), # type: ignore[arg-type]
640640
)
641641

@@ -654,9 +654,9 @@ def get_response_observable(self) -> Observable: # type: ignore[type-arg]
654654
Observable: An observable that emits string responses from the agent.
655655
"""
656656
return self.response_subject.pipe(
657-
RxOps.observe_on(self.pool_scheduler),
658-
RxOps.subscribe_on(self.pool_scheduler),
659-
RxOps.share(),
657+
rxops.observe_on(self.pool_scheduler),
658+
rxops.subscribe_on(self.pool_scheduler),
659+
rxops.share(),
660660
)
661661

662662
def run_observable_query(self, query_text: str, **kwargs) -> Observable: # type: ignore[no-untyped-def, type-arg]

dimos/agents_deprecated/memory/image_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _initialize_model(self): # type: ignore[no-untyped-def]
6464
"""Initialize the specified embedding model."""
6565
try:
6666
import onnxruntime as ort # type: ignore[import-untyped]
67-
import torch
67+
import torch # noqa: F401
6868
from transformers import ( # type: ignore[import-untyped]
6969
AutoFeatureExtractor,
7070
AutoModel,

dimos/agents_deprecated/modules/gateway/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __init__(
5252
self.timeout = timeout
5353
self._client = None
5454
self._async_client = None
55+
self._aclose_task: asyncio.Task[None] | None = None
5556

5657
# Always use TensorZero embedded gateway
5758
try:
@@ -177,7 +178,7 @@ def __del__(self) -> None:
177178
try:
178179
loop = asyncio.get_event_loop()
179180
if loop.is_running():
180-
loop.create_task(self.aclose())
181+
self._aclose_task = loop.create_task(self.aclose())
181182
else:
182183
loop.run_until_complete(self.aclose())
183184
except RuntimeError:

0 commit comments

Comments
 (0)