Skip to content

Commit 72efa9e

Browse files
Harden Go2 LAN discovery bind
Agent-Logs-Url: https://github.com/dimensionalOS/dimos/sessions/d74a3b7d-0da7-489d-be97-134b75284670 Co-authored-by: Dreamsorcerer <2203121+Dreamsorcerer@users.noreply.github.com>
1 parent fa42a61 commit 72efa9e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dimos/robot/unitree/go2/cli/landiscovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def discover(timeout: float = 2.0, iface_ip: str | None = None) -> list[Go2Devic
109109
Args:
110110
timeout: seconds to wait for replies after sending the probe.
111111
iface_ip: pin multicast to this local IPv4 address. If None, probe every
112-
non-tunnel interfacel.
112+
non-tunnel interface.
113113
"""
114114
targets: list[tuple[str | None, str]] = (
115115
[(None, iface_ip)] if iface_ip else list(_candidate_ifaces())
@@ -132,7 +132,7 @@ def _probe_iface(iface_ip: str, timeout: float) -> Iterator[Go2Device]:
132132
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
133133
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
134134
try:
135-
sock.bind(("", REPLY_PORT))
135+
sock.bind((iface_ip, REPLY_PORT))
136136
except OSError as e:
137137
logger.warning(f"could not bind UDP {REPLY_PORT} on {iface_ip}: {e}")
138138
sock.close()

dimos/robot/unitree/type/lidar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _repair(item: T) -> T:
129129
calibrated = True
130130
use_system_time = True
131131
logger.warning(
132-
"repair_stale_ts: lidar timestmaps frozen (%d calibration stamps equal) — using system time, upgrade your GO2 firmware",
132+
"repair_stale_ts: lidar timestamps frozen (%d calibration stamps equal) — using system time, upgrade your GO2 firmware",
133133
calibration_frames,
134134
)
135135

0 commit comments

Comments
 (0)