forked from RoboCup-SSL/ssl-game-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssl_game_event_2019.proto
457 lines (437 loc) · 17.9 KB
/
ssl_game_event_2019.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
syntax = "proto2";
import "ssl_game_controller_common.proto";
// GameEvent contains exactly one game event
// Each game event has optional and required fields. The required fields are mandatory to process the event.
// Some optional fields are only used for visualization, others are required to determine the ball placement position.
// If fields are missing that are required for the ball placement position, no ball placement command will be issued.
// Fields are marked optional to make testing and extending of the protocol easier.
// An autoRef should ideally set all fields, except if there are good reasons to not do so.
message GameEvent {
required GameEventType type = 40;
// the origin of this game event
// empty, if it originates from game controller
// autoRef name(s), if it originates from one or more autoRefs
repeated string origin = 41;
// the event that occurred
oneof event {
// Match proceeding events
Prepared prepared = 1;
NoProgressInGame no_progress_in_game = 2;
PlacementFailed placement_failed = 3;
PlacementSucceeded placement_succeeded = 5;
BotSubstitution bot_substitution = 37;
TooManyRobots too_many_robots = 38;
// Ball out of field events
BallLeftField ball_left_field_touch_line = 6;
BallLeftField ball_left_field_goal_line = 7;
Goal possible_goal = 39;
Goal goal = 8;
IndirectGoal indirect_goal = 9;
ChippedGoal chipped_goal = 10;
// Minor offense events
AimlessKick aimless_kick = 11;
KickTimeout kick_timeout = 12;
KeeperHeldBall keeper_held_ball = 13;
AttackerDoubleTouchedBall attacker_double_touched_ball = 14;
AttackerTouchedBallInDefenseArea attacker_touched_ball_in_defense_area = 15;
AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area = 16;
AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area_skipped = 42;
BotDribbledBallTooFar bot_dribbled_ball_too_far = 17;
BotKickedBallTooFast bot_kicked_ball_too_fast = 18;
// Foul events
AttackerTooCloseToDefenseArea attacker_too_close_to_defense_area = 19;
BotInterferedPlacement bot_interfered_placement = 20;
BotCrashDrawn bot_crash_drawn = 21;
BotCrashUnique bot_crash_unique = 22;
BotCrashUnique bot_crash_unique_skipped = 23;
BotPushedBot bot_pushed_bot = 24;
BotPushedBot bot_pushed_bot_skipped = 25;
BotHeldBallDeliberately bot_held_ball_deliberately = 26;
BotTippedOver bot_tipped_over = 27;
BotTooFastInStop bot_too_fast_in_stop = 28;
DefenderTooCloseToKickPoint defender_too_close_to_kick_point = 29;
DefenderInDefenseAreaPartially defender_in_defense_area_partially = 30;
DefenderInDefenseArea defender_in_defense_area = 31;
// Repeated events
MultipleCards multiple_cards = 32;
MultiplePlacementFailures multiple_placement_failures = 33;
MultipleFouls multiple_fouls = 34;
// Unsporting behavior events
UnsportingBehaviorMinor unsporting_behavior_minor = 35;
UnsportingBehaviorMajor unsporting_behavior_major = 36;
}
// the ball left the field normally
message BallLeftField {
// the team that last touched the ball
required Team by_team = 1;
// the bot that last touched the ball
optional uint32 by_bot = 2;
// the location where the ball left the field
optional Location location = 3;
}
// the ball left the field via goal line and a team committed an aimless kick
message AimlessKick {
// the team that last touched the ball
required Team by_team = 1;
// the bot that last touched the ball
optional uint32 by_bot = 2;
// the location where the ball left the field
optional Location location = 3;
// the location where the ball was last touched
optional Location kick_location = 4;
}
// a team shot a goal
message Goal {
// the team that scored the goal
required Team by_team = 1;
// the team that shot the goal (different from by_team for own goals)
optional Team kicking_team = 6;
// the bot that shot the goal
optional uint32 kicking_bot = 2;
// the location where the ball entered the goal
optional Location location = 3;
// the location where the ball was kicked
optional Location kick_location = 4;
}
// the ball entered the goal directly during an indirect free kick
message IndirectGoal {
// the team that tried to shoot the goal
required Team by_team = 1;
// the bot that kicked the ball - at least the team must be set
optional uint32 by_bot = 2;
// the location where the ball entered the goal
optional Location location = 3;
// the location where the ball was kicked
optional Location kick_location = 4;
}
// the ball entered the goal, but was initially chipped
message ChippedGoal {
// the team that tried to shoot the goal
required Team by_team = 1;
// the bot that kicked the ball
optional uint32 by_bot = 2;
// the location where the ball entered the goal
optional Location location = 3;
// the location where the ball was kicked
optional Location kick_location = 4;
// the maximum height [m] of the ball, before it entered the goal and since the last kick
optional float max_ball_height = 5;
}
// a bot moved too fast while the game was stopped
message BotTooFastInStop {
// the team that found guilty
required Team by_team = 1;
// the bot that was too fast
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the bot speed [m/s]
optional float speed = 4;
}
// a bot of the defending team got too close to the kick point during a free kick
message DefenderTooCloseToKickPoint {
// the team that found guilty
required Team by_team = 1;
// the bot that violates the distance to the kick point
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the distance [m] from bot to the kick point (including the minimum radius)
optional float distance = 4;
}
// two robots crashed into each other with similar speeds
message BotCrashDrawn {
// the bot of the yellow team
optional uint32 bot_yellow = 1;
// the bot of the blue team
optional uint32 bot_blue = 2;
// the location of the crash (center between both bots)
optional Location location = 3;
// the calculated crash speed [m/s] of the two bots
optional float crash_speed = 4;
// the difference [m/s] of the velocity of the two bots
optional float speed_diff = 5;
// the angle [rad] in the range [0, π] of the bot velocity vectors
// an angle of 0 rad ( 0°) means, the bots barely touched each other
// an angle of π rad (180°) means, the bots crashed frontal into each other
optional float crash_angle = 6;
}
// two robots crashed into each other and one team was found guilty to due significant speed difference
message BotCrashUnique {
// the team that caused the crash
required Team by_team = 1;
// the bot that caused the crash
optional uint32 violator = 2;
// the bot of the opposite team that was involved in the crash
optional uint32 victim = 3;
// the location of the crash (center between both bots)
optional Location location = 4;
// the calculated crash speed vector [m/s] of the two bots
optional float crash_speed = 5;
// the difference [m/s] of the velocity of the two bots
optional float speed_diff = 6;
// the angle [rad] in the range [0, π] of the bot velocity vectors
// an angle of 0 rad ( 0°) means, the bots barely touched each other
// an angle of π rad (180°) means, the bots crashed frontal into each other
optional float crash_angle = 7;
}
// a bot pushed another bot over a significant distance
message BotPushedBot {
// the team that pushed the other team
required Team by_team = 1;
// the bot that pushed the other bot
optional uint32 violator = 2;
// the bot of the opposite team that was pushed
optional uint32 victim = 3;
// the location of the push (center between both bots)
optional Location location = 4;
// the pushed distance [m]
optional float pushed_distance = 5;
}
// a bot tipped over
message BotTippedOver {
// the team that found guilty
required Team by_team = 1;
// the bot that tipped over
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
}
// a defender other than the keeper was fully located inside its own defense and touched the ball
message DefenderInDefenseArea {
// the team that found guilty
required Team by_team = 1;
// the bot that is inside the penalty area
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the distance [m] from bot case to the nearest point outside the defense area
optional float distance = 4;
}
// a defender other than the keeper was partially located inside its own defense area and touched the ball
message DefenderInDefenseAreaPartially {
// the team that found guilty
required Team by_team = 1;
// the bot that is partially inside the penalty area
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the distance [m] that the bot is inside the penalty area
optional float distance = 4;
}
// an attacker touched the ball inside the opponent defense area
message AttackerTouchedBallInDefenseArea {
// the team that found guilty
required Team by_team = 1;
// the bot that is inside the penalty area
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the distance [m] that the bot is inside the penalty area
optional float distance = 4;
}
// a bot kicked the ball too fast
message BotKickedBallTooFast {
// the team that found guilty
required Team by_team = 1;
// the bot that kicked too fast
optional uint32 by_bot = 2;
// the location of the ball at the time of the highest speed
optional Location location = 3;
// the absolute initial ball speed (kick speed) [m/s]
optional float initial_ball_speed = 4;
// was the ball chipped?
optional bool chipped = 5;
}
// a bot dribbled to ball too far
message BotDribbledBallTooFar {
// the team that found guilty
required Team by_team = 1;
// the bot that dribbled too far
optional uint32 by_bot = 2;
// the location where the dribbling started
optional Location start = 3;
// the location where the maximum dribbling distance was reached
optional Location end = 4;
}
// an attacker touched the opponent robot inside defense area
message AttackerTouchedOpponentInDefenseArea {
// the team that found guilty
required Team by_team = 1;
// the bot that touched the opponent robot
optional uint32 by_bot = 2;
// the bot of the opposite team that was touched
optional uint32 victim = 4;
// the location of the contact point between both bots
optional Location location = 3;
}
// an attacker touched the ball multiple times when it was not allowed to
message AttackerDoubleTouchedBall {
// the team that found guilty
required Team by_team = 1;
// the bot that touched the ball twice
optional uint32 by_bot = 2;
// the location of the ball when it was first touched
optional Location location = 3;
}
// an attacker was located too near to the opponent defense area when ball entered play
message AttackerTooCloseToDefenseArea {
// the team that found guilty
required Team by_team = 1;
// the bot that is too close to the defense area
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
// the distance [m] of the bot to the penalty area
optional float distance = 4;
}
// a bot held the ball for too long
message BotHeldBallDeliberately {
// the team that found guilty
required Team by_team = 1;
// the bot that holds the ball
optional uint32 by_bot = 2;
// the location of the ball
optional Location location = 3;
// the duration [s] that the bot hold the ball
optional float duration = 4;
}
// a bot interfered the ball placement of the other team
message BotInterferedPlacement {
// the team that found guilty
required Team by_team = 1;
// the bot that interfered the placement
optional uint32 by_bot = 2;
// the location of the bot
optional Location location = 3;
}
// a team collected multiple cards (yellow and red), which results in a penalty kick
message MultipleCards {
// the team that received multiple yellow cards
required Team by_team = 1;
}
// a team collected multiple fouls, which results in a yellow card
message MultipleFouls {
// the team that collected multiple fouls
required Team by_team = 1;
}
// a team failed to place the ball multiple times in a row
message MultiplePlacementFailures {
// the team that failed multiple times
required Team by_team = 1;
}
// timeout waiting for the attacking team to perform the free kick
message KickTimeout {
// the team that that should have kicked
required Team by_team = 1;
// the location of the ball
optional Location location = 2;
// the time [s] that was waited
optional float time = 3;
}
// game was stuck
message NoProgressInGame {
// the location of the ball
optional Location location = 1;
// the time [s] that was waited
optional float time = 2;
}
// ball placement failed
message PlacementFailed {
// the team that failed
required Team by_team = 1;
// the remaining distance [m] from ball to placement position
optional float remaining_distance = 2;
}
// a team was found guilty for minor unsporting behavior
message UnsportingBehaviorMinor {
// the team that found guilty
required Team by_team = 1;
// an explanation of the situation and decision
required string reason = 2;
}
// a team was found guilty for major unsporting behavior
message UnsportingBehaviorMajor {
// the team that found guilty
required Team by_team = 1;
// an explanation of the situation and decision
required string reason = 2;
}
// a keeper held the ball in its defense area for too long
message KeeperHeldBall {
// the team that found guilty
required Team by_team = 1;
// the location of the ball
optional Location location = 2;
// the duration [s] that the keeper hold the ball
optional float duration = 3;
}
// a team successfully placed the ball
message PlacementSucceeded {
// the team that did the placement
required Team by_team = 1;
// the time [s] taken for placing the ball
optional float time_taken = 2;
// the distance [m] between placement location and actual ball position
optional float precision = 3;
// the distance [m] between the initial ball location and the placement position
optional float distance = 4;
}
// both teams are prepared - all conditions are met to continue (with kickoff or penalty kick)
message Prepared {
// the time [s] taken for preparing
optional float time_taken = 1;
}
// bots are being substituted by at least one team
message BotSubstitution {
// the team that substitutes robots
required Team by_team = 1;
}
// a team has too many robots on the field
message TooManyRobots {
// the team that has too many robots
required Team by_team = 1;
}
}
enum GameEventType {
UNKNOWN_GAME_EVENT_TYPE = 0;
PREPARED = 1;
NO_PROGRESS_IN_GAME = 2;
PLACEMENT_FAILED = 3;
PLACEMENT_SUCCEEDED = 5;
BOT_SUBSTITUTION = 37;
TOO_MANY_ROBOTS = 38;
BALL_LEFT_FIELD_TOUCH_LINE = 6;
BALL_LEFT_FIELD_GOAL_LINE = 7;
POSSIBLE_GOAL = 39;
GOAL = 8;
INDIRECT_GOAL = 9;
CHIPPED_GOAL = 10;
AIMLESS_KICK = 11;
KICK_TIMEOUT = 12;
KEEPER_HELD_BALL = 13;
ATTACKER_DOUBLE_TOUCHED_BALL = 14;
ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA = 15;
ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA = 16;
ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA_SKIPPED = 40;
BOT_DRIBBLED_BALL_TOO_FAR = 17;
BOT_KICKED_BALL_TOO_FAST = 18;
ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA = 19;
BOT_INTERFERED_PLACEMENT = 20;
BOT_CRASH_DRAWN = 21;
BOT_CRASH_UNIQUE = 22;
BOT_CRASH_UNIQUE_SKIPPED = 23;
BOT_PUSHED_BOT = 24;
BOT_PUSHED_BOT_SKIPPED = 25;
BOT_HELD_BALL_DELIBERATELY = 26;
BOT_TIPPED_OVER = 27;
BOT_TOO_FAST_IN_STOP = 28;
DEFENDER_TOO_CLOSE_TO_KICK_POINT = 29;
DEFENDER_IN_DEFENSE_AREA_PARTIALLY = 30;
DEFENDER_IN_DEFENSE_AREA = 31;
MULTIPLE_CARDS = 32;
MULTIPLE_PLACEMENT_FAILURES = 33;
MULTIPLE_FOULS = 34;
UNSPORTING_BEHAVIOR_MINOR = 35;
UNSPORTING_BEHAVIOR_MAJOR = 36;
}