From 5bd7ef6a9d187ae009f5173d140af82a133cf01f Mon Sep 17 00:00:00 2001
From: Tiago 47c <pal@neuromancer>
Date: Wed, 15 Jun 2022 08:11:42 +0000
Subject: [PATCH] demo

---
 psConfig/demos/demoErsti.conf           | 27 ++++++++++++--
 psGrammar/demos/demoErsti/commands.jsgf | 49 +++++++++++++++----------
 psGrammar/demos/demoErsti/object.jsgf   | 15 ++++++++
 3 files changed, 69 insertions(+), 22 deletions(-)
 create mode 100644 psGrammar/demos/demoErsti/object.jsgf

diff --git a/psConfig/demos/demoErsti.conf b/psConfig/demos/demoErsti.conf
index 6a7b4b62..c72793fc 100644
--- a/psConfig/demos/demoErsti.conf
+++ b/psConfig/demos/demoErsti.conf
@@ -13,6 +13,13 @@ rsbscope=/speechrec/psa/confirm;
 bestpath=no;
 autoload=yes;
 
+[pocketsphinxinstance]
+name=stop;
+rsbscope=/speechrec/psa/stop;
+jsgf=../../psGrammar/confirm/stop.jsgf;
+bestpath=no;
+autoload=yes;
+
 [pocketsphinxinstance]
 name=commands;
 rsbscope=/speechrec/psa/commands;
@@ -21,8 +28,22 @@ bestpath=no;
 autoload=yes;
 
 [pocketsphinxinstance]
-name=commands;
-rsbscope=/speechrec/psa/actions;
-jsgf=../../psGrammar/demos/demoErsti/actions.jsgf;
+name=objects;
+rsbscope=/speechrec/psa/objects;
+jsgf=../../psGrammar/demos/demoErsti/objects.jsgf;
+bestpath=no;
+autoload=yes;
+
+[pocketsphinxinstance]
+name=learning;
+rsbscope=/speechrec/psa/learning;
+jsgf=../../psGrammar/demos/learning.jsgf;
+bestpath=no;
+autoload=yes;
+
+[pocketsphinxinstance]
+name=listen;
+rsbscope=/speechrec/psa/listen;
+jsgf=../../psGrammar/demos/listen.jsgf;
 bestpath=no;
 autoload=yes;
diff --git a/psGrammar/demos/demoErsti/commands.jsgf b/psGrammar/demos/demoErsti/commands.jsgf
index 1807ef71..cda48d66 100644
--- a/psGrammar/demos/demoErsti/commands.jsgf
+++ b/psGrammar/demos/demoErsti/commands.jsgf
@@ -1,26 +1,37 @@
 #JSGF V1.0;
 grammar commands;
 
-public <command> = [<robot>] ( <followMe> | <stop> | <ordering> | <learn> | <rec> | <count> | <explain> | <goto> | <hand> | <see> | <save> | <who> | <gripper> | <demo> | <grasp> | <kitchenDrawer> | <cleanup> | <setTable> | <lookAt> );
+public <command> = [<robot>] ( <introduce> | <save> | <wait> | <goTo> | <followMe> | <followHand> | <gravity> | <exit> | <lookAt> | <trash> | <drop> | <nothing> | <search> | <describe> | <difference> | <take> | <give> | <count> | <explain> );
 
-<robot> = (tiago | robot | tobi);
+<robot> = (tobi | robot | tiago);
+
+<introduce> = (introduce yourself) | (who are you);
 
-<followMe> = (follow me);
-<stop> = (stop);
-<ordering> = (start taking orders) | (take my order);
-<learn> = (learn a person);
-<rec> = (recognize me);
-<count> = (count the people);
-<explain> = (what can you do) | (explain your skills);
-<goto> = (go to location);
-<hand> = (wait for waving);
-<see> = (tell me what you see);
 <save> = (save location);
-<who> = (who are you);
-<gripper> = (show me your gripper);
-<demo> = (end the (demonstration | demo));
-<grasp> = ((grasp | give ) [me] ( an | the ) object);
-<kitchenDrawer> = (tell me about the kitchen);
-<cleanup> = (clean up the table);
-<setTable> = (set the table);
+<wait> = (wait for me);
+<goTo> = (go to location);
+
+<followMe> = (follow me);
+<followHand> = (come with me);
+
+<gravity> = (gravity compensation) | (show me your gripper) | (switch to gravity mode);
+
+<exit> = (end the (demonstration | demo))
+
 <lookAt> = (look at camera one | look at the camera);
+
+<trash> = (((take out the trash) | (take out the garbage)));
+<drop> = (((throw it away)));
+<nothing> = (do nothing);
+
+<search> = ( search for [a] [waving] person);
+
+<describe> = (tell me what you see);
+<difference> = (spot the difference);
+
+<take> = (handover);
+<give> = (((give it to me) | (give me the object)));
+
+<count> = (count the people);
+
+<explain> = (what can you do) | (explain your skills);
\ No newline at end of file
diff --git a/psGrammar/demos/demoErsti/object.jsgf b/psGrammar/demos/demoErsti/object.jsgf
new file mode 100644
index 00000000..c98b10ba
--- /dev/null
+++ b/psGrammar/demos/demoErsti/object.jsgf
@@ -0,0 +1,15 @@
+#JSGF V1.0;
+grammar ToBI_object;
+public <statement> = [<verb>] [<article>] <objects> [please];
+
+<objects> = <object>;
+<object> = <grab_object>;
+
+<grab_object> = <cleaning_class> | <food_class> | <other_class> | anything;
+
+<cleaning_class> = cloth | soap | sponge;
+<food_class> = salt | apple | pringles | cereals | cornflakes | peas | (coconut milk); 
+<other_class> = trash | garbage ;
+
+<verb> = (bring me) | bring | carry | retrieve | fetch | get | remember | memorize;
+<article> = the | an | some | a | this;
\ No newline at end of file
-- 
GitLab