Skip to content

Commit

Permalink
Merge remote-tracking branch 'zoe-fork/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tiago committed May 28, 2024
2 parents 953d35c + 4d34852 commit 6a38d09
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 86 deletions.
25 changes: 20 additions & 5 deletions tasks/receptionist/config/lab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,32 @@ priors:
- orange juice
- red wine
- tropical juice
# wait_pose:
# position:
# x: 2.4307581363168773
# y: -1.661594410669659
# z: 0.0
# orientation:
# x: 0.0
# y: 0.0
# z: 0.012769969339563213
# w: 0.9999184606171978

wait_pose:
position:
x: 2.4307581363168773
y: -1.661594410669659
x: 4.637585370589175
y: 6.715591164127531
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.012769969339563213
w: 0.9999184606171978
wait_area: [[2.65, -0.61], [4.21, -0.33], [4.58, -2.27], [2.67, -2.66]]
z: 0.478893309417269
w: 0.4
#0.478893309417269
#0.8778731105321406

# wait_area: [[2.65, -0.61], [4.21, -0.33], [4.58, -2.27], [2.67, -2.66]]
wait_area: [[3.60, 8.56], [4.69, 8.90], [4.98, 7.59], [3.95, 7.34]]
seat_pose:
position:
x: 1.1034954065916212
Expand Down
7 changes: 7 additions & 0 deletions tasks/receptionist/doc/PREREQUISITES.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
If you would like to view the documentation in the browser, ensure you have at [Node.js v16.x](https://nodejs.org/en) installed.


Please make sure the following models are installed in order to run this code:

- lasr_vision_yolov8 requires yolov8n-seg.pt in lasr_vision_yolov8/models/
- lasr_vision_feature_extraction requires model.pth in lasr_vision_feature_extraction/models/
- lasr_vision_clip requires a model from hugging face, this can be downloaded by running 'rosrun lasr_vision_clip vqa'
3 changes: 2 additions & 1 deletion tasks/receptionist/launch/setup.launch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<node pkg="lasr_speech_recognition_whisper" type="transcribe_microphone_server" name="transcribe_speech" output="screen" args="--mic_device $(arg whisper_device_param)"/>

<!-- STATIC POINTS -->
<rosparam command="load" file="$(find receptionist)/config/$(arg config).yaml" />
<!--<rosparam command="load" file="$(find receptionist)/config/$(arg config).yaml" />-->
<rosparam command="load" file="$(find receptionist)/config/lab.yaml"/>

<!-- MOTIONS -->
<rosparam command="load" file="$(find lasr_skills)/config/motions.yaml"/>
Expand Down
17 changes: 13 additions & 4 deletions tasks/receptionist/scripts/main.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
#!/usr/bin/env python3
import rospy
from receptionist.state_machine import Receptionist
import smach
import smach_ros

from geometry_msgs.msg import Pose, Point, Quaternion
from shapely.geometry import Polygon

if __name__ == "__main__":
rospy.init_node("receptionist_robocup")
wait_pose_param = rospy.get_param("/receptionist/wait_pose")
# wait_pose_param = rospy.get_param("/receptionist/wait_pose")
wait_pose_param = rospy.get_param("/wait_pose/")

wait_pose = Pose(
position=Point(**wait_pose_param["position"]),
orientation=Quaternion(**wait_pose_param["orientation"]),
)

wait_area_param = rospy.get_param("/receptionist/wait_area")
wait_area_param = rospy.get_param("/wait_area")
wait_area = Polygon(wait_area_param)

seat_pose_param = rospy.get_param("/receptionist/seat_pose")
seat_pose_param = rospy.get_param("/seat_pose")
seat_pose = Pose(
position=Point(**seat_pose_param["position"]),
orientation=Quaternion(**seat_pose_param["orientation"]),
)

seat_area_param = rospy.get_param("/receptionist/seat_area")
seat_area_param = rospy.get_param("/seat_area")
seat_area = Polygon(seat_area_param)

receptionist = Receptionist(
Expand All @@ -41,6 +45,11 @@
},
},
)

sis = smach_ros.IntrospectionServer('smach_server',receptionist,'/SM_ROOT')
sis.start()
outcome = receptionist.execute()

sis.stop()
rospy.loginfo(f"Receptionist finished with outcome: {outcome}")
rospy.spin()
Loading

0 comments on commit 6a38d09

Please sign in to comment.