Skip to content

Commit

Permalink
fix: issues with introduction.
Browse files Browse the repository at this point in the history
  • Loading branch information
jws-1 committed Nov 12, 2024
1 parent 21e97c4 commit 0248786
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
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 0248786

Please sign in to comment.