Search toward an unsure voice first and find far callers on look at me

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 13:37:18 +09:00
co-authored by Claude Opus 5.5
parent 7a668153ee
commit 3d6dcb9ba7
4 changed files with 36 additions and 23 deletions
+8 -1
View File
@@ -14,7 +14,7 @@ class Vision:
def __init__(self, before, after=None):
self.views = [before, before if after is None else after]
def seen(self):
def seen(self, max_m=None):
return self.views.pop(0) if len(self.views) > 1 else self.views[0]
def present(self, t):
@@ -56,6 +56,13 @@ assert look([], voice=-55.0, after=[(-50.0, 0.9)]) == [-60, -50], turns
assert look([], voice=-55.0) == [-60, 60, 0], turns
# nobody seen, no voice: looks around and back
assert look([], gaze=10.0) == [60, -60, 10], turns
# nobody seen, the voice unsure but on the right: the right first, not the side the head happens to face (2026-10-30)
L = lumi.Lumi.__new__(lumi.Lumi)
L.vision, L.current, L.voice_angle, L.voice_trusted, L.voice_guess = Vision([], [(-50.0, 2.0)]), None, 0.0, False, -64.0
L.det_yaw = lambda: 0.0
turns.clear()
L.look_at_speaker()
assert turns == [-60, -50], turns
# "Lumi" with the voice read on the left, nobody there: the head turns there, then to the person seen, else back
heads = []