Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pytest -s dimos/

#### Test Dimensional with a replay UnitreeGo2 stream (no robot required)
```bash
CONNECTION_TYPE=fake python dimos/robot/unitree_webrtc/unitree_go2.py
CONNECTION_TYPE=replay python dimos/robot/unitree_webrtc/unitree_go2.py
```

#### Test Dimensional with a simulated UnitreeGo2 in MuJoCo (no robot required)
Expand Down
14 changes: 7 additions & 7 deletions dimos/robot/unitree_webrtc/unitree_go2.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
warnings.filterwarnings("ignore", message="H264Decoder.*failed to decode")


class FakeRTC(Resource):
"""Fake WebRTC connection for testing with recorded data."""
class ReplayRTC(Resource):
"""Replay WebRTC connection for testing with recorded data."""

def __init__(self, *args, **kwargs):
get_data("unitree_office_walk") # Preload data for testing
Expand Down Expand Up @@ -193,8 +193,8 @@ def start(self) -> None:
match self.connection_type:
case "webrtc":
self.connection = UnitreeWebRTCConnection(self.ip)
case "fake":
self.connection = FakeRTC(self.ip)
case "replay":
self.connection = ReplayRTC(self.ip)
case "mujoco":
from dimos.robot.unitree_webrtc.mujoco_connection import MujocoConnection

Expand Down Expand Up @@ -342,18 +342,18 @@ def __init__(
"""Initialize the robot system.

Args:
ip: Robot IP address (or None for fake connection)
ip: Robot IP address (or None for replay connection)
output_dir: Directory for saving outputs (default: assets/output)
websocket_port: Port for web visualization
skill_library: Skill library instance
connection_type: webrtc, fake, or mujoco
connection_type: webrtc, replay, or mujoco
"""
super().__init__()
self._dimos = Dimos(n=8, memory_limit="8GiB")
self.ip = ip
self.connection_type = connection_type or "webrtc"
if ip is None and self.connection_type == "webrtc":
self.connection_type = "fake" # Auto-enable playback if no IP provided
self.connection_type = "replay" # Auto-enable playback if no IP provided
self.output_dir = output_dir or os.path.join(os.getcwd(), "assets", "output")
self.websocket_port = websocket_port
self.lcm = LCM()
Expand Down