Skip to content

Commit

Permalink
Fix Receptionist (#274)
Browse files Browse the repository at this point in the history
* fix: issues with introduction.

* fix: don't import something that doesn't exist.
  • Loading branch information
jws-1 authored Nov 12, 2024
1 parent 21e97c4 commit 18deeaa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
1 change: 0 additions & 1 deletion skills/src/lasr_skills/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from .detect_gesture import DetectGesture
from .look_at_person import LookAtPerson
from .wait import Wait
from .find_gesture_person import FindGesturePerson
from .adjust_camera import AdjustCamera
from .guide import Guide
from .detect_clothing import DetectClothing
Expand Down
26 changes: 11 additions & 15 deletions tasks/receptionist/src/receptionist/state_machine.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
from typing import List, Tuple

import rospy
import smach
import smach_ros

from lasr_vision_msgs.srv import Recognise
from geometry_msgs.msg import Pose, Point, PointStamped
from shapely.geometry import Polygon
from geometry_msgs.msg import Point, PointStamped, Pose
from lasr_skills import (
GoToLocation,
WaitForPersonInArea,
Say,
AskAndListen,
PlayMotion,
GoToLocation,
LookToPoint,
PlayMotion,
Say,
Wait,
WaitForPersonInArea,
)
from std_msgs.msg import Header, Empty
from receptionist.states import (
HandleGuest,
IntroduceAndSeatGuest,
)

import rospy
from lasr_vision_msgs.srv import Recognise
from receptionist.states import HandleGuest, IntroduceAndSeatGuest
from shapely.geometry import Polygon
from std_msgs.msg import Empty, Header


class Receptionist(smach.StateMachine):
Expand Down
9 changes: 5 additions & 4 deletions tasks/receptionist/src/receptionist/states/introduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"""

from typing import Any, Dict, List, Optional

import rospy
import smach
from lasr_skills import LookToPoint, Say
from smach import UserData
from lasr_skills import Say, LookToPoint
from typing import Dict, List, Any, Optional


def stringify_guest_data(
Expand All @@ -27,8 +28,6 @@ def stringify_guest_data(

relevant_guest_data = guest_data[guest_id]

relevant_guest_data["attributes"]["has_hair"] = 0.5

guest_str = f"{relevant_guest_data['name']}, their favourite drink is {relevant_guest_data['drink']}. "

if (
Expand All @@ -38,6 +37,8 @@ def stringify_guest_data(
):
return guest_str

relevant_guest_data["attributes"]["has_hair"] = 0.5

if relevant_guest_data["attributes"]["long_hair"]:
guest_str += "They have long hair. "
else:
Expand Down

0 comments on commit 18deeaa

Please sign in to comment.