-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Behaviour to interact with Pepper Robot
- Loading branch information
1 parent
75c6a93
commit bca761f
Showing
16 changed files
with
1,300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Package name="FinalAssignment1" format_version="4"> | ||
<Manifest src="manifest.xml" /> | ||
<BehaviorDescriptions> | ||
<BehaviorDescription name="behavior" src="behavior_1" xar="behavior.xar" /> | ||
</BehaviorDescriptions> | ||
<Dialogs> | ||
<Dialog name="ExampleDialog" src="behavior_1/ExampleDialog/ExampleDialog.dlg" /> | ||
<Dialog name="Start" src="Start/Start.dlg" /> | ||
<Dialog name="move" src="move/move.dlg" /> | ||
<Dialog name="PoseAsking" src="PoseAsking/PoseAsking.dlg" /> | ||
<Dialog name="Startt" src="Startt/Startt.dlg" /> | ||
<Dialog name="Intro" src="Intro/Intro.dlg" /> | ||
</Dialogs> | ||
<Resources /> | ||
<Topics> | ||
<Topic name="ExampleDialog_enu" src="behavior_1/ExampleDialog/ExampleDialog_enu.top" topicName="ExampleDialog" language="en_US" /> | ||
<Topic name="Start_enu" src="Start/Start_enu.top" topicName="Start" language="en_US" /> | ||
<Topic name="move_enu" src="move/move_enu.top" topicName="move" language="en_US" /> | ||
<Topic name="PoseAsking_enu" src="PoseAsking/PoseAsking_enu.top" topicName="PoseAsking" language="en_US" /> | ||
<Topic name="Startt_enu" src="Startt/Startt_enu.top" topicName="Start" language="en_US" /> | ||
<Topic name="Intro_enu" src="Intro/Intro_enu.top" topicName="Intro" language="en_US" /> | ||
</Topics> | ||
<IgnoredPaths /> | ||
<Translations auto-fill="en_US"> | ||
<Translation name="translation_en_US" src="translations/translation_en_US.ts" language="en_US" /> | ||
</Translations> | ||
</Package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
multilanguage:Intro | ||
enu:Intro_enu.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
topic: ~Intro() | ||
language: enu | ||
|
||
# Defining extra concepts out of words or group of words | ||
#concept:(hello) [hello hi hey "good morning" greetings] | ||
|
||
# Catching inputs and triggering outputs | ||
#u:(e:onStart) $onStopped=1 | ||
|
||
# Replying to speech | ||
#u:(~hello) ~hello | ||
u:([hello hi "hi Pepper" "Good Morning" "Morning"]) ["hello awais" "hi awais" hey "good morning awais"] | ||
|
||
u:(["how are you" "Is everything okay"]) ["Great, thanks, good to see you" "Very good, thanks, good to see you" "all good, thanks, good to see you again"] | ||
|
||
# Saying to Leave | ||
u:(["I should leave" "I am tired" "I think I am tired and I should leave"]) ["Yes, It was a busy perhaps full of enjoyment day let me take you to the door" "Let me take you to the door"] | ||
|
||
u:(["okay" ok fine "why not"])["But, before leeaving let me capture this moment with my high resolution camera"] $front=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
multilanguage:PoseAsking | ||
enu:PoseAsking_enu.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
topic: ~PoseAsking() | ||
language: enu | ||
|
||
# Defining extra concepts out of words or group of words | ||
#concept:(hello) [hello hi hey "good morning" greetings] | ||
|
||
# Catching inputs and triggering outputs | ||
#u:(e:onStart) $onStopped=1 | ||
|
||
# Replying to speech | ||
#u:(~hello) ~hello | ||
|
||
u:([wait "pose"]) ["Awais, Which pose do you like?"] | ||
u:([front]) ["Okay, let me take position"] $pose=1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
multilanguage:Start | ||
enu:Start_enu.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
topic: ~Start() | ||
language: enu | ||
|
||
# Defining extra concepts out of words or group of words | ||
#concept:(hello) [hello hi hey "good morning" greetings] | ||
|
||
# Catching inputs and triggering outputs | ||
#u:(e:onStart) $onStopped=1 | ||
|
||
# Replying to speech | ||
#u:(~hello) ~hello | ||
|
||
# Starting Conversation | ||
u:([hello hi "hi Pepper" "Good Morning" "Morning"]) ["hello awais" "hi awais" hey "good morning awais"] | ||
|
||
u:(["how are you" "Is everything okay"]) ["Great, thanks, good to see you" "Very good, thanks, good to see you" "all good, thanks, good to see you again"] | ||
|
||
# Saying to Leave | ||
u:(["I should leave" "I am tired" "I think I am tired and I should leave"]) ["Yes, It was a busy perhaps full of enjoyment day let me take you to the door" "Let me take you to the door"] | ||
|
||
u:(["okay" ok fine "why not"])["But, before leeaving let me capture this moment with my high resolution camera"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
multilanguage:Startt | ||
enu:Startt_enu.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
topic: ~Start() | ||
language: enu | ||
|
||
# Defining extra concepts out of words or group of words | ||
#concept:(hello) [hello hi hey "good morning" greetings] | ||
|
||
# Catching inputs and triggering outputs | ||
#u:(e:onStart) $onStopped=1 | ||
|
||
# Replying to speech | ||
#u:(~hello) ~hello | ||
|
||
# Starting Conversation | ||
u:([hello hi "hi Pepper" "Good Morning" "Morning"]) ["hello awais" "hi awais" hey "good morning awais"] | ||
|
||
u:(["how are you" "Is everything okay"]) ["Great, thanks, good to see you" "Very good, thanks, good to see you" "all good, thanks, good to see you again"] | ||
|
||
# Saying to Leave | ||
u:(["I should leave" "I am tired" "I think I am tired and I should leave"]) ["Yes, It was a busy perhaps full of enjoyment day let me take you to the door" "Let me take you to the door"] | ||
|
||
u:(["okay" ok fine "why not"])["But, before leeaving let me capture this moment with my high resolution camera"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
multilanguage:ExampleDialog | ||
enu:ExampleDialog_enu.top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
topic: ~ExampleDialog() | ||
language: enu | ||
|
||
# Defining needed concepts, keywords or sentences corresponding to a concept. | ||
concept:(yes) [yes "all right" sure "why not" ok certainly "very well" yep yea definitely amen] | ||
concept:(no) [no nope "don't want" "no way" never "not at all"] | ||
concept:(how) ["how are you" howdy "what's up" "how do you feel"] | ||
concept:(happy) [ok fine great happy blessed "all right" glad "not bad"] | ||
concept:(sad) [sad miserable bad unhappy tired] | ||
concept:(repeat) [repeat understand] | ||
concept:(thx) ["thank you" thanks gracias "much obliged" merci] | ||
concept:(hello) [hello hi hey "good morning" greetings] | ||
concept:(bye) [bye goodbye "bye bye" "tata" "see you" adios cheerio "so long" farewell "have a nice day"] | ||
|
||
|
||
# Start/Wait animation, Goto. | ||
# If User expresses a word or a sentence found in the concept "hello", | ||
# the robot starts Hey_1 animation, answers a random value defined in concept "hello" | ||
# and waits for the end of the animation before going to the label how. Label is expressed this way: %howAreYou | ||
u:(~hello) ^start(animations/Stand/Gestures/Hey_1) ~hello ^wait(animations/Stand/Gestures/Hey_1) ^gotoReactivate(howAreYou) | ||
|
||
|
||
# Tag animation. | ||
# If User asks how the robot feels, it starts a random animation being tagged "myself", | ||
# answers and go to the label %howAreYou | ||
u:(~how) ^startTag(myself) I'm fine, thank you. And you, ^gotoReactivate(howAreYou) | ||
|
||
|
||
# %Label. | ||
# The robot asks how the user feels. 3 kind of answers are expected | ||
# Expressed by concept, user can be happy, sad or ask the robot to repeat the question. | ||
proposal: %howAreYou ^startTag(show) how are you today? | ||
u1:(~happy) I'm glad you are fine! ^gotoReactivate(favoriteColor) | ||
u1:(~sad) Oh, I feel sorry for you. ^nextProposal | ||
u1:(~repeat) I'll repeat for you. ^sameProposal | ||
|
||
# Output slot stimulation. | ||
# If User is sad (known from previous question), the robot proposes to play a game. | ||
# If User accepts, it will stimulate the "playAGame" punctual diagram output. | ||
proposal: If you feel like talking about it, don't hesitate. ^nextProposal | ||
proposal: %playAGame Do you want to play a game? | ||
u1:(~yes) Let's play $playAGame=1 | ||
u1:(~no) Ok, anytime. | ||
|
||
|
||
# Variables. | ||
# the robot asks User for his prefered color between blue and red. | ||
# this illustrate variables stored in $1 using '_' character. | ||
proposal: %favoriteColor And what is your favorite color between Blue and Red ? | ||
u1:(violet) Violet is my prefered color too ! ^gotoReactivate(playAGame) | ||
u1:(_[blue red]) $1 is a very nice color and my prefered is violet. ^gotoReactivate(playAGame) | ||
u1:(_[green yellow pink orange purple white black]) $1 is a nice color. ^sameProposal | ||
|
||
|
||
# On any proposal if user asks to repeat, say again the same proposal. | ||
u:(~repeat) I'll repeat for you. ^sameProposal | ||
|
||
# Being polite, the robot always answers accordingly to thankfull sentences. | ||
u:(~thx) You're welcome | ||
|
||
|
||
# Exiting. | ||
# Answering to Goodbye and exiting the dialog box, stimulating the onStopped output slot. | ||
u:(~bye) ~bye $onStopped=1 | ||
|
||
|
||
# Responding to events. | ||
# Here, if the left foot bumper is pressed, the robot starts an animation, | ||
# say a text and waits for the end of the animation. | ||
u:(e:LeftBumperPressed) ^start(animations/Stand/Gestures/YouKnowWhat_1) My left foot bumped into something! ^wait(animations/Stand/Gestures/YouKnowWhat_1) |
Oops, something went wrong.