Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cleanup.
Browse files Browse the repository at this point in the history
jws-1 committed Apr 18, 2024
1 parent 4d41cb3 commit df97d21
Showing 41 changed files with 61 additions and 1,346 deletions.
8 changes: 4 additions & 4 deletions tasks/receptionist/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -161,10 +161,10 @@ include_directories(

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# catkin_install_python(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
catkin_install_python(PROGRAMS
scripts/main.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
88 changes: 0 additions & 88 deletions tasks/receptionist/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions tasks/receptionist/config/receptionist_demo.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions tasks/receptionist/launch/demo.launch

This file was deleted.

71 changes: 10 additions & 61 deletions tasks/receptionist/launch/setup.launch
Original file line number Diff line number Diff line change
@@ -1,71 +1,20 @@
<launch>
<!-- DEFAULTS -->
<!-- export LIBGL_ALWAYS_SOFTWARE=1-->
<arg name="is_sim" default="false" />
<arg name="plot_show" default="false" />
<arg name="plot_save" default="true" />
<arg name="debug_with_images" default="true" />
<arg name="publish_markers" default="true" />
<arg name="debug" default="3" />
<arg name="rasa" default="true" />

<param name="plot_show" value="$(arg plot_show)" />
<param name="plot_save" value="$(arg plot_save)" />
<param name="debug" value="$(arg debug)" />
<param name="rasa" value="$(arg rasa)" />
<param name="debug_with_images" value="$(arg debug_with_images)" />
<param name="publish_markers" value="$(arg publish_markers)" />
<!-- PARAMS -->
<arg name="config" default="lab"/>

<!-- INTERACTION -->
<arg name="whisper_device_param" default="10" />
<node pkg="lasr_speech_recognition_whisper" type="transcribe_microphone_server" name="transcribe_speech" output="screen" args="--mic_device $(arg whisper_device_param)"/>

<!-- INTERACTION -->
<!-- <node pkg="interaction_module" name="interaction_module_srv" type="interaction_module_srv.py"/> -->

<arg name="whisper_matcher" default="by-index" />
<!-- <arg name="whisper_device_param" default="9" />-->
<arg name="whisper_device_param" default="13" />

<arg name="rasa_model" default="$(find lasr_rasa)/assistants/receptionist/models"/>

<!-- <include file = "$(find lasr_speech)/launch/speech.launch">
<arg name="matcher" value="$(arg whisper_matcher)"/>
<arg name="device_param" value="$(arg whisper_device_param)"/>
<arg name="rasa_model" value="$(arg rasa_model)"/>
</include> -->

<node
pkg="lasr_speech_recognition_whisper"
type="transcribe_microphone_server"
name="transcribe_speech"
output="screen"
args="--mic_device 13"
/>


<!-- STATIC POINTS -->

<group if="$(arg is_sim)">
<rosparam command="load" file="$(find lift)/config/final_lift_sim.yaml" />
</group>
<group unless="$(arg is_sim)">
<rosparam command="load" file="$(find receptionist)/config/receptionist_demo.yaml" />
<!-- <rosparam command="load" file="$(find lift)/config/final_mk.yaml" />-->
</group>
<!-- STATIC POINTS -->
<rosparam command="load" file="$(find receptionist)/config/$(arg config).yaml" />

<!-- MOTIONS -->
<rosparam command="load" file="$(find lasr_skills)/config/motions.yaml"/>
<rosparam command="load" file="$(find receptionist)/config/motions.yaml"/>


<!-- PCL and clear -->
<!-- <node pkg="read_pcl_info" type="pcl_helpers.py" name="pcl_helpers" output="screen"/> -->
<!-- <node pkg="read_pcl_info" name="clear_continuosly" type="clear_continuosly.py"/>-->
<!-- <node pkg="lasr_shapely" name="shapely" type="service"/> -->


<!-- PERCEPTION -->
<node pkg="lasr_vision_yolov8" type="service" name="yolo_service" output="screen"/>
<node pkg="lasr_vision_torch" type="service" name="torch_service" output="screen"/>
<node pkg="lasr_vision_bodypix" type="service" name="bodypix_service" output="screen"/>


<node pkg="lasr_vision_deepface" type="service" name="deepface_service" output="screen"/>
<include file="$(find lasr_vision_yolov8)/launch/service.launch" />

</launch>
5 changes: 0 additions & 5 deletions tasks/receptionist/launch/test.launch

This file was deleted.

46 changes: 46 additions & 0 deletions tasks/receptionist/scripts/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
import rospy
from receptionist.sm import Receptionist

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 = Pose(
position=Point(**wait_pose_param["position"]),
orientation=Quaternion(**wait_pose_param["orientation"]),
)

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

seat_pose_param = rospy.get_param("/receptionist/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 = Polygon(seat_area_param)

receptionist = Receptionist(
wait_pose,
wait_area,
seat_pose,
seat_area,
{
"name": "John",
"drink": "beer",
"attributes": {
"hair_colour": "strawberry blonde",
"glasses": False,
"hat": True,
"height": "tall",
},
},
)
outcome = receptionist.execute()
rospy.loginfo(f"Receptionist finished with outcome: {outcome}")
rospy.spin()
1 change: 0 additions & 1 deletion tasks/receptionist/src/receptionist/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .default import Default
62 changes: 0 additions & 62 deletions tasks/receptionist/src/receptionist/default.py

This file was deleted.

35 changes: 0 additions & 35 deletions tasks/receptionist/src/receptionist/defaults.py

This file was deleted.

25 changes: 0 additions & 25 deletions tasks/receptionist/src/receptionist/head_direction_test.py

This file was deleted.

12 changes: 0 additions & 12 deletions tasks/receptionist/src/receptionist/main.py

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions tasks/receptionist/src/receptionist/phases/phase1/phase1.py

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions tasks/receptionist/src/receptionist/phases/phase1/states/start.py

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions tasks/receptionist/src/receptionist/phases/phase2/phase2.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

82 changes: 0 additions & 82 deletions tasks/receptionist/src/receptionist/sm.py

This file was deleted.

18 changes: 0 additions & 18 deletions tasks/receptionist/src/receptionist/sm_new.py

This file was deleted.

49 changes: 0 additions & 49 deletions tasks/receptionist/src/receptionist/speech_helper.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import smach
import rospy

from geometry_msgs.msg import Pose, Point, Quaternion
from geometry_msgs.msg import Pose
from shapely.geometry import Polygon
from lasr_skills import GoToLocation, WaitForPersonInArea, Say, AskAndListen
from receptionist.states import (
@@ -284,43 +284,3 @@ def __init__(
"preempted": "failed",
},
)


if __name__ == "__main__":
rospy.init_node("receptionist")

wait_pose_param = rospy.get_param("/receptionist/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 = Polygon(wait_area_param)

seat_pose_param = rospy.get_param("/receptionist/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 = Polygon(seat_area_param)

sm = Receptionist(
wait_pose,
wait_area,
seat_pose,
seat_area,
{
"name": "John",
"drink": "beer",
"attributes": {
"hair_colour": "strawberry blonde",
"glasses": False,
"hat": True,
"height": "tall",
},
},
)
outcome = sm.execute()
10 changes: 0 additions & 10 deletions tasks/receptionist/src/receptionist/states/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
from .ask_for_name import AskForName
from .ask_for_drink import AskForDrink

# from .end import End
# from .go_to_person import GoToPerson
# from .go_to_seating_area import GoToSeatingArea
# from .go_to_wait_for_person import GoToWaitForPerson
from .look_for_seats import LookForSeats
from .start import Start
from .speakdescriptions import SpeakDescriptions
from .get_name_and_drink import ParseNameAndDrink
from .get_attributes import GetGuestAttributes
from .introduce import Introduce
35 changes: 0 additions & 35 deletions tasks/receptionist/src/receptionist/states/ask_for_drink.py

This file was deleted.

37 changes: 0 additions & 37 deletions tasks/receptionist/src/receptionist/states/ask_for_name.py

This file was deleted.

59 changes: 0 additions & 59 deletions tasks/receptionist/src/receptionist/states/detect_faces.py

This file was deleted.

20 changes: 0 additions & 20 deletions tasks/receptionist/src/receptionist/states/end.py

This file was deleted.

49 changes: 0 additions & 49 deletions tasks/receptionist/src/receptionist/states/face_person.py

This file was deleted.

15 changes: 0 additions & 15 deletions tasks/receptionist/src/receptionist/states/go_to_person.py

This file was deleted.

16 changes: 0 additions & 16 deletions tasks/receptionist/src/receptionist/states/go_to_seating_area.py

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions tasks/receptionist/src/receptionist/states/learn_face.py

This file was deleted.

143 changes: 0 additions & 143 deletions tasks/receptionist/src/receptionist/states/look_for_seats.py

This file was deleted.

28 changes: 0 additions & 28 deletions tasks/receptionist/src/receptionist/states/speakdescriptions.py

This file was deleted.

17 changes: 0 additions & 17 deletions tasks/receptionist/src/receptionist/states/start.py

This file was deleted.

0 comments on commit df97d21

Please sign in to comment.