Skip to content

Commit dcc37c4

Browse files
paul-nechiforleshy
andauthored
new planner new mapper (#879)
* new planner new mapper * moved on to legion lib for connections * import fix --------- Co-authored-by: Ivan Nikolic <lesh@sysphere.org> Former-commit-id: 0678b9e
1 parent 74594fc commit dcc37c4

File tree

6 files changed

+22
-35
lines changed

6 files changed

+22
-35
lines changed

dimos/robot/unitree/connection/connection.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@
2020
from typing import TypeAlias
2121

2222
from aiortc import MediaStreamTrack # type: ignore[import-untyped]
23-
from go2_webrtc_driver.constants import ( # type: ignore[import-untyped]
23+
import numpy as np
24+
from numpy.typing import NDArray
25+
from reactivex import operators as ops
26+
from reactivex.observable import Observable
27+
from reactivex.subject import Subject
28+
from unitree_webrtc_connect.constants import ( # type: ignore[import-untyped]
2429
RTC_TOPIC,
2530
SPORT_CMD,
2631
VUI_COLOR,
2732
)
28-
from go2_webrtc_driver.webrtc_driver import ( # type: ignore[import-untyped]
29-
Go2WebRTCConnection,
33+
from unitree_webrtc_connect.webrtc_driver import ( # type: ignore[import-untyped] # type: ignore[import-untyped]
34+
UnitreeWebRTCConnection as LegionConnection,
3035
WebRTCConnectionMethod,
3136
)
32-
import numpy as np
33-
from numpy.typing import NDArray
34-
from reactivex import operators as ops
35-
from reactivex.observable import Observable
36-
from reactivex.subject import Subject
3737

3838
from dimos.core import rpc
3939
from dimos.core.resource import Resource
@@ -82,7 +82,7 @@ def __init__(self, ip: str, mode: str = "ai") -> None:
8282
self.mode = mode
8383
self.stop_timer: threading.Timer | None = None
8484
self.cmd_vel_timeout = 0.2
85-
self.conn = Go2WebRTCConnection(WebRTCConnectionMethod.LocalSTA, ip=self.ip)
85+
self.conn = LegionConnection(WebRTCConnectionMethod.LocalSTA, ip=self.ip)
8686
self.connect()
8787

8888
def connect(self) -> None:

dimos/robot/unitree_webrtc/unitree_go2_blueprints.py

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,14 @@
104104
utilization(),
105105
).global_config(n_dask_workers=8)
106106

107-
test_new_nav = (
108-
autoconnect(
109-
go2_connection(),
110-
mapper(voxel_size=0.5, global_publish_interval=2.5),
111-
# astar_planner(),
112-
# holonomic_local_planner(),
113-
# behavior_tree_navigator(),
114-
replanning_a_star_planner(),
115-
wavefront_frontier_explorer(),
116-
websocket_vis(),
117-
foxglove_bridge(),
118-
)
119-
.global_config(n_dask_workers=4, robot_model="unitree_go2")
120-
.transports(
121-
{
122-
("color_image", Image): LCMTransport("/go2/color_image", Image),
123-
("camera_pose", PoseStamped): LCMTransport("/go2/camera_pose", PoseStamped),
124-
("camera_info", CameraInfo): LCMTransport("/go2/camera_info", CameraInfo),
125-
}
126-
)
127-
)
107+
test_new_nav = autoconnect(
108+
go2_connection(),
109+
voxel_mapper(voxel_size=0.05, publish_interval=0),
110+
replanning_a_star_planner(),
111+
wavefront_frontier_explorer(),
112+
websocket_vis(),
113+
foxglove_bridge(),
114+
).global_config(n_dask_workers=4, robot_model="unitree_go2")
128115

129116
standard_with_jpeglcm = standard.transports(
130117
{

dimos/robot/unitree_webrtc/unitree_skill_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import time
2020
from typing import TYPE_CHECKING
2121

22-
from go2_webrtc_driver.constants import RTC_TOPIC # type: ignore[import-untyped]
22+
from unitree_webrtc_connect.constants import RTC_TOPIC # type: ignore[import-untyped]
2323

2424
from dimos.core.core import rpc
2525
from dimos.core.skill_module import SkillModule

dimos/robot/unitree_webrtc/unitree_skills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Robot = "Robot"
2626
MockRobot = "MockRobot"
2727

28-
from go2_webrtc_driver.constants import RTC_TOPIC # type: ignore[import-untyped]
28+
from unitree_webrtc_connect.constants import RTC_TOPIC # type: ignore[import-untyped]
2929

3030
from dimos.msgs.geometry_msgs import Twist, Vector3
3131
from dimos.skills.skills import AbstractRobotSkill, AbstractSkill, SkillLibrary

dimos/skills/unitree/unitree_speak.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
import tempfile
2020
import time
2121

22-
from go2_webrtc_driver.constants import RTC_TOPIC # type: ignore[import-untyped]
2322
import numpy as np
2423
from openai import OpenAI
2524
from pydantic import Field
2625
import soundfile as sf # type: ignore[import-untyped]
26+
from unitree_webrtc_connect.constants import RTC_TOPIC # type: ignore[import-untyped]
2727

2828
from dimos.skills.skills import AbstractRobotSkill
2929
from dimos.utils.logging_config import setup_logger

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies = [
4444
"reactivex",
4545
"rxpy-backpressure",
4646
"asyncio==3.4.3",
47-
"go2-webrtc-connect",
47+
"unitree-webrtc-connect",
4848
"tensorzero==2025.7.5",
4949
"structlog>=25.5.0,<26",
5050

@@ -334,7 +334,7 @@ override-dependencies = [
334334

335335
[tool.uv.sources]
336336
rxpy-backpressure = { git = "https://github.com/dimensionalOS/rxpy-backpressure.git" }
337-
go2-webrtc-connect = { git = "https://github.com/dimensionalOS/go2_webrtc_connect.git" }
337+
unitree-webrtc-connect = { git = "https://github.com/legion1581/go2_webrtc_connect.git", rev = "d0aec95ffb2125b7d2111f65a1b7ac718165a6b8" }
338338
clip = { git = "https://github.com/openai/CLIP.git" }
339339
dimos-lcm = { git = "https://github.com/dimensionalOS/dimos-lcm.git", rev = "3aeb724863144a8ba6cf72c9f42761d1007deda4" }
340340
contact-graspnet-pytorch = { git = "https://github.com/dimensionalOS/contact_graspnet_pytorch.git" }

0 commit comments

Comments
 (0)