1 from robocup_knowledge
import knowledge_loader
2 common = knowledge_loader.load_knowledge(
"common")
4 not_understood_sentences = [
5 "I'm so sorry! Can you please speak louder and slower? And wait for the ping!",
6 "I am deeply sorry. Please try again, but wait for the ping!",
7 "You and I have communication issues. Speak up!",
8 "All this noise is messing with my audio. Try again"
19 T[{actions : <A1>}] -> C[A1]
20 T[{actions : <A1, A2>}] -> C[A1] and C[A2]
21 T[{actions : <A1, A2, A3>}] -> C[A1] C[A2] and C[A3]
33 V_GUIDE -> guide | escort | take | lead | accompany
35 DET -> the | a | an | some
36 MANIPULATION_AREA_DESCRIPTIONS -> on top of | at | in | on
39 for room
in common.location_rooms:
40 grammar +=
'\nROOMS[%s] -> %s' % (room, room)
42 grammar +=
'\nLOCATIONS[%s] -> %s' % (loc, loc)
43 grammar +=
'\n ROOMS_AND_LOCATIONS[X] -> ROOMS[X] | LOCATIONS[X]'
44 for obj
in common.object_names:
45 grammar +=
'\nOBJECT_NAMES[%s] -> %s' % (obj, obj)
47 grammar +=
'\nMANIPULATION_AREA_LOCATIONS[%s] -> MANIPULATION_AREA_DESCRIPTIONS the %s' % (loc, loc)
48 for cat
in common.object_categories:
49 grammar +=
'\nOBJECT_CATEGORIES[%s] -> %s' % (cat, cat)
58 Q['answer': "Magdeburg"] -> what city are we in
59 Q['answer': "Tech United"] -> what is the name of your team
60 Q['answer': "Chewbacca"] -> name the big hairy creature in star wars
61 Q['answer': "Isaac Asimov"] -> who wrote the three laws of robotics
62 Q['answer': "The Jetsons"] -> from what series do you know rosie the robot
63 Q['answer': "The Flintstones"] -> from what series do you know the baby bam bam
64 Q['answer': "Neo"] -> who is the main character of the matrix
65 Q['answer': "Peper and HSR"] -> name the two robocupathome standart platforms
66 Q['answer': "In my SSD"] -> where do you store your memories
67 Q['answer': "In Eindhoven The Netherlands"] -> where is your team located
69 WHATWHICH -> what | which
71 Q['answer': "basket"] -> WHATWHICH is the biggest object
72 Q['answer': "egg"] -> WHATWHICH is the smallest object
73 Q['answer': "pringles"] -> WHATWHICH is the biggest food
74 Q['answer': "egg"] -> WHATWHICH is the smallest food
75 Q['answer': "basket"] -> WHATWHICH is the biggest container
76 Q['answer': "coffecup"] -> WHATWHICH is the smallest container
77 Q['answer': "water"] -> WHATWHICH is the biggest drink
78 Q['answer': "orange drink"] -> WHATWHICH is the smallest drink
79 Q['answer': "paper"] -> WHATWHICH is the biggest cleaning stuff
80 Q['answer': "sponge"] -> WHATWHICH is the smallest cleaning stuff
81 Q['answer': "knife"] -> WHATWHICH is the biggest cutlery
82 Q['answer': "fork"] -> WHATWHICH is the smallest cutlery
84 Q['answer': "the bedroom has two doors"] -> how many doors has the bedroom
85 Q['answer': "the dining room has two doors"] -> how many doors has the dining room
86 Q['answer': "in the living room there are no doors"] -> how many doors has the living room
87 Q['answer': "in the kitchen there are no doors"] -> how many doors has the kitchen
97 CP[{"action" : "count", "entity" : P}] -> COUNT PEOPLE[P] are in the crowd | tell me COUNT PEOPLE[P] in the crowd
107 COUNT -> how many | the number of
108 SEARCH -> where is | in WHATWHICH room is
110 Q[{"action" : "a_find", "entity" : AP}] -> SEARCH the PLACEMENT[AP]
111 Q[{"action" : "a_find", "entity" : AB}] -> SEARCH the BEACON[AB]
112 Q[{"action" : "a_count", "entity" : Y, "location" : R}] -> how many PLACEMENT[Y] are in the ROOM[R]
113 Q[{"action" : "a_count", "entity" : Z, "location" : R}] -> how many BEACON[Z] are in the ROOM[R]
123 Q[{"action" : "o_find", "entity" : O}] -> where can i find a OBJECT[O]
124 Q[{"action" : "c_find", "entity" : C}] -> where can i find a CATEGORY[C]
125 Q[{"action" : "return_category", "entity" : O}] -> to WHATWHICH category belong the OBJECT[O]
136 PEOPLE['people'] -> people
137 PEOPLE['children'] -> children
138 PEOPLE['adults'] -> adults
139 PEOPLE['elders'] -> elders
140 PEOPLE['males'] -> males
141 PEOPLE['females'] -> females
143 PEOPLE['women'] -> women
144 PEOPLE['boys'] -> boys
145 PEOPLE['girls'] -> girls
147 PLACEMENT['bookshelf'] -> bookshelf | bookshelfs
148 PLACEMENT['couch_table'] -> couch table | couch tables
149 PLACEMENT['side_table'] -> side table | side_table
150 PLACEMENT['kitchencounter'] -> kitchen counter | kitchen counters | kitchencounter | kitchencounters
151 PLACEMENT['stove'] -> stove | stoves
152 PLACEMENT['desk'] -> desk |desks
153 PLACEMENT['bar'] -> bar | bars
154 PLACEMENT['closet'] -> closet | closets
155 PLACEMENT['dinner_table'] -> dinner table | dinner tables
156 PLACEMENT['cabinet'] -> cabinet | cabinets
158 BEACON['tv_stand'] -> tv stand | tv stands
159 BEACON['bed'] -> bed | beds
160 BEACON['sofa'] -> sofa | sofas
161 BEACON['cupboard'] -> cupboard | cupboards
162 BEACON['sink'] -> sink | sinks
163 BEACON['counter'] -> counter | counters
165 ROOM['dining'] -> dining room
166 ROOM['living'] -> living room
167 ROOM['kitchen'] -> kitchen
168 ROOM['bedroom'] -> bedroom
170 OBJECT['apple'] -> apple
171 OBJECT['bread'] -> bread
172 OBJECT['cereals'] -> cereals
173 OBJECT['cornflakes'] -> cornflakes
174 OBJECT['crackers'] -> crackers
175 OBJECT['lemon'] -> lemon
176 OBJECT['noodles'] -> noodles
177 OBJECT['paprika'] -> paprika
178 OBJECT['peas'] -> peas
179 OBJECT['pepper'] -> pepper
180 OBJECT['potato'] -> potato
181 OBJECT['potato_soup'] -> potato soup
182 OBJECT['salt'] -> salt
183 OBJECT['tomato_pasta'] -> tomato pasta
185 OBJECT['basket'] -> basket
186 OBJECT['coffecup'] -> coffecup
187 OBJECT['plate'] -> plate
188 OBJECT['red_bowl'] -> red bowl
189 OBJECT['white_bowl'] -> white bowl
190 OBJECT['banana_milk'] -> banana milk
191 OBJECT['cappucino'] -> cappucino
192 OBJECT['coke'] -> coke
193 OBJECT['orange_drink'] -> orange drink
194 OBJECT['water'] -> water
195 OBJECT['chocolate_cookies'] -> chocolate cookies
197 OBJECT['party_cracker'] -> party cracker
198 OBJECT['pringles'] -> pringles
199 OBJECT['cloth'] -> cloth
200 OBJECT['paper'] -> paper
201 OBJECT['sponge'] -> sponge
202 OBJECT['towel'] -> towel
203 OBJECT['fork'] -> fork
204 OBJECT['spoon'] -> spoon
205 OBJECT['knife'] -> knife
207 CATEGORY['food'] -> food | foods
208 CATEGORY['container'] -> container | containers
209 CATEGORY['drink'] -> drink | drinks
210 CATEGORY['cleaning_stuff'] -> cleaning stuff | cleaning stuffs
211 CATEGORY['cutlery'] -> cutlery | cutleries
216 # People Positions/Gestures/Genders
218 PP[{"action" : "c_count", "entity" : X}] -> how many people in the crowd are POSITION[X]
219 PG[{"action" : "c_count", "entity" : W}] -> how many people in the crowd are GESTURE[W]
220 PPG[{"action" : "random_gender", "entity" : X}] -> the POSITION[X] person was GENDER | tell me if the POSITION[X] person was a GENDER
221 PPGG[{"action" : "random_gender", "entity" : X}] -> the POSITION[X] person was GENDER or GENDER | tell me if the POSITION[X] person was a GENDER or GENDER
222 PGG[{"action" : "random_gender", "entity" : W}] -> tell me if the GESTURE[W] person was a GENDER
223 PGGG[{"action" : "random_gender", "entity" : W}] -> tell me if the GESTURE[W] person was a GENDER or GENDER
224 PC[{"action" : "c_count", "entity" : L}] -> tell me how many people were wearing COLOR[L]
226 # - - - - - - - - - - - - - - - - - - - - - - - - -
228 # - - - - - - - - - - - - - - - - - - - - - - - - -
230 CCOUNT[{"action" : "o_count", "entity" : C}] -> how many CATEGORY[C] there are
232 OCOLOR[{"action" : "find_color", "entity" : O}] -> whats the colour of the OBJECT[O]
233 OCAT[{"action" : "compare_category", "entity_a" : O, "entity_b" : A}] -> do the OBJECT[O] and OBJECT[A] belong to the same category
235 CATPLACE[{"action" : "o_count", "entity" : C, "location" : PL}] -> how many CATEGORY[C] are in the PLACEMENT[PL]
236 OBJPLACE[{"action" : "o_count", "entity" : O, "location" : PL}] -> how many OBJECT[O] are in the PLACEMENT[PL]
237 CATLOC[{"action" : "category_at_loc", "location" : PL}] -> what objects are stored in the PLACEMENT[PL]
239 OBJCOMP[{"action" : "compare", "entity_a" : O, "entity_b" : A}] -> between the OBJECT[O] and OBJECT[A] WHATWHICH one is ADJR
241 ADJA -> smallest | biggest
242 ADJR -> smaller | bigger
244 # - - - - - - - - - - - - - - - - - - - - - - - - -
246 # - - - - - - - - - - - - - - - - - - - - - - - - -
248 POSITION['standing'] -> standing
249 POSITION['sitting'] -> sitting
250 POSITION['lying'] -> lying
252 GENDER['male'] -> male
253 GENDER['female'] -> female
255 GENDER['woman'] -> woman
257 GENDER['girl'] -> girl
259 GESTURE['waving'] -> waving
260 GESTURE['rise_l_arm'] -> rising left arm
261 GESTURE['rise_r_arm'] -> rising right arm
262 GESTURE['left'] -> pointing left
263 GESTURE['right'] -> pointing right
266 COLOR['blue'] -> blue
267 COLOR['white'] -> white
268 COLOR['black'] -> black
269 COLOR['green'] -> green
270 COLOR['yellow'] -> yellow