|
129 | 129 |
|
130 | 130 | ;; Show random expressions only if NOT talking |
131 | 131 | (SequentialOr |
132 | | - ;(Not (DefinedPredicate "chatbot is listening")) |
| 132 | + ;(Not (DefinedPredicate "chatbot is listening?")) |
133 | 133 | (SequentialAnd |
134 | 134 |
|
135 | 135 | (SequentialOrLink |
|
170 | 170 | ;; If interaction is requested, then interact with that specific person. |
171 | 171 | ;; Make sure we look at that person ... |
172 | 172 | (DefineLink |
173 | | - (DefinedPredicate "Interaction requested") |
| 173 | + (DefinedPredicate "Interaction requested action") |
174 | 174 | (SequentialAnd |
175 | | - (DefinedPredicate "Someone requests interaction?") |
176 | 175 | (True (DefinedPredicate "If sleeping then wake")) |
177 | 176 | (True (DefinedPredicate "If bored then alert")) |
178 | 177 | (DefinedPredicate "interact with requested person") |
|
198 | 197 |
|
199 | 198 | ;; Respond to a new face becoming visible. |
200 | 199 | ; |
201 | | -;; XXX TODO -- need to also do line 590, if interacting for a while |
| 200 | +;; XXX TODO -- if interacting for a while |
202 | 201 | ;; this alters probability of glance... |
203 | 202 | (DefineLink |
204 | 203 | (DefinedPredicate "Respond to new arrival") |
|
235 | 234 | (DefineLink |
236 | 235 | (DefinedPredicate "New arrival sequence") |
237 | 236 | (SequentialAnd |
238 | | - (DefinedPredicate "Did someone arrive?") |
239 | 237 | (True (DefinedPredicate "If sleeping then wake")) |
240 | 238 | (True (DefinedPredicate "If bored then alert")) |
241 | 239 | (DefinedPredicate "Respond to new arrival") |
|
244 | 242 |
|
245 | 243 | ;; Check to see if someone left. |
246 | 244 | (DefineLink |
247 | | - (DefinedPredicate "Someone left") |
| 245 | + (DefinedPredicate "Someone left action") |
248 | 246 | (SequentialAnd |
249 | | - (DefinedPredicate "Did someone leave?") |
250 | 247 | (Put (DefinedPredicate "Publish behavior") |
251 | 248 | (Concept "Someone left")) |
252 | 249 | (Evaluation (GroundedPredicate "scm: print-msg") |
|
287 | 284 | (DefineLink |
288 | 285 | (DefinedPredicate "Interact with people") |
289 | 286 | (SequentialAnd |
290 | | - ; True, if there is anyone visible. |
291 | | - (DefinedPredicate "Someone visible") |
292 | | - |
293 | 287 | ; Say something, if no one else has said anything in a while. |
294 | 288 | ; i.e. if are being ignored, then say something. |
295 | 289 | ; (SequentialOr |
|
559 | 553 | ; Things to do, if TTS vocalization just started. |
560 | 554 | (DefineLink |
561 | 555 | ; owyl "chatbot_speech_start()" method |
562 | | - (DefinedPredicate "Speech started?") |
| 556 | + (DefinedPredicate "Speech started") |
563 | 557 | (SequentialAnd |
564 | | - ; If the TTS vocalization started (chatbot started talking) ... |
565 | | - (DefinedPredicate "chatbot started talking") |
566 | | - ; ... then switch to face-study saccade ... |
| 558 | + ; Switch to face-study saccade ... |
567 | 559 | (Evaluation (GroundedPredicate "py:conversational_saccade") |
568 | 560 | (ListLink)) |
569 | 561 | ; ... and show one random gesture from "conversing" set. |
|
580 | 572 | (ListLink (Node "--- Start talking"))) |
581 | 573 | )) |
582 | 574 |
|
583 | | -; Currently used for scripted behaviors while STT doesnt publish accurate events. |
| 575 | +; Currently used for scripted behaviors while STT doesn't publish |
| 576 | +; accurate events. |
584 | 577 | (DefineLink |
585 | | - (DefinedPredicate "Listening started?") |
| 578 | + (DefinedPredicate "Listening started") |
586 | 579 | (SequentialAnd |
587 | | - (DefinedPredicate "chatbot started listening") |
588 | | - ; ... then switch to face-study saccade ... |
| 580 | + ; Switch to face-study saccade ... |
589 | 581 | (Evaluation (GroundedPredicate "py:listening_saccade") |
590 | 582 | (ListLink)) |
591 | 583 | ; ... and show one random gesture from "conversing" set. |
|
604 | 596 |
|
605 | 597 | ;; Things to do, if the chatbot is currently talking. |
606 | 598 | (DefineLink |
607 | | - (DefinedPredicate "Speech ongoing?") |
| 599 | + (DefinedPredicate "Speech ongoing") |
608 | 600 | (SequentialAnd |
609 | | - ; If the chatbot currently talking ... |
610 | | - (DefinedPredicate "chatbot is talking") |
611 | | - ; ... then handle the various affect states. |
| 601 | + ; Handle the various affect states. |
612 | 602 | (SequentialOr |
613 | 603 | (SequentialAnd |
614 | 604 | ; If chatbot is happy ... |
|
664 | 654 |
|
665 | 655 | ; Things to do, if the chattbot stopped talking. |
666 | 656 | (DefineLink |
667 | | - (DefinedPredicate "Speech ended?") |
| 657 | + (DefinedPredicate "Speech ended") |
668 | 658 | (SequentialAnd |
669 | | - ; If the chatbot stopped talking ... |
670 | | - (DefinedPredicate "chatbot stopped talking") |
671 | | - |
672 | | - ; ... then switch back to exploration saccade ... |
| 659 | + ; Switch back to exploration saccade ... |
673 | 660 | (Evaluation (GroundedPredicate "py:explore_saccade") |
674 | 661 | (ListLink)) |
675 | 662 |
|
|
689 | 676 |
|
690 | 677 | ; Things to do, if stopped listening. |
691 | 678 | (DefineLink |
692 | | - (DefinedPredicate "Listening ended?") |
| 679 | + (DefinedPredicate "Listening ended") |
693 | 680 | (SequentialAnd |
694 | | - ; If the chatbot stopped talking ... |
695 | | - (DefinedPredicate "chatbot stopped listening") |
696 | | - |
697 | | - ; ... then switch back to exploration saccade ... |
| 681 | + ; Switch back to exploration saccade ... |
698 | 682 | (Evaluation (GroundedPredicate "py:explore_saccade") |
699 | 683 | (ListLink)) |
700 | 684 |
|
|
714 | 698 |
|
715 | 699 | ; Things to do, if the chatbot is listening. |
716 | 700 | (DefineLink |
717 | | - (DefinedPredicate "Listening?") |
| 701 | + (DefinedPredicate "Listening ongoing") |
718 | 702 | (SequentialAnd |
719 | | - ; If the chatbot stopped talking ... |
720 | | - (DefinedPredicate "chatbot is listening") |
721 | | - ; ... show one of the neutral-speech expressions |
| 703 | + ; Show one of the neutral-speech expressions |
722 | 704 | (SequentialOr |
723 | 705 | (Not (DefinedPredicate "Time to change expression")) |
724 | 706 | (Put (DefinedPredicateNode "Show random expression") |
|
765 | 747 | (SatisfactionLink |
766 | 748 | (SequentialAnd |
767 | 749 | (SequentialOr |
768 | | - (DefinedPredicate "Skip Interaction?") |
769 | | - (DefinedPredicate "Interaction requested") |
770 | | - (DefinedPredicate "New arrival sequence") |
771 | | - (DefinedPredicate "Someone left") |
772 | | - (DefinedPredicate "Interact with people") |
| 750 | + (DefinedPredicate "Skip Interaction?") |
| 751 | + |
| 752 | + (SequentialAnd |
| 753 | + (DefinedPredicate "Someone requests interaction?") |
| 754 | + (DefinedPredicate "Interaction requested action")) |
| 755 | + |
| 756 | + (SequentialAnd |
| 757 | + (DefinedPredicate "Did someone arrive?") |
| 758 | + (DefinedPredicate "New arrival sequence")) |
| 759 | + |
| 760 | + (SequentialAnd |
| 761 | + (DefinedPredicate "Did someone leave?") |
| 762 | + (DefinedPredicate "Someone left action")) |
| 763 | + |
| 764 | + ; True, if there is anyone visible. |
| 765 | + (SequentialAnd |
| 766 | + (DefinedPredicate "Someone visible?") |
| 767 | + (DefinedPredicate "Interact with people")) |
| 768 | + |
773 | 769 | (DefinedPredicate "Nothing is happening") |
774 | 770 | (True)) |
775 | 771 |
|
|
778 | 774 | ;; but the chatbot is still smiling and yabbering. |
779 | 775 | ;; If interaction is turned-off need keep alive gestures |
780 | 776 | (SequentialOr |
781 | | - (DefinedPredicate "Speech started?") |
782 | | - (DefinedPredicate "Speech ongoing?") |
783 | | - (DefinedPredicate "Speech ended?") |
784 | | - (DefinedPredicate "Listening started?") |
785 | | - (DefinedPredicate "Listening?") |
786 | | - (DefinedPredicate "Listening ended?") |
| 777 | + ; If the TTS vocalization started (chatbot started talking) ... |
| 778 | + (SequentialAnd |
| 779 | + (DefinedPredicate "chatbot started talking?") |
| 780 | + (DefinedPredicate "Speech started")) |
| 781 | + |
| 782 | + ; If the chatbot currently talking ... |
| 783 | + (SequentialAnd |
| 784 | + (DefinedPredicate "chatbot is talking?") |
| 785 | + (DefinedPredicate "Speech ongoing")) |
| 786 | + |
| 787 | + ; If the chatbot stopped talking ... |
| 788 | + (SequentialAnd |
| 789 | + (DefinedPredicate "chatbot stopped talking?") |
| 790 | + (DefinedPredicate "Speech ended")) |
| 791 | + |
| 792 | + (SequentialAnd |
| 793 | + (DefinedPredicate "chatbot started listening?") |
| 794 | + (DefinedPredicate "Listening started")) |
| 795 | + |
| 796 | + ; If the chatbot stopped talking ... |
| 797 | + (SequentialAnd |
| 798 | + (DefinedPredicate "chatbot is listening?") |
| 799 | + (DefinedPredicate "Listening ongoing")) |
| 800 | + |
| 801 | + ; If the chatbot stopped talking ... |
| 802 | + (SequentialAnd |
| 803 | + (DefinedPredicate "chatbot stopped listening?") |
| 804 | + (DefinedPredicate "Listening ended")) |
| 805 | + |
787 | 806 | (SequentialAnd |
788 | 807 | (DefinedPredicate "Skip Interaction?") |
789 | | - (DefinedPredicate "Keep alive") |
790 | | - ) |
| 808 | + (DefinedPredicate "Keep alive")) |
| 809 | + |
791 | 810 | (True) |
792 | 811 | ) |
793 | 812 |
|
|
0 commit comments