Recover the arm from any pose, put down on a remembered table and wave back at people
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+267
-48
@@ -75,6 +75,9 @@ PLACE_LOW_Z = -480.0 # mm, arm frame at lift 0: a level top lowe
|
||||
KEEP_R_MM = 400.0 # mm; a table kept on the map is looked for again within this of its kept spot ...
|
||||
KEEP_STEP_MM = 40.0 # ... on a grid this fine ...
|
||||
KEEP_TOL_MM = 40.0 # ... at its kept height +- this (measured from 1.5 m it can be ~30 mm off)
|
||||
KEEP_CELL_M = 0.01 # m; the kept table's level points are remembered one per cell this size
|
||||
KEEP_EDGE_MM = 30.0 # mm; a spot of the kept table put on from memory lies at least this far in from
|
||||
# the last level point seen in every direction (_kept_spots)
|
||||
PLACE_NAV_MAX = 2 # navigation drives round to a kept table at most this often, then straight ways only
|
||||
TOP_NEAR_MM = 1500.0 # mm from the arm base; a named thing's top measured further away is not trusted
|
||||
# (2026-10-20 a white thing 3.8 m away read -258, then -620 mm): go closer first
|
||||
@@ -148,6 +151,9 @@ SELF_MM = 120.0 # depth this near the hand (flange -> grasp point -
|
||||
# a finger 122 mm from the grasp point stopped a waist turn (2026-10-20)
|
||||
HEAD_SIDE_DEG = 60.0 # head yaw (+ left) towards the side of a turn, to check the arm's sweep (head_hits)
|
||||
HEAD_LOW_PITCH = -5.0 # head pitch for those checks and the search: its lowest, where the camera is calibrated
|
||||
HEAD_AIM_DEG = 8.0 # deg the target (the object to pick, the table / spot to put on) may drift off the head's
|
||||
# direction before the head turns back onto it (_aim_head; as lumi.py FOCUS_DEG for a person)
|
||||
HEAD_AIM_EVERY_S = 0.5 # s between those checks while the base drives (as lumi.py FOCUS_EVERY_S)
|
||||
HEAD_READS = 4 # head camera frames read per view (10 a second) ...
|
||||
HEAD_SAME_MM = 120.0 # ... an object counts when seen at least twice within this distance
|
||||
WAIST_VEL = 30 # % of the waist's speed: the arm sweeps sideways
|
||||
@@ -222,7 +228,9 @@ _leg = {"rest": None, "tries": 0} # the steps from the drive running
|
||||
_pause = threading.Event() # set by pause() (someone talks to Lumi on the way): drives halt, the run
|
||||
# waits at the next step; resume() goes on where it was
|
||||
_thread = None
|
||||
stay_put = False # set by assistant/lumi.py for a task asked by voice with only Greeter on:
|
||||
_aim = {"world": None, "z": 0.0, "thread": None} # the head's target once found: map point (m), height (mm, arm
|
||||
# frame), the head move running while the base drives (_aim_head)
|
||||
stay_put = False # set by assistant/lumi.py for a task asked by voice with only Greeter on:
|
||||
# head and lift only, no base move, no waist turn (NEED_PATROL)
|
||||
NEED_PATROL = ("For that I'd have to drive or turn. Switch on Patrol, please.",
|
||||
"그러려면 이동하거나 돌아야 해요. 패트롤을 켜 주세요.")
|
||||
@@ -461,34 +469,50 @@ def _line_rows(target, label, start=None):
|
||||
return rows
|
||||
|
||||
|
||||
def _line_holding(name):
|
||||
def _line_holding(name, join=True):
|
||||
"""With the object in the hand: along the pose graph to pose `name` (arm_route.hops), a straight line to each
|
||||
pose, all lines IK-, tilt- and head-checked before the first one starts; after each line the pose's exact joints.
|
||||
Nothing when it is there already."""
|
||||
pose, all lines IK-, tilt- and head-checked before the first one starts, and where a line ends on the other wrist
|
||||
branch, the joint move onto the pose's own joints too; after each line the pose's exact joints. When that is
|
||||
refused, `join`: arm_route's checked joint moves from where the arm is (plan: a join, the wrist turned back, up
|
||||
first), the cup upright. Nothing when it is there already."""
|
||||
_go_on()
|
||||
if _at_pose(name):
|
||||
return
|
||||
now = skills._joints()
|
||||
try:
|
||||
names = arm_route.hops(skills._joints(), name, leaf=True, holding=True)
|
||||
except arm_route.RouteError as e:
|
||||
raise FetchError(*e.args) from e
|
||||
lines, start = [], None
|
||||
for n in names:
|
||||
j = motion.poses()[n]
|
||||
target = skills._ask("kine_forward", jointPosition=[float(v) for v in j])["cartPosition"]
|
||||
_line_rows(target, f"to {n}", start)
|
||||
lines.append((n, target))
|
||||
start = (target, j)
|
||||
names = arm_route.hops(now, name, leaf=True, holding=True)
|
||||
lines, start = [], None
|
||||
for n in names:
|
||||
j = motion.poses()[n]
|
||||
target = skills._ask("kine_forward", jointPosition=[float(v) for v in j])["cartPosition"]
|
||||
end = _line_rows(target, f"to {n}", start)[-1][2]
|
||||
if max(abs(a - b) for a, b in zip(motion.nearest(j, end), end)) > 1.0: # live 2026-10-30: the line to
|
||||
arm_route.check_moves(end, [j], holding=True) # give ended with the wrist turned over, stuck there
|
||||
lines.append((n, target))
|
||||
start = (target, j)
|
||||
except (FetchError, arm_route.RouteError) as e:
|
||||
if not join:
|
||||
raise FetchError(*e.args) from e
|
||||
try:
|
||||
seq = arm_route.plan(name, holding=True, now=now)
|
||||
except arm_route.RouteError:
|
||||
raise FetchError(*e.args) from e
|
||||
arm_route.move(seq, holding=True)
|
||||
_go_on()
|
||||
return
|
||||
for n, target in lines:
|
||||
log(f"arm to {n} (straight)")
|
||||
motion.move_linear(target=target, speed=skills.HOLDING_SPEED, path_checked=True)
|
||||
_go_on()
|
||||
if not _at_pose(n): # the pose's own joints (the line may end on another IK branch)
|
||||
if not _at_pose(n): # the pose's own joints (the controller's line ended elsewhere)
|
||||
try:
|
||||
arm_route.check_moves(skills._joints(), [motion.poses()[n]], holding=True)
|
||||
except arm_route.RouteError as e:
|
||||
raise FetchError(*e.args) from e
|
||||
motion.go(n, skills.HOLDING_SPEED)
|
||||
motion.go(n, skills.HOLDING_SPEED)
|
||||
except arm_route.RouteError: # e.g. the wrist turned over: arm_route's checked way from here
|
||||
try:
|
||||
arm_route.move(arm_route.plan(n, holding=True), holding=True)
|
||||
except arm_route.RouteError as e:
|
||||
raise FetchError(*e.args) from e
|
||||
|
||||
|
||||
def _look():
|
||||
@@ -508,11 +532,15 @@ def _wait_drive(watch_holding=False, again=None, goal=None):
|
||||
try:
|
||||
_drive_wait(watch_holding, again, goal)
|
||||
finally:
|
||||
t = _aim["thread"] # the head's last turn onto the target ends before the next step
|
||||
while t is not None and t.is_alive() and not _stop.wait(0.1):
|
||||
pass
|
||||
skills.moved() # the cameras moved with the base: frames from now on
|
||||
|
||||
|
||||
def _drive_wait(watch_holding, again, goal):
|
||||
t0 = last_hold = time.time()
|
||||
last_aim = 0.0
|
||||
seen_running = False
|
||||
anchor = None # (x, y, time) of the last real progress
|
||||
while True:
|
||||
@@ -537,6 +565,9 @@ def _drive_wait(watch_holding, again, goal):
|
||||
st = full.get("move_status")
|
||||
seen_running = seen_running or st == "running"
|
||||
pose = full.get("current_pose")
|
||||
if st == "running" and time.time() - last_aim >= HEAD_AIM_EVERY_S:
|
||||
last_aim = time.time()
|
||||
_aim_head(wait=False) # the head stays on the target while the base turns and drives
|
||||
if st == "running" and pose:
|
||||
if anchor is None or math.hypot(pose["x"] - anchor[0], pose["y"] - anchor[1]) > STUCK_M:
|
||||
anchor = (pose["x"], pose["y"], time.time())
|
||||
@@ -674,6 +705,74 @@ def _head_to(yaw, pitch):
|
||||
skills.moved("head")
|
||||
|
||||
|
||||
def _aim_at(thing):
|
||||
"""From now on the head keeps to `thing` ({"x", "y"} mm in the arm frame now, "top_mm" its height when known):
|
||||
its map place is kept, so it is found again after every base and waist move. None (a search, a drive to a place,
|
||||
the object in the hand): no target, the head is free again."""
|
||||
w = None if thing is None else map_xy(thing)
|
||||
_aim.update(world=w, z=float((thing or {}).get("top_mm") or 0.0))
|
||||
|
||||
|
||||
def aiming():
|
||||
"""A task keeps the head on its target now (assistant/lumi.py leaves the head alone meanwhile); never after a
|
||||
STOP."""
|
||||
return _aim["world"] is not None and not _stop.is_set()
|
||||
|
||||
|
||||
def _head_yaw_for(p):
|
||||
"""Head yaw (deg, cut to head.YAW_LIMIT, 1 deg steps) that puts the arm-frame point `p` (x, y, z mm) in the
|
||||
middle (left / right) of the head camera's view at HEAD_LOW_PITCH; None before the head camera is calibrated.
|
||||
ponytail: the pitch stays HEAD_LOW_PITCH, everything picked or put on is below the head (its lowest pitch)."""
|
||||
best = None
|
||||
for yaw in np.arange(-head.YAW_LIMIT, head.YAW_LIMIT + 0.5, 1.0):
|
||||
T = head_cam.base_from_head(float(yaw), HEAD_LOW_PITCH)
|
||||
if T is None:
|
||||
return None
|
||||
q = np.linalg.inv(T) @ [p[0], p[1], p[2], 1.0]
|
||||
off = abs(math.atan2(q[0], q[2]))
|
||||
if best is None or off < best[0]:
|
||||
best = (off, float(yaw))
|
||||
return best[1]
|
||||
|
||||
|
||||
def _aim_head(thing=None, wait=True):
|
||||
"""The head onto the target (`thing`: a new one, _aim_at) when it is more than HEAD_AIM_DEG off. wait=False (the
|
||||
base drives, _drive_wait): the move runs in its own thread, one at a time, and the drive goes on. A head error is
|
||||
logged, never the end of the task."""
|
||||
if thing is not None:
|
||||
_aim_at(thing)
|
||||
t = _aim["thread"]
|
||||
if t is not None and t.is_alive():
|
||||
if not wait:
|
||||
return
|
||||
while t.is_alive() and not _stop.wait(0.1):
|
||||
pass
|
||||
if _aim["world"] is None or arm_yaw() is None:
|
||||
return
|
||||
try:
|
||||
x, y = arm_frame(_aim["world"])
|
||||
yaw = _head_yaw_for((x, y, _aim["z"]))
|
||||
if yaw is None:
|
||||
return
|
||||
lift, waist, y0, p0 = head.status()
|
||||
if abs(yaw - y0) <= HEAD_AIM_DEG and abs(p0 - HEAD_LOW_PITCH) < 1.0:
|
||||
return
|
||||
if wait:
|
||||
_head_to(yaw, HEAD_LOW_PITCH)
|
||||
return
|
||||
|
||||
def run():
|
||||
try:
|
||||
head.moveto([lift, waist, yaw, HEAD_LOW_PITCH])
|
||||
skills.moved("head")
|
||||
except OSError as e:
|
||||
log(f"head to the target: {e}")
|
||||
_aim["thread"] = threading.Thread(target=run, daemon=True)
|
||||
_aim["thread"].start()
|
||||
except OSError as e:
|
||||
log(f"head to the target: {e}")
|
||||
|
||||
|
||||
def head_hits(deg, pts=None):
|
||||
"""depth_hits with the head camera turned towards the side of the turn: the torso camera sees only ahead, the arm
|
||||
sweeps to the side. None when clear, or when the head camera is not calibrated (then the other checks decide).
|
||||
@@ -752,7 +851,8 @@ def _waist_to(rel, in_place=False, look=None):
|
||||
|
||||
|
||||
def head_ahead():
|
||||
"""Turn the head to HEAD_AHEAD (lift and waist stay) unless it is there already."""
|
||||
"""Turn the head to HEAD_AHEAD (lift and waist stay) unless it is there already; it has no target then."""
|
||||
_aim_at(None)
|
||||
lift, waist, yaw, pitch = head.status()
|
||||
if abs(yaw - HEAD_AHEAD[0]) > 1.0 or abs(pitch - HEAD_AHEAD[1]) > 1.0:
|
||||
head.moveto([lift, waist, *HEAD_AHEAD])
|
||||
@@ -802,10 +902,13 @@ def _head_ok():
|
||||
|
||||
def _look_at(view, attempt):
|
||||
"""Both cameras towards `view` deg from the front (+ left): the waist as far as WAIST_SCAN_MAX (when its sweep is
|
||||
clear and the arm's yaw is measured), the head the rest; then attempt()."""
|
||||
clear and the arm's yaw is measured), the head the rest, or onto the target once one was found (_aim_head);
|
||||
then attempt()."""
|
||||
if arm_yaw() is not None:
|
||||
_waist_to(max(-WAIST_SCAN_MAX, min(WAIST_SCAN_MAX, view)))
|
||||
if _head_ok():
|
||||
if aiming():
|
||||
_aim_head()
|
||||
elif _head_ok():
|
||||
_head_to(view - _waist_turn(), HEAD_LOW_PITCH)
|
||||
return attempt()
|
||||
|
||||
@@ -827,6 +930,7 @@ def _look_around(attempt, holding=False, say=None):
|
||||
head turns the rest), then to the other side. (c) The base turns towards that side (_search_turn) and all of it
|
||||
again. (d) The lift goes to the other end of LIFT_TRIES and (a)-(c) again. Returns what attempt() found (the waist
|
||||
and the head stay where it was seen), else None with the waist at the front."""
|
||||
_aim_at(None) # the head looks around with the waist: no target while searching
|
||||
got = _look_at(0.0, attempt)
|
||||
if got is not None:
|
||||
return got
|
||||
@@ -1150,10 +1254,10 @@ def _is_task(o, task):
|
||||
|
||||
|
||||
def arm_frame(world):
|
||||
"""A map point (m) in the arm base frame now (mm)."""
|
||||
"""A map point (m), or an (N, 2) array of them, in the arm base frame now (mm)."""
|
||||
x, y, th = agv.pose()
|
||||
b = _rot(-math.degrees(th)) @ (np.asarray(world, float) - [x, y])
|
||||
return _rot(-arm_yaw()) @ (b - arm_xy()) * 1000.0
|
||||
b = (np.asarray(world, float) - [x, y]) @ _rot(-math.degrees(th)).T
|
||||
return (b - arm_xy()) @ _rot(-arm_yaw()).T * 1000.0
|
||||
|
||||
|
||||
def _go_to(thing, goal, tried, holding=False):
|
||||
@@ -1173,6 +1277,7 @@ def _near_look(attempt, holding=False):
|
||||
from the base). None when nothing is near or nothing is seen."""
|
||||
if stay_put or _charging():
|
||||
return None
|
||||
_aim_at(None) # a search: the head looks with the waist
|
||||
x, y, th = agv.pose()
|
||||
near = [math.radians(d) for d in np.arange(-157.5, 180.1, 22.5)
|
||||
if agv.clearance(x + NEAR_RING_M * math.cos(th + math.radians(d)),
|
||||
@@ -1311,6 +1416,7 @@ def _approach(obj, yaw, tried, goal=PICK_ZONE_CENTRE, holding=False):
|
||||
Patrol is off (stay_put)."""
|
||||
if stay_put:
|
||||
raise FetchError(*NEED_PATROL)
|
||||
_aim_head(obj) # the head on it while the base brings it nearer
|
||||
t = arm_xy()
|
||||
x0, y0, th0 = agv.pose()
|
||||
world = np.array([x0, y0]) + _rot(math.degrees(th0)) @ to_base((obj["x"], obj["y"]), yaw, t)
|
||||
@@ -1573,6 +1679,7 @@ def _reach(task, obj, say, voice=False):
|
||||
and with Patrol off no base move is tried: the waist only, then the person is asked."""
|
||||
yaw, tried, why = arm_yaw(), set(), None # grasp turns past skills.TRUSTED_YAW_DEG only when the base can't help
|
||||
_width_far["moves"] = 0
|
||||
_aim_head(obj) # found: the head on it from now on (the search is over)
|
||||
for i in range(APPROACH_TRIES + 1):
|
||||
can_move = yaw is not None and i < APPROACH_TRIES and not (voice and stay_put) and not _charging() and \
|
||||
"stuck" not in tried
|
||||
@@ -1753,10 +1860,99 @@ def _place_view(top0):
|
||||
return True if far and _place_far(top0, far) else far
|
||||
|
||||
|
||||
def _keep(xy, table):
|
||||
def _keep(xy, table, pts=()):
|
||||
"""A table to put on, kept by its map place: seen at xy (mm, arm frame now) with its top at `table` mm (None: not
|
||||
measured yet). From then on it is looked for there (_kept_at), never another one."""
|
||||
return {"world": map_xy({"x": xy[0], "y": xy[1]}), "table": table, "lift": head.status()[0]}
|
||||
measured yet), `pts` (x, y mm, arm frame now) of its level top (_remember). From then on it is looked for there
|
||||
(_kept_at), never another one."""
|
||||
kept = {"world": map_xy({"x": xy[0], "y": xy[1]}), "table": table, "lift": head.status()[0], "pts": {}}
|
||||
_remember(kept, pts)
|
||||
return kept
|
||||
|
||||
|
||||
def _remember(kept, pts):
|
||||
"""Keep the kept table's level points `pts` (x, y mm, arm frame now) on the map (one per KEEP_CELL_M cell): where
|
||||
it was seen level stays known after a turn or a drive, also where the camera no longer sees it (its view starts
|
||||
at y ~640 at table height, where the arm hardly reaches). Only with the waist at the front: fetch's map frame turns
|
||||
the arm about the base centre, the waist turns it about the column (tests/pick_sweep.py)."""
|
||||
yaw = arm_yaw()
|
||||
if yaw is None or abs(_waist_turn()) >= 1.0 or not len(pts):
|
||||
return
|
||||
x, y, th = agv.pose()
|
||||
b = np.asarray(pts, float)[:, :2] / 1000.0 @ _rot(yaw).T + arm_xy()
|
||||
for w in b @ _rot(math.degrees(th)).T + [x, y]:
|
||||
kept.setdefault("pts", {})[tuple(np.round(w / KEEP_CELL_M).astype(int))] = w
|
||||
|
||||
|
||||
def _see_kept(kept):
|
||||
"""far_table near the kept table's spot and height; seen, its spot, height and level points are kept (_remember).
|
||||
The spot is where the torso camera's view of it starts, so after a drive closer it lies further again: the spots
|
||||
it showed before are put on from memory (_place_remembered) before the base goes on (live 2026-10-30 it drove on
|
||||
to the table's edge for 10 minutes). None when it is not in view."""
|
||||
x, y, _ = _kept_at(kept)
|
||||
far = far_table((x, y), _kept_band(kept))
|
||||
if far is None:
|
||||
return None
|
||||
kept.update(world=map_xy(far), table=far["table"], lift=head.status()[0])
|
||||
_remember(kept, far["points"])
|
||||
return far
|
||||
|
||||
|
||||
def _kept_spots(kept, key):
|
||||
"""Spots (x, y mm, arm frame now) of the kept table's remembered level top, ordered by key(x, y): the remembered
|
||||
points within FAR_REACH_MM with a remembered level point within TABLE_RING_MM - KEEP_EDGE_MM of every point of the
|
||||
place ring (skills.TABLE_RING_MM all round: at least KEEP_EDGE_MM in from the last level point seen that way) and
|
||||
FREE_MM from everything the camera sees standing now; at most PLACE_REFUSALS of them."""
|
||||
if not kept.get("pts"):
|
||||
return []
|
||||
pts = arm_frame(np.array(list(kept["pts"].values())))
|
||||
seen = skills.look()
|
||||
ring = np.array([(0.0, 0.0)] + [(skills.TABLE_RING_MM * math.cos(a), skills.TABLE_RING_MM * math.sin(a))
|
||||
for a in np.linspace(0, 2 * math.pi, 8, endpoint=False)])
|
||||
out = []
|
||||
for p in sorted(pts, key=lambda p: key(*p)):
|
||||
if math.hypot(*p) > FAR_REACH_MM or any(math.hypot(p[0] - o["x"], p[1] - o["y"]) < skills.FREE_MM
|
||||
for o in seen):
|
||||
continue
|
||||
near = pts[np.abs(pts - p).max(axis=1) <= skills.TABLE_RING_MM * 2]
|
||||
d = np.linalg.norm(near[None, :, :] - (p + ring)[:, None, :], axis=2).min(axis=1)
|
||||
if (d <= skills.TABLE_RING_MM - KEEP_EDGE_MM).all():
|
||||
out.append((float(p[0]), float(p[1])))
|
||||
if len(out) >= PLACE_REFUSALS:
|
||||
break
|
||||
return out
|
||||
|
||||
|
||||
def _place_remembered(top0, kept):
|
||||
"""Put it down on the kept table where its level top was seen (_remember), also where the camera sees it no more:
|
||||
from here at its spots nearest PICK_ZONE_CENTRE, else after the waist turn (waist_for, in place) that brings one of
|
||||
its spots nearest the column into the arm's comfortable reach. Only with the waist at the front, the table's height
|
||||
known and the lift right for it. True when it is down."""
|
||||
z = _kept_at(kept)[2]
|
||||
lift = None if z is None else lift_for(z)
|
||||
if lift is None or abs(lift - head.status()[0]) >= LIFT_TOL_MM or abs(_waist_turn()) >= 1.0:
|
||||
return None
|
||||
spots = _kept_spots(kept, lambda x, y: math.hypot(x - PICK_ZONE_CENTRE[0], y - PICK_ZONE_CENTRE[1]))
|
||||
if not spots:
|
||||
return None
|
||||
top = _top_on(top0, z)
|
||||
log(f"the table I keep at {z:.0f} mm: trying spots of it I saw")
|
||||
if _place_at(spots[:FAR_SPOTS], top): # each refused spot costs IK time; the nearest are likeliest
|
||||
return True
|
||||
c = head_cam.head_centre()
|
||||
if c is None:
|
||||
return None
|
||||
for x, y in _kept_spots(kept, lambda x, y: math.hypot(x - c[0], y - c[1]))[:FAR_SPOTS]:
|
||||
if at_edge({"x": x, "y": y}):
|
||||
break # the rest are further from the column: no turn brings them in
|
||||
for deg in waist_for({"x": x, "y": y})[:1]:
|
||||
t = turned({"x": x, "y": y}, deg)
|
||||
if next(skills.place_options(t["x"], t["y"], top, skills._joints()), None) is None:
|
||||
continue
|
||||
log(f"spot ({x:.0f}, {y:.0f}) of the table I keep: turning my waist {deg:+.0f} deg")
|
||||
if not _waist_to(_waist_turn() + deg, in_place=True):
|
||||
return None
|
||||
return _place_at([(t["x"], t["y"])], top)
|
||||
return None
|
||||
|
||||
|
||||
def _kept_at(kept):
|
||||
@@ -1775,16 +1971,14 @@ def _kept_band(kept):
|
||||
|
||||
def _place_kept_view(top0, kept):
|
||||
"""One look for the kept table: put it down on it in reach (True), else on it further away where the arm reaches a
|
||||
spot of it from here (True); else where it is now (far_table near its kept spot and height, kept from now on);
|
||||
None when it is not in view."""
|
||||
spot of it from here (True), else on a spot of it seen before (_place_remembered, True); else where it is now
|
||||
(_see_kept), None when it is not in view."""
|
||||
if _place_here(top0, kept):
|
||||
return True
|
||||
x, y, _ = _kept_at(kept)
|
||||
far = far_table((x, y), _kept_band(kept))
|
||||
if far is None:
|
||||
return None
|
||||
kept.update(_keep((far["x"], far["y"]), far["table"]))
|
||||
return True if _place_far(top0, far) else far
|
||||
far = _see_kept(kept)
|
||||
if far is not None and _place_far(top0, far):
|
||||
return True
|
||||
return True if _place_remembered(top0, kept) else far
|
||||
|
||||
|
||||
def _place_kept(top0, kept, tried):
|
||||
@@ -1853,6 +2047,7 @@ def _place_at(tries, top, turned=True):
|
||||
rows = None # _line_rows said why
|
||||
if rows and not rows[-1][3]:
|
||||
_go_on()
|
||||
_aim_head({"x": x, "y": y, "top_mm": top}) # the head on the spot, the arm still
|
||||
log(f"putting it down at ({x:.0f}, {y:.0f})")
|
||||
skills._guarded(lambda: motion.move_linear(target=way[0][1], speed=skills.HOLDING_SPEED,
|
||||
path_checked=True)) # checked
|
||||
@@ -1866,6 +2061,7 @@ def _place_at(tries, top, turned=True):
|
||||
continue
|
||||
opt = next(skills.place_options(x, y, top, skills._joints()), None) # another grasp turn or wrist (the
|
||||
if opt: # cup's own turn does not matter)
|
||||
_aim_head({"x": x, "y": y, "top_mm": top})
|
||||
log(f"putting it down at ({x:.0f}, {y:.0f})")
|
||||
skills._guarded(skills.place_turned, *opt) # ends at home (look), hand open
|
||||
_set(holding=False)
|
||||
@@ -2086,7 +2282,7 @@ def _put_on_table(top0, thing, label, tried):
|
||||
measured yet: by the box until it is) and approached by its map place (_place_kept); in reach it is put down at
|
||||
once."""
|
||||
far = far_table((thing["x"], thing["y"]))
|
||||
kept = _keep((far["x"], far["y"]), far["table"]) if far else _keep((thing["x"], thing["y"]), None)
|
||||
kept = _keep((far["x"], far["y"]), far["table"], far["points"]) if far else _keep((thing["x"], thing["y"]), None)
|
||||
log(f"{label} at ({thing['x']:.0f}, {thing['y']:.0f}), " +
|
||||
(f"its top at {far['table']:.0f} mm: I keep it" if far else "its top not measured yet: I keep it"))
|
||||
try:
|
||||
@@ -2195,9 +2391,10 @@ def _put_down(say=None, on=None):
|
||||
if got is not None and arm_yaw() is not None and not _charging():
|
||||
log(f"a table at {got['table']:.0f} mm further away ({got['camera']} camera), at ({got['x']:.0f}, "
|
||||
f"{got['y']:.0f}): I keep it")
|
||||
kept = _keep((got["x"], got["y"]), got["table"])
|
||||
kept = _keep((got["x"], got["y"]), got["table"], got["points"])
|
||||
try:
|
||||
if _place_kept(top, kept, tried):
|
||||
_see_kept(kept) # its level top on a fine grid, before any drive
|
||||
if _place_remembered(top, kept) or _place_kept(top, kept, tried):
|
||||
return
|
||||
except FetchError as e:
|
||||
_too_low({"table": _kept_at(kept)[2]}, e) # its height as last measured, nearest
|
||||
@@ -2294,12 +2491,15 @@ def _pick_here(task, say):
|
||||
|
||||
def _pick(obj, waypoints, ja):
|
||||
"""skills._do_pick; whenever it leaves the object held, also after a stop in the lift, the stand is noted with it
|
||||
(a put down goes straight back down from here: _put_back_here)."""
|
||||
(a put down goes straight back down from here: _put_back_here). The head is on it while the arm takes it; once
|
||||
it is in the hand the head is free again."""
|
||||
_aim_head(obj)
|
||||
try:
|
||||
skills._guarded(skills._do_pick, obj, waypoints, ja)
|
||||
finally:
|
||||
if "top_mm" in skills._held:
|
||||
_note_stand()
|
||||
_aim_at(None)
|
||||
|
||||
|
||||
def _note_stand():
|
||||
@@ -2312,13 +2512,12 @@ def _note_stand():
|
||||
def _carry_from(above, ja):
|
||||
"""Holding, the arm at `above` (flange pose over the pick spot, joints `ja` there): to look the way a pick ends."""
|
||||
try:
|
||||
_line_holding("carry") # straight: the cup stays upright (a turned grasp
|
||||
_line_holding("carry", join=False) # straight: the cup stays upright (a turned grasp
|
||||
except FetchError: # can't go straight to look) ...
|
||||
plan = skills.carry_up(above, ja) # ... or, when that line jumps (carry has the elbow
|
||||
if plan is None: # almost straight), further up and one joint move
|
||||
raise
|
||||
skills._guarded(skills.carry_by_joints, plan)
|
||||
_line_holding(LOOK_POSE) # then look to drive
|
||||
if plan is not None: # almost straight), further up and one joint move
|
||||
skills._guarded(skills.carry_by_joints, plan)
|
||||
_line_holding(LOOK_POSE) # then look to drive (else arm_route's checked way there)
|
||||
|
||||
|
||||
def _carry_held():
|
||||
@@ -2390,6 +2589,7 @@ def _clear():
|
||||
_pause.clear()
|
||||
_set(paused=False)
|
||||
skills._cancel.clear()
|
||||
_aim_at(None)
|
||||
|
||||
|
||||
def _new_run():
|
||||
@@ -2481,8 +2681,9 @@ def held_by_skill(what):
|
||||
def pick_here(name, colour=None, say=None):
|
||||
"""The voice pick ("take the cup", assistant/lumi.py's skill thread): the `name` (`colour`) seen from where Lumi
|
||||
stands is reached as a fetch reaches it, with trusted grasp turns only (_reach voice=True: from here, else the
|
||||
waist in place, else with Patrol on the base, else the person is asked) and picked; it ends held just above the
|
||||
table. Returns the object."""
|
||||
waist in place, else with Patrol on the base, else the person is asked) and picked, then carried to look as a
|
||||
fetch's pick is (live 2026-10-30 it ended at the lift pose, the wrist turned over: no way back from there was
|
||||
found). Returns the object."""
|
||||
task = {"object": name, "colour": colour}
|
||||
_clear()
|
||||
try:
|
||||
@@ -2493,8 +2694,13 @@ def pick_here(name, colour=None, say=None):
|
||||
obj, waypoints, ja = _reach(task, obj, say, voice=True)
|
||||
_step("picking")
|
||||
_pick(obj, waypoints, ja)
|
||||
held_by_skill(task) # held, also when the carry is refused
|
||||
_step("carry")
|
||||
skills._guarded(skills._line, "up", waypoints[0][1]) # straight up to the approach height first
|
||||
_carry_from(waypoints[0][1], ja)
|
||||
finally:
|
||||
_set(step="")
|
||||
_aim_at(None) # no runner's end (head_ahead) after a voice pick
|
||||
return obj
|
||||
|
||||
|
||||
@@ -3137,11 +3343,11 @@ def _arm(pose):
|
||||
_set(holding=False)
|
||||
log(f"gripper {pose}: {st}")
|
||||
elif pose == "fold": # the arm's home
|
||||
_pose(LOOK_POSE)
|
||||
_line_holding(LOOK_POSE) if _state["holding"] else _pose(LOOK_POSE)
|
||||
elif pose == "reach": # the hand held out, as for a hand-over
|
||||
if "give" not in motion.poses():
|
||||
raise FetchError("I haven't learned how to reach out yet.")
|
||||
_pose("give")
|
||||
_line_holding("give") if _state["holding"] else _pose("give")
|
||||
|
||||
|
||||
def held_name(lang="en"):
|
||||
@@ -3170,6 +3376,19 @@ def release_now():
|
||||
_release.set()
|
||||
|
||||
|
||||
def let_go():
|
||||
"""The person says they hold what the hand holds ("I've got it", "내가 잡고 있어") while no task runs: open where the
|
||||
arm is and forget the held thing. False while a task runs (its hand-over opens on release_now)."""
|
||||
with _lock:
|
||||
if _busy():
|
||||
return False
|
||||
log("the person holds it: opening")
|
||||
gripper.open_()
|
||||
skills._held.clear()
|
||||
_set(holding=False, **({"status": "idle", "step": ""} if _state["status"] == "holding" else {}))
|
||||
return True
|
||||
|
||||
|
||||
def replace(steps, say=None):
|
||||
"""The person a mission is for takes it here or changes it: end the rest of this run, start `steps`."""
|
||||
sender = ((_state.get("task") or {}).get("sender"))
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
"""Wave back at people who wave at Lumi: the dashboard switch "Wave greeting". Greeter / Patrol are not needed; while
|
||||
either runs the assistant owns the robot and this waits. Runs in the API process (api/server.py starts it).
|
||||
|
||||
Someone waving within GREET_M of the head camera (vision/waving.py): the head turns to them and the arm goes up at
|
||||
once (manipulation/wave.py checks and plans the way, look -> wave_out -> wave_start, at the route speed), Lumi says a
|
||||
greeting (tasks/wave_lines.py), swings once even when they stopped meanwhile, then turns the waist to face them
|
||||
(fetch._waist_to, its sweep checked; the head stays on them). It swings while they wave, stops when they stop and
|
||||
keeps the hand up; waving again swings again. A long wave gets a joke now and then. Nobody waving for HOLD_S: the arm
|
||||
goes down slowly to look, the waist to the front, the head to rest.
|
||||
|
||||
Any stop or failure of the arm (STOP, a person too close while the arm goes up, a refused move) switches the greeting
|
||||
off: it never moves again by itself after a stop.
|
||||
"""
|
||||
import json
|
||||
import math
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
from manipulation import arm_route, wave
|
||||
from robot import head, motion
|
||||
from tasks import wave_lines
|
||||
from vision import camview, pose, waving
|
||||
|
||||
CAM = "head"
|
||||
GREET_M = 3.0 # m; people waving further away are not answered
|
||||
HOLD_S = 60.0 # s the hand stays up after the last wave seen, then down to look
|
||||
FRESH_S = 0.5 # s a waving person seen counts as waving now
|
||||
NEW_WAVE_S = 5.0 # s without any waving after which a wave is greeted anew (a new greeting line)
|
||||
JOKE_AFTER_S = 10.0 # s of waving before the first joke ...
|
||||
JOKE_EVERY_S = 12.0 # ... and between jokes
|
||||
WAIST_MIN_DEG = 10.0 # deg; a person nearer the front than this: only the head turns
|
||||
WAIST_PARTS = (1.0, 0.75, 0.5, 0.25) # a blocked waist turn is tried again this much of the way (beside a wall)
|
||||
HEAD_MIN_DEG = 8.0 # deg the person may move off the head's direction before the head follows
|
||||
DOWN_SPEED = "normal" # motion.JOINT_SPEED of the way down (owner: 2x the first "slow")
|
||||
SWING_SPEED = "swing" # motion.JOINT_SPEED of the swings, 60 deg/s at 4x the usual acceleration (owner: faster;
|
||||
# wave.SWING_SPEED of an asked wave is "quick")
|
||||
FREE_EVERY_S = 1.0 # s between checks that nothing else runs (it asks the AGV)
|
||||
REFUSED_S = 30.0 # s before trying again after the arm was refused (off, busy, holding something) and
|
||||
# between tries to bring a blocked waist back to the front
|
||||
HEAD_TIMEOUT_S = 5.0 # s a head move may take; the body API now and then never answers a moveto, and the call
|
||||
# holds the body lock all that time (the waist turn waited 30 s behind it)
|
||||
CLOSE_FRESH_S = 1.5 # s a camera service detection counts for the too-close check
|
||||
|
||||
_seen = {"t": 0.0, "wavers": []} # wavers: [(bearing deg from the waist's front, + left; distance m)], nearest first
|
||||
_busy = threading.Event() # the arm is up or moving for a greeting
|
||||
_speaking = threading.Lock()
|
||||
_on = _free = _off = None # set by start()
|
||||
|
||||
|
||||
def log(*a):
|
||||
print(time.strftime("%H:%M:%S"), "wave greeting:", *a, flush=True)
|
||||
|
||||
|
||||
def busy():
|
||||
return _busy.is_set()
|
||||
|
||||
|
||||
# ---------- seeing ----------
|
||||
def _head_yaw():
|
||||
"""Head yaw (deg) the camera service saw its newest frame at."""
|
||||
try:
|
||||
return float(json.loads(camview.det_path(CAM).read_text()).get("head_yaw") or 0.0)
|
||||
except (FileNotFoundError, ValueError):
|
||||
return 0.0
|
||||
|
||||
|
||||
def _dist(depth, at):
|
||||
"""Median depth (m) around a pixel, None without depth there."""
|
||||
if depth is None:
|
||||
return None
|
||||
x, y = int(at[0]), int(at[1])
|
||||
patch = depth[max(0, y - 6):y + 7, max(0, x - 6):x + 7]
|
||||
v = patch[patch > 0]
|
||||
return float(np.median(v)) / 1000 if v.size >= 5 else None
|
||||
|
||||
|
||||
def _watch():
|
||||
"""Every head camera frame while the switch is on: who waves, where (_seen)."""
|
||||
watcher, last, intr = waving.Watcher(), 0.0, None
|
||||
while True:
|
||||
if not _on():
|
||||
watcher, intr = waving.Watcher(), None
|
||||
time.sleep(0.5)
|
||||
continue
|
||||
camview.want(CAM)
|
||||
try:
|
||||
m = camview.raw_path(CAM).stat().st_mtime
|
||||
except FileNotFoundError:
|
||||
time.sleep(0.2)
|
||||
continue
|
||||
if m == last:
|
||||
time.sleep(0.01)
|
||||
continue
|
||||
last = m
|
||||
img = cv2.imread(str(camview.raw_path(CAM)))
|
||||
intr = intr or camview.intrinsics(CAM)
|
||||
if img is None or intr is None:
|
||||
continue
|
||||
depth, yaw = camview.depth(CAM), _head_yaw()
|
||||
gray = cv2.cvtColor(cv2.resize(img, None, fx=waving.SCALE, fy=waving.SCALE), cv2.COLOR_BGR2GRAY)
|
||||
wavers = []
|
||||
for p, is_waving in watcher.update(m, gray, pose.detect(img)):
|
||||
ls, rs = pose.seen(p["kp"], "left_shoulder"), pose.seen(p["kp"], "right_shoulder")
|
||||
if not (is_waving and ls and rs):
|
||||
continue
|
||||
at = ((ls[0] + rs[0]) / 2, (ls[1] + rs[1]) / 2)
|
||||
d = _dist(depth, at)
|
||||
if d is not None and d <= GREET_M:
|
||||
wavers.append((yaw - math.degrees(math.atan((at[0] - intr["cx"]) / intr["fx"])), d))
|
||||
_seen.update(t=time.time(), wavers=sorted(wavers, key=lambda w: w[1]))
|
||||
|
||||
|
||||
def _waver():
|
||||
"""(bearing, distance) of the nearest person waving now, None when nobody waves."""
|
||||
return _seen["wavers"][0] if _seen["wavers"] and time.time() - _seen["t"] < FRESH_S else None
|
||||
|
||||
|
||||
def _too_close():
|
||||
"""A person really close in either camera (the assistant's rule, lumi.too_close)."""
|
||||
from assistant.lumi import too_close
|
||||
for cam in ("head", "torso"):
|
||||
try:
|
||||
d = json.loads(camview.det_path(cam).read_text())
|
||||
except (FileNotFoundError, ValueError):
|
||||
continue
|
||||
if time.time() - d["time"] < CLOSE_FRESH_S and \
|
||||
too_close([p for p in d["people"] if p.get("distance_m") is not None], d["height"]):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# ---------- moving and talking ----------
|
||||
def _bg(fn, *args):
|
||||
threading.Thread(target=fn, args=args, daemon=True).start()
|
||||
|
||||
|
||||
def _say(lines, lang):
|
||||
"""One line of `lines` in language 0 (English) / 1 (Korean), in the background; skipped while Lumi speaks."""
|
||||
def run():
|
||||
if not _speaking.acquire(blocking=False):
|
||||
return
|
||||
try:
|
||||
from audio import mouth
|
||||
mouth.say(random.choice(lines)[lang])
|
||||
except Exception as e:
|
||||
log(f"say failed: {e!r}")
|
||||
finally:
|
||||
_speaking.release()
|
||||
_bg(run)
|
||||
|
||||
|
||||
def _turn_head(yaw, pitch=None):
|
||||
"""head.turn with HEAD_TIMEOUT_S; a move that times out is logged (the head finishes it anyway)."""
|
||||
try:
|
||||
lift, waist, _, now_pitch = head.status()
|
||||
yaw = max(-head.YAW_LIMIT, min(head.YAW_LIMIT, yaw))
|
||||
head.moveto([lift, waist, yaw, now_pitch if pitch is None else pitch], timeout=HEAD_TIMEOUT_S)
|
||||
except Exception as e:
|
||||
log(f"head move: {e!r}")
|
||||
|
||||
|
||||
def _head_to(bearing):
|
||||
"""The head to a bearing from the waist's front, in the background, unless it looks there already."""
|
||||
if abs(bearing - _head_yaw()) > HEAD_MIN_DEG:
|
||||
_bg(_turn_head, bearing)
|
||||
|
||||
|
||||
def _up(route):
|
||||
"""The way up (wave.plan) at the route speed, the last move at ARRIVE_SPEED; the arm stops when a person comes
|
||||
really close meanwhile (motion.MotionError)."""
|
||||
if not route:
|
||||
return
|
||||
done = threading.Event()
|
||||
|
||||
def guard():
|
||||
while not done.wait(0.1):
|
||||
if _too_close():
|
||||
log("a person is too close - STOP arm")
|
||||
motion.stop()
|
||||
return
|
||||
threading.Thread(target=guard, daemon=True).start()
|
||||
t0 = time.time()
|
||||
try:
|
||||
motion.move_path([(j, arm_route.SPEED) for _, j in route[:-1]] + [(route[-1][1], wave.ARRIVE_SPEED)])
|
||||
finally:
|
||||
done.set()
|
||||
log(f"arm up after {time.time() - t0:.1f} s")
|
||||
|
||||
|
||||
def _swing():
|
||||
"""One swing, START -> SWING -> START, back to back."""
|
||||
p, t0 = motion.poses(), time.time()
|
||||
motion.move_path([(p[wave.SWING], SWING_SPEED), (p[wave.START], SWING_SPEED)], queued=True)
|
||||
log(f"swing {time.time() - t0:.1f} s")
|
||||
|
||||
|
||||
def _face(bearing):
|
||||
"""Waist turned to the person (they face each other), the head staying on them; only the head when they are
|
||||
nearly in front. A turn whose sweep is not clear is tried part of the way (WAIST_PARTS); the head covers the
|
||||
rest."""
|
||||
from tasks import fetch
|
||||
fetch._stop.clear() # no task runs: an old stop must not end this turn
|
||||
for part in WAIST_PARTS:
|
||||
if abs(bearing * part) < WAIST_MIN_DEG:
|
||||
break
|
||||
if fetch._waist_to(fetch._waist_turn() + bearing * part, in_place=True, look=bearing):
|
||||
return
|
||||
_head_to(bearing)
|
||||
|
||||
|
||||
def _greet(bearing, lang):
|
||||
"""Head to them, a greeting, the arm up, one swing, the waist to them. False when the arm is refused."""
|
||||
try:
|
||||
route, _ = wave.plan()
|
||||
except Exception as e: # refused (arm off, busy, holding) or the controller did not answer
|
||||
log(f"not waving: {e.args[0] if isinstance(e, wave.WaveError) else repr(e)}")
|
||||
return False
|
||||
log(f"someone waves at {bearing:+.0f} deg: arm up")
|
||||
_busy.set()
|
||||
_head_to(bearing)
|
||||
_say(wave_lines.GREET, lang)
|
||||
_up(route)
|
||||
_swing() # once, even if they stopped while the arm went up
|
||||
w = _waver()
|
||||
_face(w[0] if w else bearing)
|
||||
return True
|
||||
|
||||
|
||||
def _down():
|
||||
"""Waist to the front first, the way it came with the hand up (in `look` the arm sticks out further and the same
|
||||
turn back can be blocked), then the arm slowly down to look and the head to rest."""
|
||||
from tasks import fetch
|
||||
_busy.set()
|
||||
try:
|
||||
fetch._stop.clear()
|
||||
_st["waist_out"] = not fetch._waist_to(0.0, in_place=True)
|
||||
if arm_route.where() in arm_route.WAVE_POSES:
|
||||
arm_route.move(arm_route.plan(arm_route.HOME), DOWN_SPEED)
|
||||
_turn_head(0.0, head.HEAD_REST_PITCH)
|
||||
log("arm down")
|
||||
finally:
|
||||
_busy.clear()
|
||||
|
||||
|
||||
_st = {"up": False, "last_wave": 0.0, "lang": 0, "next_joke": 0.0, "free": False, "free_at": 0.0, "refused_until": 0.0,
|
||||
"waist_out": False} # waist_out: the way back to the front was blocked, tried again later
|
||||
|
||||
|
||||
def step(now):
|
||||
"""One look at what to do now (_run calls it every 50 ms)."""
|
||||
st = _st
|
||||
if not _on():
|
||||
if st["up"]:
|
||||
_down()
|
||||
st["up"] = False
|
||||
return
|
||||
if now - st["free_at"] > FREE_EVERY_S:
|
||||
st["free"], st["free_at"] = _free(), now
|
||||
if not st["free"]: # the assistant or a task has the robot: it takes the arm from here
|
||||
st["up"] = False
|
||||
_busy.clear()
|
||||
return
|
||||
w = _waver()
|
||||
new = bool(w) and now - st["last_wave"] > NEW_WAVE_S
|
||||
if new:
|
||||
st["lang"], st["next_joke"] = random.randrange(2), now + JOKE_AFTER_S
|
||||
if w:
|
||||
st["last_wave"] = now
|
||||
if not st["up"]:
|
||||
if w and now > st["refused_until"]:
|
||||
st["up"] = _greet(w[0], st["lang"])
|
||||
if not st["up"]:
|
||||
st["refused_until"] = now + REFUSED_S
|
||||
elif not w and st["waist_out"] and now > st["refused_until"]:
|
||||
from tasks import fetch
|
||||
fetch._stop.clear()
|
||||
st["waist_out"] = not fetch._waist_to(0.0, in_place=True)
|
||||
st["refused_until"] = now + REFUSED_S
|
||||
elif w:
|
||||
if arm_route.where() not in (wave.START, wave.SWING):
|
||||
st["up"] = False # someone moved the arm: the next wave starts from where it is
|
||||
return
|
||||
if new:
|
||||
_say(wave_lines.GREET, st["lang"])
|
||||
elif now > st["next_joke"]:
|
||||
_say(wave_lines.LONG, st["lang"])
|
||||
st["next_joke"] = now + JOKE_EVERY_S
|
||||
_head_to(w[0])
|
||||
_swing()
|
||||
elif now - st["last_wave"] > HOLD_S:
|
||||
_down()
|
||||
st["up"] = False
|
||||
|
||||
|
||||
def _stopped(e):
|
||||
"""A stop or a failure of the arm: switched off, it never goes on by itself."""
|
||||
log(f"stopped ({e!r}) - switched off")
|
||||
_busy.clear()
|
||||
_st["up"] = False
|
||||
_off()
|
||||
_say([("I stopped my arm.", "팔을 멈췄어요.")], _st["lang"])
|
||||
|
||||
|
||||
def _run():
|
||||
while True:
|
||||
time.sleep(0.05)
|
||||
try:
|
||||
step(time.time())
|
||||
except Exception as e:
|
||||
_stopped(e)
|
||||
|
||||
|
||||
def start(on, free, off):
|
||||
"""`on()`: the switch is on; `free()`: nothing else has the robot; `off()`: turn the switch off."""
|
||||
global _on, _free, _off
|
||||
_on, _free, _off = on, free, off
|
||||
threading.Thread(target=_watch, daemon=True).start()
|
||||
threading.Thread(target=_run, daemon=True).start()
|
||||
@@ -0,0 +1,59 @@
|
||||
"""What Lumi says while it waves back at someone (tasks/wave_greet.py), (English, Korean). One language per wave,
|
||||
picked at random: a passer-by's language is not known. The lines fit a hello and a goodbye alike."""
|
||||
|
||||
GREET = [
|
||||
("Hi there! Have a wonderful day!", "안녕하세요! 좋은 하루 보내세요!"),
|
||||
("Hello, hello! Nice to see you!", "안녕하세요! 반가워요!"),
|
||||
("Hey! I see you!", "어! 저 보여요, 보여요!"),
|
||||
("Hi! You made my day!", "안녕하세요! 덕분에 기분이 좋아졌어요!"),
|
||||
("Hello! Waving back at you!", "안녕하세요! 저도 손 흔들어요!"),
|
||||
("Hi friend! Take care!", "안녕하세요, 친구! 잘 지내요!"),
|
||||
("Hello! Lovely to see a friendly face!", "안녕하세요! 반가운 얼굴이네요!"),
|
||||
("Hey there! Big wave for you!", "안녕하세요! 크게 흔들어 드릴게요!"),
|
||||
("Hi! Thanks for saying hello!", "안녕하세요! 인사해 주셔서 고마워요!"),
|
||||
("Hello! You have a great wave!", "안녕하세요! 손 흔드는 모습이 멋져요!"),
|
||||
("Hi! I'm Lumi. Nice to meet you!", "안녕하세요! 저는 루미예요. 만나서 반가워요!"),
|
||||
("Hey! Have a good one!", "안녕하세요! 좋은 시간 보내세요!"),
|
||||
("Hello! Smile, it's a good day!", "안녕하세요! 웃어요, 좋은 날이에요!"),
|
||||
("Hi! You waved, so I wave!", "안녕하세요! 손 흔드시니까 저도 흔들어요!"),
|
||||
("Hello there! See you around!", "안녕하세요! 또 만나요!"),
|
||||
("Hi! Robots love waves too!", "안녕하세요! 로봇도 손 인사를 좋아해요!"),
|
||||
("Hey! Hello from Lumi!", "안녕하세요! 루미가 인사드려요!"),
|
||||
("Hi! Hope everything goes well today!", "안녕하세요! 오늘 일 다 잘 되길 바라요!"),
|
||||
("Hello! Thanks for noticing me!", "안녕하세요! 저를 봐 주셔서 고마워요!"),
|
||||
("Hi there! Sending you good energy!", "안녕하세요! 좋은 기운 보내 드려요!"),
|
||||
("Hello! Wave received, wave returned!", "안녕하세요! 인사 받았어요, 저도 인사해요!"),
|
||||
("Hi! Always happy to see you!", "안녕하세요! 언제 봐도 반가워요!"),
|
||||
("Hey! What a nice wave!", "안녕하세요! 정말 멋진 인사예요!"),
|
||||
("Hello! Take it easy!", "안녕하세요! 편하게 쉬엄쉬엄 하세요!"),
|
||||
("Hi! My hand says hello too!", "안녕하세요! 제 손도 인사하고 있어요!"),
|
||||
]
|
||||
|
||||
# said while the waving goes on and on
|
||||
LONG = [
|
||||
("My arm is getting tired. Isn't yours?", "제 팔이 좀 아파요. 그쪽 팔은 괜찮아요?"),
|
||||
("Still waving? You have more energy than my battery!", "아직도요? 제 배터리보다 힘이 넘치시네요!"),
|
||||
("Okay, okay, I see you! Really!", "네, 네, 보여요! 정말 보여요!"),
|
||||
("Is this a waving contest? I'm not giving up!", "손 흔들기 대회인가요? 저도 안 져요!"),
|
||||
("We could do this all day. Should we?", "이러다 하루 종일 하겠어요. 그럴까요?"),
|
||||
("My motors are warming up nicely!", "제 모터가 따끈따끈해지고 있어요!"),
|
||||
("You win. My arm needs a coffee break.", "졌어요. 제 팔도 커피 한 잔 해야겠어요."),
|
||||
("I think we are best friends now.", "이제 우리 완전 친한 친구 같아요."),
|
||||
("Let's call it a tie, okay?", "우리 무승부로 할까요?"),
|
||||
("My elbow is asking for a holiday.", "제 팔꿈치가 휴가 달래요."),
|
||||
("If waving burned calories, I'd be very slim.", "손 흔들기로 살이 빠지면 저는 벌써 날씬해졌을 거예요."),
|
||||
("Careful, I can do this for hours. I'm a robot.", "조심하세요, 저는 로봇이라 몇 시간도 할 수 있어요."),
|
||||
("Your arm is stronger than mine, and mine is made of metal!", "제 팔은 금속인데도 그쪽 팔이 더 세네요!"),
|
||||
("Okay, one more wave, and then a snack.", "좋아요, 한 번만 더 하고 간식 먹어요."),
|
||||
("Are we saying hello or goodbye? I forgot.", "지금 인사하는 거예요, 헤어지는 거예요? 까먹었어요."),
|
||||
("Wave number one hundred! Just kidding, I'm not counting.", "백 번째 인사! 농담이에요, 세고 있진 않아요."),
|
||||
("I hope nobody is watching us.", "누가 우리 보고 있는 건 아니겠죠?"),
|
||||
("This is the longest hello of my life.", "제 인생에서 제일 긴 인사예요."),
|
||||
("You don't get tired, do you?", "혹시 안 지치세요?"),
|
||||
("My arm says: please, a little break!", "제 팔이 말해요: 잠깐만 쉬어요, 제발!"),
|
||||
("We should start a waving club.", "우리 손 흔들기 동아리 만들어야겠어요."),
|
||||
("I'll remember this wave forever. Well, until my next update.", "이 인사 영원히 기억할게요. 음, 다음 업데이트 전까지요."),
|
||||
("Okay, you are officially the best waver today.", "공식적으로 오늘 최고의 인사왕이세요."),
|
||||
("Even my battery is waving goodbye now.", "이제 제 배터리도 손 흔들고 있어요."),
|
||||
("Alright, alright! Hello, hello, hello!", "알았어요, 알았어요! 안녕, 안녕, 안녕하세요!"),
|
||||
]
|
||||
Reference in New Issue
Block a user