-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: develop
Are you sure you want to change the base?
Behavior Tree #95
Conversation
Great work so far! Everything you have done so far will be useful for future work. We appreciate the work that you have done getting a working example for integrating HARMONI with py_trees. However, for where the project is right now we have some additional requirements and recommendations for how we would like to see the integration happen:
In the future we will be looking at the possibility of a standalone python based HARMONI, but for now we want the py_trees to utilize the communication system we have already set up. The current revision of work should be saved as a separate branch so that we can use it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a lot of improvements have been made. I still need to test on my PC and review some of the newer non-leaf classes, but overall looks pretty good. One comment on commit history: use descriptive commits and/or squash commits together! I am not too picky on git history, but when I see multiple commits with the exact same comment, it does make it notably harder to understand what actually occurred.
@@ -255,6 +255,7 @@ def _get_viseme_data(self, data): | |||
else: | |||
behavior_data = data | |||
viseme_set = [] | |||
#FIXME decommenta le righe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#FIXME decommenta le righe |
@@ -57,7 +57,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"]-0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave out magic numbers if not obvious. One option: make a constant, e.g. AUDIO_DELAY or something (the reason for or meaning of "0.5" should be clear).
#FIXME | ||
#vorrei scrivere | ||
#self.result_msg = tts_response["audio_data"] | ||
#ma scrivo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed? Also, English please :) this is not the only instance.
INTERACTION = "Background_noInterazione" | ||
VISUAL = "Background_visivo" | ||
CARTA = "Carta" | ||
RACCOLTA = "ConfirmRaccolta" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgive my lack of Italian, but could we get translations in comments at least? Ideally everything would be in English, but I can understand not reworking lower importance things. Much appreciated whatever you decide.
@@ -86,7 +86,9 @@ def _preempt_callback(self): | |||
"""Used to signal a cancel/pause to the currently running service so | |||
that a new goal can be received. | |||
""" | |||
self.service_manager.pause() | |||
self.service_manager.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was working with pause, so not clear on why the change was made here. Stop might mean a service will require a more in-depth startup procedure to begin again
@@ -0,0 +1,175 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeated code is a warning sign/design smell. All the leaves in this pull request tend to have a similar structure which means a small architecture change (e.g. something with HarmoniServiceSever) would require identical modifications to all leaves. To reduce total amount of code, I would strongly recommend creating an abstract base class for all leaves.
Rostests already implements for the following pytree leafs:
rostest harmoni_face face_pytree.test
rostest harmoni_bot lex_pytree.test
rostest harmoni_tts polly_pytree.test
rostest harmoni_speaker speaker_pytree.test
rostest harmoni_web web_pytree.test
The remaining leaf's tests (harmoni_microphone, harmoni_camera, and harmoni_stt) are still work in progress.
If you want to test a already created Tree, you can run the following:
rostest harmoni_pattern pytree.test
It will execute a try composed by a sequence of:
Still not handling the different HARMONI API in the testing (WORK IN PROGRESS)