Skip to content

Commit ac0657d

Browse files
haiwei-luojws-1
andauthored
Receptionist slowness fix (#254)
Co-authored-by: Jared Swift <jared.swift@kcl.ac.uk>
1 parent d0e741f commit ac0657d

File tree

4 files changed

+75
-12
lines changed

4 files changed

+75
-12
lines changed

common/vision/lasr_vision_yolov8/src/lasr_vision_yolov8/yolo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ def detect_3d(
152152
f"Detected point: {detection.point} of object {detection.name}"
153153
)
154154

155-
markers.create_and_publish_marker(
156-
debug_point_publisher,
157-
PointStamped(point=detection.point, header=pcl_map.header),
158-
)
155+
# markers.create_and_publish_marker(
156+
# debug_point_publisher,
157+
# PointStamped(point=detection.point, header=pcl_map.header),
158+
# )
159159

160160
detected_objects.append(detection)
161161

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
priors:
2+
names:
3+
- Adel
4+
- Angel
5+
- Axel
6+
- Charlie
7+
- Jane
8+
- Jules
9+
- Morgan
10+
- Paris
11+
- Robin
12+
- Simone
13+
drinks:
14+
- cola
15+
- iced tea
16+
- juice pack
17+
- milk
18+
- orange juice
19+
- red wine
20+
- tropical juice
21+
22+
# WAIT POSE KITCHEN:
23+
wait_pose:
24+
position:
25+
x: 8.245934441303595
26+
y: 24.285935396834816
27+
z: 0.0
28+
orientation:
29+
x: 0.0
30+
y: 0.0
31+
z: 0.08719394681831685
32+
w: 0.9961913549304895
33+
34+
# WAIT AREA KITCHEN:
35+
wait_area: [[9.16, 25.3], [10.6, 25.7], [11, 24.1], [9.4, 23.7]]
36+
37+
seat_pose:
38+
position:
39+
x: 7.439730848846352
40+
y: 22.667057212175145
41+
z: 0.0
42+
orientation:
43+
x: 0.0
44+
y: 0.0
45+
z: -0.6336387580418182
46+
w: 0.7736290611832146
47+
48+
search_motions: ["look_left", "look_right"]
49+
sofa_point:
50+
x: 7.78
51+
y: 20.1
52+
z: 0.5
53+
seat_area: [[10.8, 20.2], [5.2, 18.9], [4.41, 21.6], [10.1, 23.1]]
54+
max_people_on_sofa: 2
55+
sofa_area: [[8.52, 20.1], [7.1, 19.8], [6.71, 21.1], [8.06, 21.5]]
56+
57+
sweep: true

tasks/receptionist/launch/setup.launch

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<rosparam command="load" file="$(find receptionist)/config/motions.yaml"/>
1616

1717
<!-- PERCEPTION -->
18-
<include file="$(find lasr_vision_yolov8)/launch/service.launch"/>
1918
<include file="$(find lasr_vision_cropped_detection)/launch/cropped_detection.launch"/>
2019
<node pkg="lasr_vision_feature_extraction" type="service" name="torch_service" output="screen"/>
2120
<include file="$(find lasr_vision_bodypix)/launch/bodypix.launch">

tasks/receptionist/src/receptionist/states/introduce_and_seat_guest.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def execute(self, userdata):
699699
# Say to sit on the sofa
700700
smach.StateMachine.add(
701701
"SAY_SOFA",
702-
Say(text="Please sit on the sofa"),
702+
Say(text="Please sit on the sofa that I am looking at"),
703703
transitions={
704704
"succeeded": "LOOK_AT_SEAT",
705705
"preempted": "LOOK_AT_SEAT",
@@ -723,9 +723,9 @@ def execute(self, userdata):
723723
"SAY_ANY",
724724
Say(text="Please sit on any empty seat"),
725725
transitions={
726-
"succeeded": "succeeded",
727-
"preempted": "succeeded",
728-
"aborted": "succeeded",
726+
"succeeded": "WAIT_SEAT",
727+
"preempted": "WAIT_SEAT",
728+
"aborted": "WAIT_SEAT",
729729
},
730730
)
731731

@@ -734,12 +734,19 @@ def execute(self, userdata):
734734
"LOOK_AT_SEAT",
735735
LookToPoint(),
736736
transitions={
737-
"succeeded": "succeeded",
738-
"aborted": "succeeded",
739-
"timed_out": "succeeded",
737+
"succeeded": "WAIT_SEAT",
738+
"aborted": "WAIT_SEAT",
739+
"timed_out": "WAIT_SEAT",
740740
},
741741
remapping={"pointstamped": "seat_position"},
742742
)
743+
744+
smach.StateMachine.add(
745+
"WAIT_SEAT",
746+
Wait(3),
747+
transitions={"succeeded": "succeeded", "failed": "failed"},
748+
)
749+
743750
else:
744751

745752
class RecognisePeople(smach.State):

0 commit comments

Comments
 (0)