From ad85deec67ae8bad466c6546338b6d8740f20c0f Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Wed, 21 May 2025 16:12:23 +0200 Subject: [PATCH] modified IP and fix flip error prompting --- examples/reachy2-remote/dataflow_reachy.yml | 12 ++++++------ examples/reachy2-remote/parse_whisper.py | 9 ++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/examples/reachy2-remote/dataflow_reachy.yml b/examples/reachy2-remote/dataflow_reachy.yml index d0a189e0..7e503c6b 100644 --- a/examples/reachy2-remote/dataflow_reachy.yml +++ b/examples/reachy2-remote/dataflow_reachy.yml @@ -9,7 +9,7 @@ nodes: env: # IMAGE_WIDTH: 640 # IMAGE_HEIGHT: 480 - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: reachy-head build: pip install -e ../../node-hub/dora-reachy2 @@ -19,7 +19,7 @@ nodes: env: # IMAGE_WIDTH: 640 # IMAGE_HEIGHT: 480 - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: camera_depth build: pip install -e ../../node-hub/dora-reachy2 @@ -32,7 +32,7 @@ nodes: env: # IMAGE_WIDTH: 640 # IMAGE_HEIGHT: 480 - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: reachy-left-arm build: pip install -e ../../node-hub/dora-reachy2 @@ -42,7 +42,7 @@ nodes: outputs: - response_l_arm env: - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: reachy-right-arm build: pip install -e ../../node-hub/dora-reachy2 @@ -52,7 +52,7 @@ nodes: outputs: - response_r_arm env: - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: reachy-mobile-base build: pip install -e ../../node-hub/dora-reachy2 @@ -64,7 +64,7 @@ nodes: outputs: - response_base env: - ROBOT_IP: 172.18.131.66 + ROBOT_IP: 10.42.0.242 - id: dora-microphone build: pip install -e ../../node-hub/dora-microphone diff --git a/examples/reachy2-remote/parse_whisper.py b/examples/reachy2-remote/parse_whisper.py index aa1609f3..1fa84fb1 100644 --- a/examples/reachy2-remote/parse_whisper.py +++ b/examples/reachy2-remote/parse_whisper.py @@ -34,10 +34,13 @@ def handle_event(text: str): elif ( ("pick" in text and "place" in text) or ("make a hot dog" in text) + or ("make a vegetarian hot dog" in text) or ("cook" in text) ): if "make a hot dog" in text: - text = "pick the sausage, place it on the black grill, wait, flip the sausage, wait, pick the sausage, place it on the bread, speak it's ready!" + text = "pick the sausage, place it on the black grill, wait, flip the sausage on the grill, wait, pick the sausage on the grill, place it on the hot dog bun, speak it's ready!" + if "make a vegetarian hot dog" in text: + text = "pick the cucumber, place it on the black grill, wait, flip the cucumber on the grill, wait, pick the cucumber on the grill, place it on the hot dog bun, speak it's ready!" elif "cook" in text: # Match 'grill' followed by two words match = re.search(r"\bcook\b\s+(\w+)\s+(\w+)", text) @@ -62,7 +65,7 @@ def handle_event(text: str): node.send_output("speech", pa.array(["I'm going to " + text])) - text = f"Given the prompt: {text}. Output the bounding boxes for the given picked object" + text = f"Given the prompt: {text}. Output the bounding boxes for the object to be picked" node.send_output( "text", @@ -104,7 +107,7 @@ def handle_event(text: str): node.send_output("speech", pa.array(["I'm going to " + text])) - text = f"Given the prompt: {text}. Output the bounding boxes for the flipped object" + text = f"Given the prompt: {text}. Output the bounding boxes for the object to flip" node.send_output( "text", pa.array([text]),