Update gripper geometry for the new fingers and log base notifications

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 11:13:09 +09:00
co-authored by Claude Opus 5.5
parent 161c598e10
commit 2cedec3e1b
6 changed files with 22 additions and 12 deletions
+8 -1
View File
@@ -27,6 +27,10 @@ _guard = {"gen": 0, "held": False, "reason": None}
# base caps navigation and joy_control by them and forgets them at its restart (its own 0.3 m/s; follow asked 0.5 and
# drove 0.30, 2026-10-28). None: the base's own.
max_speed = {"linear": None, "angular": None}
# the base's notifications ("type": "notification": docking failed, no path, ...) read on this connection, oldest
# first; robot/drive_log.py logs and clears them. Only the last NOTICES_KEEP are kept.
notices = []
NOTICES_KEEP = 50
def set_max_speed(linear, angular):
@@ -47,7 +51,10 @@ def _ask(command, tag, timeout):
except json.JSONDecodeError:
break
buf = _conn["buf"] = buf.lstrip()[end:]
if msg.get("uuid") == tag:
if msg.get("type") == "notification":
notices.append(msg)
del notices[:-NOTICES_KEEP]
elif msg.get("uuid") == tag:
return msg
chunk = s.recv(65536)
if not chunk: # the base closed the connection: never loop forever