Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: introduce other guests to new guest. #251

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class speech_model_params:
mic_device: Optional[str] = None
timer_duration: Optional[int] = 20
warmup: bool = True
energy_threshold: Optional[int] = 600
energy_threshold: Optional[int] = None
pause_threshold: Optional[float] = 2.0


Expand Down Expand Up @@ -291,8 +291,8 @@ def parse_args() -> dict:

parser.add_argument(
"--energy_threshold",
type=int,
default=600,
type=Optional[int],
default=None,
help="Energy threshold for silence detection. Using this disables automatic adjustment",
)

Expand Down
73 changes: 73 additions & 0 deletions tasks/receptionist/config/arcade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
priors:
names:
- Adel
- Angel
- Axel
- Charlie
- Jane
- Jules
- Morgan
- Paris
- Robin
- Simone
drinks:
- cola
- iced tea
- juice pack
- milk
- orange juice
- red wine
- tropical juice


#WAIT POSE LAB:
wait_pose:
position:
x: -15.027493553116143
y: 8.731164058220495
z: 0.0
orientation:
x: 0.0
y: 0.0
z: -0.7865759968179794
w: 0.6174934827427752



#556918144226074


#0.478893309417269
#0.8778731105321406


#WAIT AREA LAB:
# From robot POV: [top left, top right,bottom right, bottom left ]
wait_area: [[-15.9, 8.19], [-17.2, 8.11], [-16.2, 11.2], [-14.9, 10.0]]

#Where to position self for seating guests
seat_pose:
position:
x: -13.659998294234812
y: 6.421172168922483
z: 0.0
orientation:
x: 0.0
y: 0.0
z: -0.6021594916272762
w: 0.7983758179223494



search_motions: ["look_left", "look_right"]
sofa_point:
x: -15.0
y: 4.21
z: 0.5

seat_area: [[-12.2, 2.63], [-18.2, 4.61], [-17.4, 7.31], [-11.7, 5.06]]
max_people_on_sofa: 2

sofa_area: [[-13.8, 4.61], [-14.4, 3.54], [-15.85, 4.16], [-15.4, 5.33]]

sweep: true
2 changes: 1 addition & 1 deletion tasks/receptionist/launch/setup.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<launch>

<!-- PARAMS -->
<arg name="config" default="lab"/>
<arg name="config" default="arcade"/>

<!-- INTERACTION -->
<arg name="whisper_device_param" default="9" />
Expand Down
4 changes: 2 additions & 2 deletions tasks/receptionist/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
max_people_on_sofa = rospy.get_param("/receptionist/max_people_on_sofa")

seat_area = ShapelyPolygon(seat_area_param)
assert seat_area.is_valid
assert seat_area.is_valid, "Seat area is not valid"

sofa_area = ShapelyPolygon(sofa_area_param)
assert sofa_area.is_valid
assert sofa_area.is_valid, "Sofa area is not valid"

sofa_point = Point(**sofa_point_param)

Expand Down
2 changes: 1 addition & 1 deletion tasks/receptionist/src/receptionist/states/handle_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, guest_id: str):
smach.StateMachine.add(
f"REPEAT_GET_NAME_AND_DRINK_GUEST_{guest_id}",
AskAndListen(
"Sorry, I didn't get that, please raise your voice. What is your name and favourite drink?"
"Sorry, I didn't get that, please raise your voice. What is your name and favourite drink? Please remember to say 'hi tiago'"
),
transitions={
"succeeded": f"REPEAT_PARSE_NAME_AND_DRINK_GUEST_{guest_id}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,33 @@ def execute(self, userdata):
guest_to_introduce=guest_id,
guest_to_introduce_to=guest_to_introduce_to,
),
transitions={
"succeeded": f"LOOK_AT_WAITING_GUEST_{guest_id}_{guest_to_introduce_to}",
},
)

smach.StateMachine.add(
f"LOOK_AT_WAITING_GUEST_{guest_id}_{guest_to_introduce_to}",
PlayMotion(motion_name="look_very_left"),
transitions={
"succeeded": f"INTRODUCE_{guest_to_introduce_to}_TO_{guest_id}",
"aborted": f"INTRODUCE_{guest_to_introduce_to}_TO_{guest_id}",
"preempted": f"INTRODUCE_{guest_to_introduce_to}_TO_{guest_id}",
},
)

smach.StateMachine.add(
f"INTRODUCE_{guest_to_introduce_to}_TO_{guest_id}",
Introduce(
guest_to_introduce=guest_to_introduce_to,
guest_to_introduce_to=guest_id,
),
transitions={
"succeeded": (
"SELECT_SEAT"
if i == len(guests_to_introduce_to) - 1
else f"GET_LOOK_POINT_{guests_to_introduce_to[i+1]}"
)
),
},
)

Expand Down