Tuck removed, dashboard arm card with wave and taught poses, markers refresh by themselves

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 18:52:34 +09:00
co-authored by Claude Opus 5.5
parent c444d64306
commit fe8319bc95
12 changed files with 89 additions and 49 deletions
+3 -3
View File
@@ -15,8 +15,7 @@ from vision import head_cam
fetch.STATE_FILE = Path(tempfile.mkdtemp()) / "lumi_task.json" # never the real /dev/shm file
POSES = {"look": [0.0] * 6, "carry": [20.0, 0, 0, 0, 0, 0], "give": [40.0, 0, 0, 0, 0, 0],
"wave_out": [0.0, -20, 0, 0, 0, 0], "wave_start": [0.0, -20, 20, 0, 0, 0],
"wave": [0.0, -20, 20, 0, 20, 0], "ready": [0.0, 0, -20, 0, 0, 0],
"tuck": [-20.0, 0, 0, 0, 0, 0]}
"wave": [0.0, -20, 20, 0, 20, 0], "ready": [0.0, 0, -20, 0, 0, 0]}
FAR = np.array([0.0, 0.0, 5000.0]) # the head far away: nothing near it
head = {"centre": FAR}
motion.poses = lambda: dict(POSES)
@@ -84,7 +83,8 @@ use(POSES["give"])
assert arm_route.goto("look") == ["carry", "look"] # after giving: give -> carry -> look
assert arm_route.goto("give") == ["carry", "give"] # to give: look -> carry -> give
use(POSES["wave"])
assert arm_route.goto("tuck") == ["wave_start", "wave_out", "look", "tuck"] # fold: through look
assert arm_route.goto("look") == ["wave_start", "wave_out", "look"] # fold: down to look
assert not any("tuck" in e for e in arm_route.EDGES)
use(POSES["look"])
assert arm_route.goto("wave_start") == ["wave_out", "wave_start"] # up: never look -> wave_start directly
assert {"look", "wave_start"} not in [set(e) for e in arm_route.EDGES]