From c1e1d0b2028893ea5734855ebc479ff04471d76a Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 12 May 2025 08:52:07 +0200 Subject: [PATCH] Minor improvement --- examples/reachy2-remote/parse_pose.py | 3 +++ examples/reachy2-remote/parse_whisper.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/reachy2-remote/parse_pose.py b/examples/reachy2-remote/parse_pose.py index 11b23fd9..30e33f07 100644 --- a/examples/reachy2-remote/parse_pose.py +++ b/examples/reachy2-remote/parse_pose.py @@ -183,6 +183,7 @@ for event in node: metadata={"encoding": "xyzrpy", "duration": "1"}, ) event = wait_for_event(id="translate_base") + arm_holding_object = "right" else: y += 0.03 node.send_output( @@ -236,6 +237,7 @@ for event in node: metadata={"encoding": "xyzrpy", "duration": "1"}, ) event = wait_for_event(id="translate_base") + arm_holding_object = "left" case "release": if len(values) == 0: continue @@ -254,6 +256,7 @@ for event in node: if abs(y) > 0.5: continue if arm_holding_object is None: + print("No arm holding object!!!") continue elif arm_holding_object == "right": node.send_output( diff --git a/examples/reachy2-remote/parse_whisper.py b/examples/reachy2-remote/parse_whisper.py index dc9f238f..ce556cee 100644 --- a/examples/reachy2-remote/parse_whisper.py +++ b/examples/reachy2-remote/parse_whisper.py @@ -58,9 +58,10 @@ for event in node: node.send_output("points", pa.array([], type=pa.float64())) elif "follow" in text: text = f"Given the prompt: {text}. Output the bounding boxes for the given followed object" + node.send_output("look_ahead", pa.array([1.0])) + time.sleep(0.5) # Sync image node.send_output("text", pa.array([text]), {"image_id": "image_left"}) node.send_output("follow_pose", pa.array([1.0])) - node.send_output("look_ahead", pa.array([1.0])) elif "raise your arms" in text: node.send_output("raise_arm_pose", pa.array([1.0])) elif "grab " in text: