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:
+1
-1
@@ -58,7 +58,7 @@ class Vision:
|
||||
def nearest_greeted(self):
|
||||
return next((t for t in self.tracks if t.greeted), None)
|
||||
|
||||
def seen(self):
|
||||
def seen(self, max_m=None):
|
||||
return [(t.angle, t.distance) for t in self.tracks]
|
||||
|
||||
def head_person(self, angle, since):
|
||||
|
||||
@@ -44,7 +44,7 @@ class Vision: # someone at -60 deg besides the
|
||||
def present(self, t):
|
||||
return True
|
||||
|
||||
def seen(self):
|
||||
def seen(self, max_m=None):
|
||||
return [(self.stranger.angle, 1.0)]
|
||||
|
||||
def head_person(self, angle, since):
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user