Browse Source

modified IP and fix flip error prompting

remote-reachy2-improvements
haixuanTao 8 months ago
parent
commit
ad85deec67
2 changed files with 12 additions and 9 deletions
  1. +6
    -6
      examples/reachy2-remote/dataflow_reachy.yml
  2. +6
    -3
      examples/reachy2-remote/parse_whisper.py

+ 6
- 6
examples/reachy2-remote/dataflow_reachy.yml View File

@@ -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


+ 6
- 3
examples/reachy2-remote/parse_whisper.py View File

@@ -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]),


Loading…
Cancel
Save