Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior Tree #95

Open
wants to merge 326 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
326 commits
Select commit Hold shift + click to select a range
6588c45
trying test
tharu17 Sep 2, 2021
4290fc6
stt py_tree works
CorradoPacelli Sep 2, 2021
9a360aa
bot configuration
tharu17 Sep 3, 2021
59829f3
created sketch of imageaiYOLO and imageaicustom services
tharu17 Sep 3, 2021
f9fa91e
working on imageai module
CorradoPacelli Sep 3, 2021
678f9e4
working on imageai
tharu17 Sep 3, 2021
69f2e0b
working on imageai
CorradoPacelli Sep 4, 2021
5aebf50
created imageai_custom_service_pytree and imageai_yolo_service_pytree
tharu17 Sep 5, 2021
9833cc3
pytree.test working
micolspitale93 Sep 6, 2021
75d3f5c
fixing yolo_service
CorradoPacelli Sep 6, 2021
1a166c8
fixing yolo
CorradoPacelli Sep 6, 2021
e98b5c4
working on tree nodes
CorradoPacelli Sep 10, 2021
f760860
python modules for our activity
tharu17 Sep 11, 2021
59571ab
modified visual_bg skeleton
tharu17 Sep 11, 2021
23354cc
modified interaction_bg skeleton
tharu17 Sep 11, 2021
b8915df
finished skeleton of main_activity
tharu17 Sep 12, 2021
32bfdd1
adding useful modules for our activity
tharu17 Sep 12, 2021
fe6939d
fixing tree
CorradoPacelli Sep 12, 2021
11cfc42
implementing our activity
tharu17 Sep 13, 2021
f2127c0
added some behaviours for pytree
CorradoPacelli Sep 14, 2021
581bd7c
eor fixed
tharu17 Sep 14, 2021
687fdb0
fixing trees
CorradoPacelli Sep 14, 2021
5b36782
fixing pytree
CorradoPacelli Sep 14, 2021
2af2061
yolo works now
CorradoPacelli Sep 14, 2021
448fed7
fixing yolo_service.py
CorradoPacelli Sep 14, 2021
2d09d53
fixing tree
CorradoPacelli Sep 14, 2021
c698227
fixing
tharu17 Sep 14, 2021
ff3d573
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
tharu17 Sep 14, 2021
ff66dae
adding json in pytree leaves
CorradoPacelli Sep 15, 2021
02d8e1d
fixing tree
CorradoPacelli Sep 15, 2021
ce23ad6
fixing custom_yolo_service.py
CorradoPacelli Sep 15, 2021
f2d7e7e
fixing scripts
CorradoPacelli Sep 16, 2021
873cda9
fixing yolo_service by adding .launch file
CorradoPacelli Sep 17, 2021
fe8dcdd
getting ready for merge in pytree
CorradoPacelli Sep 17, 2021
c5bdbf9
merging form imageai
CorradoPacelli Sep 17, 2021
64b5d7e
fixing merge
CorradoPacelli Sep 17, 2021
2f079c8
adding launch files for pytree
CorradoPacelli Sep 17, 2021
fa12852
adding launch files
CorradoPacelli Sep 17, 2021
713482f
debugging
tharu17 Sep 17, 2021
6bb86ff
debugging
CorradoPacelli Sep 17, 2021
f10ae58
fixing interactionbg
tharu17 Sep 18, 2021
d12d86d
test
CorradoPacelli Sep 18, 2021
9fb6f64
test
CorradoPacelli Sep 18, 2021
13daee0
test
tharu17 Sep 18, 2021
da42227
test
CorradoPacelli Sep 18, 2021
361962f
test
CorradoPacelli Sep 18, 2021
560dc0e
debugging on interactionbg
tharu17 Sep 18, 2021
ad098a8
fixing visual
CorradoPacelli Sep 18, 2021
0a6d5f1
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 18, 2021
fbb93d3
debugging main
tharu17 Sep 18, 2021
968fd0b
dubing visual_bg
CorradoPacelli Sep 18, 2021
3cc26e8
bug
tharu17 Sep 18, 2021
7806ed1
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 18, 2021
21b9145
debuging leaves
CorradoPacelli Sep 18, 2021
875abbc
debugging main
tharu17 Sep 18, 2021
815c7db
debugging
CorradoPacelli Sep 18, 2021
c6faa55
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 18, 2021
1486acb
debugging
tharu17 Sep 20, 2021
d8f40d0
debugging
CorradoPacelli Sep 20, 2021
3adfe87
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 20, 2021
a6ca1c4
debugging
CorradoPacelli Sep 20, 2021
af32575
subtree visualbg starts now
tharu17 Sep 20, 2021
3a6c28b
fixing pytree leaves
tharu17 Sep 20, 2021
a61bfd2
fixing pytree leaves
tharu17 Sep 20, 2021
05b6be4
fixing
tharu17 Sep 20, 2021
83c09fb
modified tts_service leaf
tharu17 Sep 21, 2021
c59a85f
adding leaves for aws_lex_service
CorradoPacelli Sep 21, 2021
a58b1fc
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 21, 2021
243c966
created a new leaf for external speaker and adjusted other leaves
tharu17 Sep 21, 2021
b9be159
fixing leaves pytree
CorradoPacelli Sep 21, 2021
a88192c
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 21, 2021
212cca2
fixing face service pytree
CorradoPacelli Sep 21, 2021
2495ada
fixing
CorradoPacelli Sep 21, 2021
b1095ea
trying visualbg
tharu17 Sep 21, 2021
3ed9f38
fixing stuff
CorradoPacelli Sep 21, 2021
64429e4
fixing
CorradoPacelli Sep 21, 2021
a62469f
fixing some bugs in interaction_bg
tharu17 Sep 22, 2021
eb66d4e
change from stop to off
tharu17 Sep 22, 2021
669c1b1
feedback
tharu17 Sep 22, 2021
594feeb
creating launcher in pytree
CorradoPacelli Sep 22, 2021
609a838
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 22, 2021
32520ad
stt works again
CorradoPacelli Sep 22, 2021
360e790
debugging visual_bg
CorradoPacelli Sep 22, 2021
2b3e963
debugging on interactionbg
tharu17 Sep 22, 2021
3da3198
fixing again
CorradoPacelli Sep 22, 2021
5b566b2
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 22, 2021
4ae0ce0
fixing
CorradoPacelli Sep 22, 2021
cf14a55
fixing all modules with GoalStatus
CorradoPacelli Sep 22, 2021
34a6bd7
fixing stuff
CorradoPacelli Sep 22, 2021
1eb8f87
fixing interactionbg
tharu17 Sep 22, 2021
4e248c2
fixing trees
CorradoPacelli Sep 23, 2021
e0e1c69
visual_bg goes
CorradoPacelli Sep 23, 2021
44ed4c0
vixing interacion
CorradoPacelli Sep 23, 2021
484e67f
interaction works
CorradoPacelli Sep 24, 2021
298b205
fixing mainactivity
CorradoPacelli Sep 24, 2021
1cfcb5d
fixing stuff in mainactivity
CorradoPacelli Sep 24, 2021
4db6d5c
fixing mainactivity
tharu17 Sep 26, 2021
877557c
fixing lex
tharu17 Sep 26, 2021
9fff795
fixing stuff
CorradoPacelli Sep 27, 2021
046f4cc
stt works with timer
CorradoPacelli Sep 27, 2021
e81b4fc
modifying scene_manager visual
tharu17 Sep 27, 2021
5ff0261
fixing scene manager interaction
tharu17 Sep 28, 2021
88f113d
fixing stt
CorradoPacelli Sep 28, 2021
d40db11
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Sep 28, 2021
d02b3ad
fixed scene manager visual
tharu17 Sep 28, 2021
1a2e488
fixing subtree
CorradoPacelli Sep 28, 2021
57bfe8c
fixing interaction
CorradoPacelli Sep 28, 2021
d5b4b74
debbugging but something starts to work
CorradoPacelli Sep 28, 2021
a5736ee
fixing microphone by adding in on modules
CorradoPacelli Sep 29, 2021
dc2babf
fixing stuff
CorradoPacelli Sep 29, 2021
c0bd760
fixing stuff
CorradoPacelli Sep 29, 2021
5344d66
fixing yolo
CorradoPacelli Sep 30, 2021
cfc68bc
yolo custom works
CorradoPacelli Sep 30, 2021
c91bbc3
adding the story to the main
tharu17 Sep 30, 2021
1df9fc9
fixing scena_manager_interaction
tharu17 Sep 30, 2021
4ed23ad
adding buttons
CorradoPacelli Oct 1, 2021
a49c2c8
fixing stuff
CorradoPacelli Oct 1, 2021
16a1761
fixing stuff
CorradoPacelli Oct 3, 2021
1d593e9
fixing stuff
CorradoPacelli Oct 3, 2021
cf67dc8
fixing stuff
CorradoPacelli Oct 4, 2021
4aade42
fixing
CorradoPacelli Oct 4, 2021
6a9eb2f
adding web
CorradoPacelli Oct 5, 2021
93ebdbb
fixing error of stt caused by cancelling the goal (and fixing stuff)
CorradoPacelli Oct 5, 2021
0910b47
this commit solve the problem stated in the previous commit
CorradoPacelli Oct 5, 2021
12e3b95
fixing stuff
CorradoPacelli Oct 5, 2021
9b59f3e
fixing projector (web)
CorradoPacelli Oct 6, 2021
26ff162
(server) x action preempted fixed!
CorradoPacelli Oct 6, 2021
18d1969
final fixing services
CorradoPacelli Oct 6, 2021
c870960
final fixing
CorradoPacelli Oct 6, 2021
b30185f
adding test and bash script
apaikan Oct 7, 2021
4835ac2
remove audio play to work with qt
apaikan Oct 7, 2021
7078a4c
changing requirement.txt
CorradoPacelli Oct 7, 2021
9a21e7a
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Oct 7, 2021
ac8a442
porting on qt
apaikan Oct 7, 2021
9d00ef7
adding some phonema to tts ita
CorradoPacelli Oct 8, 2021
68b7f25
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Oct 8, 2021
cc18744
adding topic of qt's camera in yolo
CorradoPacelli Oct 8, 2021
7bb5eb5
complete story
tharu17 Oct 8, 2021
1daf782
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
tharu17 Oct 8, 2021
9c05621
adding test
apaikan Oct 8, 2021
2d7d932
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
apaikan Oct 8, 2021
f7bc59d
fixing camera
CorradoPacelli Oct 8, 2021
6ac1ca1
fixing stuff
CorradoPacelli Oct 8, 2021
8f31ba2
adding the true story
apaikan Oct 8, 2021
04c39c2
fixing css
CorradoPacelli Oct 8, 2021
3a242d2
fixing web and json
tharu17 Oct 10, 2021
652667d
fixing trees
CorradoPacelli Oct 10, 2021
2f50260
fixing stuff
CorradoPacelli Oct 10, 2021
7ad510a
trying to fix img size
tharu17 Oct 11, 2021
ebc743d
adding buttons
apaikan Oct 11, 2021
503719c
adding buttons
CorradoPacelli Oct 11, 2021
fdcec7e
adding costant
CorradoPacelli Oct 12, 2021
821a1cc
fixing stuff
apaikan Oct 12, 2021
633af5f
fixing buttons
CorradoPacelli Oct 12, 2021
5065584
fixing buttons
CorradoPacelli Oct 12, 2021
8c1eadf
buttons
CorradoPacelli Oct 12, 2021
1733125
adding launch buttons
CorradoPacelli Oct 12, 2021
9652ea3
buttons
CorradoPacelli Oct 12, 2021
0277307
fixing
CorradoPacelli Oct 12, 2021
c4e842c
bottons works
apaikan Oct 12, 2021
9f62259
speaker fixed with duration
apaikan Oct 12, 2021
1631cc2
readding preemtion in serves
CorradoPacelli Oct 12, 2021
d74d813
fixing server
CorradoPacelli Oct 12, 2021
92334fb
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Oct 12, 2021
2a4c408
adding successOnOne policy
CorradoPacelli Oct 12, 2021
d780b13
removing stop_tracking
CorradoPacelli Oct 12, 2021
da43aaf
fixing preemption
CorradoPacelli Oct 12, 2021
56aeeb9
fixing preemption
CorradoPacelli Oct 12, 2021
e660b85
fixing preemption
CorradoPacelli Oct 12, 2021
52340a6
fixing preemption
CorradoPacelli Oct 12, 2021
9b6be83
fixing preeemption
CorradoPacelli Oct 12, 2021
892835a
fixing preeemption
CorradoPacelli Oct 12, 2021
5f1538c
try tag tts
CorradoPacelli Oct 13, 2021
9348813
adding demos
CorradoPacelli Oct 13, 2021
d663c49
adding demos
CorradoPacelli Oct 13, 2021
f6553d0
fixing css
CorradoPacelli Oct 13, 2021
977666d
fixing
CorradoPacelli Oct 13, 2021
5a4547f
demo changing
CorradoPacelli Oct 13, 2021
408af59
fixing
CorradoPacelli Oct 13, 2021
1464444
demos
CorradoPacelli Oct 13, 2021
6a0b60e
dispaly
CorradoPacelli Oct 13, 2021
d5386bd
dispaly
CorradoPacelli Oct 13, 2021
3beb6e9
restoring mainactivity without demos
CorradoPacelli Oct 14, 2021
640c7da
fixing
CorradoPacelli Oct 14, 2021
64aa524
fixing
CorradoPacelli Oct 14, 2021
2a0ef00
fixing
CorradoPacelli Oct 14, 2021
35facaa
fixing
CorradoPacelli Oct 14, 2021
0bd6fb5
fixing
CorradoPacelli Oct 14, 2021
6e9c438
fixing
CorradoPacelli Oct 14, 2021
de28a61
fixing
CorradoPacelli Oct 14, 2021
8ded3f4
modified images and created short activity
tharu17 Oct 15, 2021
499f29b
fixing
CorradoPacelli Oct 15, 2021
10d7945
fixing
CorradoPacelli Oct 15, 2021
086bc32
trying gesture
CorradoPacelli Oct 15, 2021
b8f2ea1
trying gesture
CorradoPacelli Oct 15, 2021
c7e2d78
trying gesture
CorradoPacelli Oct 15, 2021
836e91c
gesture
CorradoPacelli Oct 15, 2021
907afaa
gesture
CorradoPacelli Oct 15, 2021
7d3b70e
gesture
CorradoPacelli Oct 15, 2021
975c5b3
gesture
apaikan Oct 15, 2021
c046a0e
adding solution eitherOr
CorradoPacelli Oct 15, 2021
ffdfbad
adding solution eitherOr
CorradoPacelli Oct 15, 2021
f099238
adding solution eitherOr
CorradoPacelli Oct 15, 2021
403ce4a
adding solution eitherOr
CorradoPacelli Oct 15, 2021
98831ac
adding solution eitherOr
CorradoPacelli Oct 15, 2021
5d204d5
adding solution eitherOr
CorradoPacelli Oct 15, 2021
c56b98c
adding solution eitherOr
CorradoPacelli Oct 15, 2021
bb96e31
adding solution eitherOr
CorradoPacelli Oct 15, 2021
1eb5495
fixing
CorradoPacelli Oct 15, 2021
9aa12e2
fixing stop
CorradoPacelli Oct 15, 2021
f9bb634
fixing stop
CorradoPacelli Oct 15, 2021
118d6c2
fixing stop
CorradoPacelli Oct 15, 2021
f2f6d1d
fixing stop
CorradoPacelli Oct 15, 2021
a4f8d57
adding gesture
CorradoPacelli Oct 15, 2021
99df415
adding gesture
CorradoPacelli Oct 15, 2021
b7a25f0
adding gesture
CorradoPacelli Oct 15, 2021
6eb3802
adding gesture
CorradoPacelli Oct 15, 2021
1855d39
reset gesture
CorradoPacelli Oct 15, 2021
a2590ef
fixing
CorradoPacelli Oct 16, 2021
0c03f67
fixing
CorradoPacelli Oct 16, 2021
1560d16
fixing
CorradoPacelli Oct 16, 2021
7c9b5a2
fixing
CorradoPacelli Oct 16, 2021
084b134
trying images on qt
CorradoPacelli Oct 16, 2021
f6cd15a
adding local imgs
tharu17 Oct 16, 2021
21a30cf
fixing
CorradoPacelli Oct 16, 2021
a993ff5
fixing
CorradoPacelli Oct 16, 2021
2b9d161
fixing
CorradoPacelli Oct 16, 2021
4006f53
fixing images
CorradoPacelli Oct 16, 2021
9085d64
fixing
CorradoPacelli Oct 16, 2021
2e7d66b
modifying json
tharu17 Oct 16, 2021
eaaf64b
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
tharu17 Oct 16, 2021
069e011
fixing
CorradoPacelli Oct 16, 2021
40936ac
fixing
apaikan Oct 16, 2021
31a1ce0
fixing bgs
CorradoPacelli Oct 17, 2021
5beab02
Merge branch 'feature/pytree' of https://github.com/micolspitale93/HA…
CorradoPacelli Oct 17, 2021
eda3271
fixing
CorradoPacelli Oct 17, 2021
1ab110b
fixing
CorradoPacelli Oct 17, 2021
a1b7c6d
fixing raise
CorradoPacelli Oct 17, 2021
39d0b1e
fixing umbrella
CorradoPacelli Oct 17, 2021
7b5d355
fixing stt
CorradoPacelli Oct 17, 2021
96f57fc
changing short activity
CorradoPacelli Oct 18, 2021
e0e2271
demos
CorradoPacelli Oct 18, 2021
61e94bc
fixing
CorradoPacelli Oct 18, 2021
4784ea9
verbale
CorradoPacelli Oct 18, 2021
d6326dd
fixing shot
CorradoPacelli Oct 19, 2021
162641f
adding readme for pytree and imageai
CorradoPacelli Oct 26, 2021
720ff5f
adding readme for pytree and imageai
CorradoPacelli Oct 26, 2021
af091fb
update and check pytree
CorradoPacelli Oct 26, 2021
8485584
adding readme for pytree and imageai
CorradoPacelli Oct 26, 2021
70a9228
removing italian comments
CorradoPacelli Nov 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,5 @@ harmoni_actuators/harmoni_tts/content/*
doc/_build
harmoni_actuators/harmoni_tts/scale_stats.npy
harmoni_actuators/harmoni_tts/temp_data/tts.wav
harmoni_detectors/harmoni_imageai/src/*.h5
harmoni_detectors/harmoni_imageai/src/*.json
2 changes: 1 addition & 1 deletion dockerfiles/harmoni/noetic/face_detect/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN \
facenet-pytorch \
Pillow

CMD ["/bin/bash"]
CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions dockerfiles/harmoni/noetic/full/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ RUN mkdir -p $ROS_WS/src
WORKDIR $ROS_WS

#caching protection for Harmoni, per https://stackoverflow.com/a/39278224/5715374
ADD https://api.github.com/repos/interaction-lab/HARMONI/git/refs/heads/develop /root/version.json
#ADD https://api.github.com/repos/micolspitale93/git/refs/heads/develop /root/version.json
RUN git -C src clone \
-b develop \
https://github.com/interaction-lab/HARMONI.git
https://github.com/micolspitale93/HARMONI.git

# ==================================================================
# Build Harmoni from source
Expand Down
3 changes: 2 additions & 1 deletion harmoni_actuators/harmoni_face/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=["harmoni_face"], package_dir={"": "src"},
packages=["harmoni_face"],
package_dir={"": "src"},
)

setup(**setup_args)
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def setup_ros(self):
queue_size=1,
)
rospy.loginfo("Checking that face is connected to ROS websocket")
print(self.name + "/is_connected")
rospy.wait_for_service(self.name + "/is_connected")
rospy.loginfo("Done, face is connected to ROS websocket")
self.connected=True
Expand Down
14 changes: 10 additions & 4 deletions harmoni_actuators/harmoni_face/src/harmoni_face/face_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,10 @@ def _get_viseme_data(self, data):
rospy.loginfo("The validated visemes are %s" % viseme_set)
return viseme_bool, viseme_set



def main():
"""Set names, collect params, and give service to server"""
service_name = ActuatorNameSpace.face.name
instance_id = rospy.get_param("/instance_id")
instance_id = rospy.get_param("/instance_id") #default
service_id_mouth = f"{service_name}_mouth_{instance_id}"
service_id_eyes = f"{service_name}_eyes_{instance_id}"
service_id_nose = f"{service_name}_nose_{instance_id}"
Expand All @@ -296,13 +294,21 @@ def main():
service_server_eyes = HarmoniServiceServer(service_id_eyes, s_eyes)
service_server_mouth = HarmoniServiceServer(service_id_mouth, s_mouth)
service_server_nose = HarmoniServiceServer(service_id_nose, s_nose)

print(service_name)
print("****************************************************************************")
print(service_id_eyes)
print(service_id_mouth)
print(service_id_nose)

service_server_eyes.start_sending_feedback()
service_server_mouth.start_sending_feedback()
service_server_nose.start_sending_feedback()

rospy.spin()
except rospy.ROSInterruptException:
pass


if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion harmoni_actuators/harmoni_face/test/face.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<include ns="bridge_face" file="$(find rosbridge_server)/launch/rosbridge_websocket.launch">
<arg name="port" value="9000"/>
</include>
<node pkg="harmoni_face" type="face_service.py" name="harmoni_face_default" output="screen"/>eyes
<node pkg="harmoni_face" type="face_service.py" name="harmoni_face_default" output="screen"/>
<param name="test_face_input" value="[{'start':10, 'type': 'gaze', 'id':'target', 'point': [1,5 ,10]},{'start': 1, 'type': 'au', 'id': 'au13', 'pose': 1}, {'start': 2, 'type': 'action', 'id': 'breath_face'}, {'start': 5, 'type': 'action', 'id': 'saucy_face'}, {'start': 8, 'type': 'viseme', 'id': 'POSTALVEOLAR'}]"/>
<test test-name="test_face" pkg="harmoni_face" type="rostest_face.py" />
</launch>
2 changes: 1 addition & 1 deletion harmoni_actuators/harmoni_face/test/rostest_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ def main():


if __name__ == "__main__":
main()
main()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- This is an example launch file for how a ROS application could use a node --> <launch>
<arg name="use_gesture" default="true"/>
<arg name="use_simulator" default="true"/>
<arg name="use_simulator" default="false"/>
<arg name="use_simulator_with_robot" default="false"/>
<arg name="instance_id" default="qt"/>
<arg name="robot_joints" default="qt_robot/joints/state_rad"/>
Expand Down
2 changes: 1 addition & 1 deletion harmoni_actuators/harmoni_gesture/nodes/gesture_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self, name, param):
)
self.state = State.INIT
self.setup_gesture()

return

def _gesture_done_callback(self, data):
Expand Down Expand Up @@ -219,7 +220,6 @@ def _get_gesture_data(self, data):
self.gesture_pub.publish(str(data))
return True


def main():
service_name = ActuatorNameSpace.gesture.name
instance_id = rospy.get_param("/instance_id")
Expand Down
2 changes: 1 addition & 1 deletion harmoni_actuators/harmoni_gesture/test/gesture.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
<param name="test_gesture_input" value="{'gesture':'QT/bye', 'timing': 0.5}"/>
<test test-name="test_gesture" pkg="harmoni_gesture" type="rostest_gesture.py" />
</launch>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@
<param name="instance_id" value="$(arg instance_id)"/>
<node pkg="harmoni_speaker" type="speaker_service.py" name="harmoni_speaker_$(arg instance_id)" output="screen"/>

<include file="$(find audio_play)/launch/play.launch">
<arg name="do_timestamp" value = "false"/>
<arg name="format" value = "wave"/>
<arg name="sample_rate" value="22050"/>
</include>
</launch>
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import wave
import os

AUDIO_DELAY = 0.5 # this constant is used to make shorter the duration in which the service is sleeping.

class SpeakerService(HarmoniServiceManager):
"""Takes sound and publishes it to the default audio topic for the audio_play package
Expand Down Expand Up @@ -57,7 +58,7 @@ def do(self, data):
if type(data) == str:
if ".wav" in data:
data = self.file_path_to_audio_data(data)
duration = data["duration"]
duration = data["duration"] - AUDIO_DELAY
else:
data = ast.literal_eval(data)
data = data["audio_data"]
Expand Down Expand Up @@ -106,7 +107,6 @@ def file_path_to_audio_data(self, path):
os.remove(file_handle)
return {"audio_data": data, "duration": duration}


def main():
"""Set names, collect params, and give service to server"""

Expand All @@ -123,6 +123,10 @@ def main():

service_server = HarmoniServiceServer(service_id, s)

print(service_name)
print("****************************************************************************")
print(service_id)

service_server.start_sending_feedback()
rospy.spin()
except rospy.ROSInterruptException:
Expand Down
Empty file modified harmoni_actuators/harmoni_speaker/test/speaker.test
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions harmoni_actuators/harmoni_speaker/test/speaker_qt.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<launch>
<param name="instance_id" value="default"/>
<!-- <param name="name_speaker" value="speaker"/> -->
<node pkg="harmoni_speaker" type="speaker_service.py" name="harmoni_speaker_default" output="screen"/>

<param name="test_speaker_input" value="$(find harmoni_tts)/temp_data/tts.wav"/>
<test test-name="test_speaker" pkg="harmoni_speaker" type="rostest_speaker.py" />
</launch>
Empty file modified harmoni_actuators/harmoni_speaker/test/unittest_speaker.py
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/CMakeLists.txt
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/README.md
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions harmoni_actuators/harmoni_tts/config/configuration.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
tts:
default_param:
region_name: "us-west-2"
language: "en-US"
language: "it-IT"
outdir: "$(find harmoni_tts)/temp_data"
wav_header_length: 24
voice: "Ivy"
voice: "Bianca"
Empty file modified harmoni_actuators/harmoni_tts/launch/tts_polly_service.launch
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/launch/tts_service.launch
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/package.xml
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/setup.py
100644 → 100755
Empty file.
Empty file modified harmoni_actuators/harmoni_tts/src/harmoni_tts/__init__.py
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def _setup_aws_tts(self):
"S": "POSTALVEOLAR",
"r": "POSTALVEOLAR",
"k": "VELAR_GLOTTAL",
"J": "PALATAL_NASAL",
"L": "PALATAL_LATERAL_APPROXIMANT",
"i": "CLOSE_FRONT_VOWEL",
"u": "CLOSE_BACK_VOWEL",
"@": "MID_CENTRAL_VOWEL",
Expand Down Expand Up @@ -298,7 +300,6 @@ def request(self, input_text):
self.result_msg = ""
return {"response": self.state, "message": self.result_msg}


def main():
"""[summary]
Main function for starting HarmoniPolly service
Expand All @@ -315,11 +316,15 @@ def main():

service_server = HarmoniServiceServer(service_id, s)

print(service_name)
print("****************************************************************************")
print(service_id)

service_server.start_sending_feedback()
rospy.spin()
except rospy.ROSInterruptException:
pass


if __name__ == "__main__":
main()
main()
Binary file modified harmoni_actuators/harmoni_tts/temp_data/tts.wav
100644 → 100755
Binary file not shown.
3 changes: 1 addition & 2 deletions harmoni_actuators/harmoni_web/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['harmoni_web'],
package_dir={'': 'src'},
packages=['harmoni_web'], package_dir={'': 'src'},
)

setup(**setup_args)
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def _event_click_callback(self, event):
self.result_msg = event.data
return


def main():
"""Set names, collect params, and give service to server"""
service_name = ActuatorNameSpace.web.name
Expand All @@ -206,11 +205,16 @@ def main():
# params = rospy.get_param(service_name + "/" + instance_id + "_param/")
s = WebService(service_id)
service_server = HarmoniServiceServer(service_id, s)

print(service_name)
print("**********************************************************************************************")
print(service_id)

service_server.start_sending_feedback()
rospy.spin()
except rospy.ROSInterruptException:
pass


if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion harmoni_actuators/harmoni_web/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link href="https://fonts.googleapis.com/css?family=B612&display=swap" rel="stylesheet">
<link rel="stylesheet" href="libs/css/bootstrap.min.css">
<link rel="stylesheet" href="libs/css/wickedpicker.min.css">
<link rel="stylesheet" href="src/css/style.css">
<link rel="stylesheet" href="src/css/activity_style.css">

<title>Harmoni Web</title>
</head>
Expand Down
21 changes: 19 additions & 2 deletions harmoni_actuators/harmoni_web/web/src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,24 @@
}
]
}
]
}
]
},
{
"component": "container",
"id": "raccolta_container",
"children": [
{
"component": "row",
"id": "row_only",
"children": [
{
"component": "img",
"children": "",
"id": "img_only"
}
]
}
]
}
]
}
56 changes: 56 additions & 0 deletions harmoni_actuators/harmoni_web/web/src/css/activity_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
html,
body {
height: 100%;
margin: 0;
overflow: hidden;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
text-align: center;
font-size: 2vmin;
background-color: white;
}

.container{
height: 100%;
width: 100%;
text-align: center;
display: flex;
}

button{
margin: auto;
text-align: center;
}

div{
margin: auto;
text-align: center;

}

img{

background-position: center;
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 100%;
}


img:hover {
opacity: 0.5;
}

.row, .col{
margin: auto;
text-align: center;
width: 100%;
height: 100%;
display: contents;
}

.title{
margin: auto;
font-size: 3vmin;
text-align: center;
}
4 changes: 3 additions & 1 deletion harmoni_actuators/harmoni_web/web/src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
text-align: center;
font-size: 2vmin;
background-color: green;
background-color: white;
}

.container{
Expand All @@ -33,8 +33,10 @@ div{
img{
margin: auto;
text-align: center;
background-size: cover;
vertical-align: auto;
width: 100%;
height: 100%;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ def set_aborted(self, result=None, text=""):
def publish_feedback(self, state):
self._feedback.state = state
rospy.logdebug("(Server) The feedback is " + str(self._feedback.state))

self.current_goal.publish_feedback(self._feedback)

def get_default_result(self):
Expand All @@ -191,6 +190,7 @@ def set_preempted(self, result=None, text=""):
result = self.get_default_result()
with self.action_server.lock, self.lock:
rospy.logdebug("Setting the current goal as canceled")
rospy.logdebug(self.name)
self.current_goal.set_canceled(result, text)

# @brief Allows users to register a callback to be invoked when a new goal is available
Expand Down
Loading