Skip to content

Commit 88fa06b

Browse files
committed
Print the caused fouls for multiple foul game event
1 parent 2f186dc commit 88fa06b

File tree

3 files changed

+242
-197
lines changed

3 files changed

+242
-197
lines changed

src/proto/ssl_gc_game_event.proto

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
syntax = "proto2";
22

3-
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
4-
53
import "ssl_gc_common.proto";
64
import "ssl_gc_geometry.proto";
75

@@ -109,7 +107,7 @@ message GameEvent {
109107
required Team by_team = 1;
110108
// the bot that last touched the ball
111109
optional uint32 by_bot = 2;
112-
// the location where the ball left the field
110+
// the location where the ball left the field [m]
113111
optional Vector2 location = 3;
114112
}
115113
// the ball left the field via goal line and a team committed an aimless kick
@@ -118,9 +116,9 @@ message GameEvent {
118116
required Team by_team = 1;
119117
// the bot that last touched the ball
120118
optional uint32 by_bot = 2;
121-
// the location where the ball left the field
119+
// the location where the ball left the field [m]
122120
optional Vector2 location = 3;
123-
// the location where the ball was last touched
121+
// the location where the ball was last touched [m]
124122
optional Vector2 kick_location = 4;
125123
}
126124
// a team shot a goal
@@ -131,11 +129,11 @@ message GameEvent {
131129
optional Team kicking_team = 6;
132130
// the bot that shot the goal
133131
optional uint32 kicking_bot = 2;
134-
// the location where the ball entered the goal
132+
// the location where the ball entered the goal [m]
135133
optional Vector2 location = 3;
136-
// the location where the ball was kicked (for deciding if this was a valid goal)
134+
// the location where the ball was kicked (for deciding if this was a valid goal) [m]
137135
optional Vector2 kick_location = 4;
138-
// the maximum height the ball reached during the goal kick (for deciding if this was a valid goal)
136+
// the maximum height the ball reached during the goal kick (for deciding if this was a valid goal) [m]
139137
optional float max_ball_height = 5;
140138
// number of robots of scoring team when the ball entered the goal (for deciding if this was a valid goal)
141139
optional uint32 num_robots_by_team = 7;
@@ -150,9 +148,9 @@ message GameEvent {
150148
required Team by_team = 1;
151149
// the bot that kicked the ball - at least the team must be set
152150
optional uint32 by_bot = 2;
153-
// the location where the ball entered the goal
151+
// the location where the ball entered the goal [m]
154152
optional Vector2 location = 3;
155-
// the location where the ball was kicked
153+
// the location where the ball was kicked [m]
156154
optional Vector2 kick_location = 4;
157155
}
158156
// the ball entered the goal, but was initially chipped
@@ -161,11 +159,11 @@ message GameEvent {
161159
required Team by_team = 1;
162160
// the bot that kicked the ball
163161
optional uint32 by_bot = 2;
164-
// the location where the ball entered the goal
162+
// the location where the ball entered the goal [m]
165163
optional Vector2 location = 3;
166-
// the location where the ball was kicked
164+
// the location where the ball was kicked [m]
167165
optional Vector2 kick_location = 4;
168-
// the maximum height [m] of the ball, before it entered the goal and since the last kick
166+
// the maximum height [m] of the ball, before it entered the goal and since the last kick [m]
169167
optional float max_ball_height = 5;
170168
}
171169
// a bot moved too fast while the game was stopped
@@ -174,7 +172,7 @@ message GameEvent {
174172
required Team by_team = 1;
175173
// the bot that was too fast
176174
optional uint32 by_bot = 2;
177-
// the location of the bot
175+
// the location of the bot [m]
178176
optional Vector2 location = 3;
179177
// the bot speed [m/s]
180178
optional float speed = 4;
@@ -185,7 +183,7 @@ message GameEvent {
185183
required Team by_team = 1;
186184
// the bot that violates the distance to the kick point
187185
optional uint32 by_bot = 2;
188-
// the location of the bot
186+
// the location of the bot [m]
189187
optional Vector2 location = 3;
190188
// the distance [m] from bot to the kick point (including the minimum radius)
191189
optional float distance = 4;
@@ -196,7 +194,7 @@ message GameEvent {
196194
optional uint32 bot_yellow = 1;
197195
// the bot of the blue team
198196
optional uint32 bot_blue = 2;
199-
// the location of the crash (center between both bots)
197+
// the location of the crash (center between both bots) [m]
200198
optional Vector2 location = 3;
201199
// the calculated crash speed [m/s] of the two bots
202200
optional float crash_speed = 4;
@@ -215,7 +213,7 @@ message GameEvent {
215213
optional uint32 violator = 2;
216214
// the bot of the opposite team that was involved in the crash
217215
optional uint32 victim = 3;
218-
// the location of the crash (center between both bots)
216+
// the location of the crash (center between both bots) [m]
219217
optional Vector2 location = 4;
220218
// the calculated crash speed vector [m/s] of the two bots
221219
optional float crash_speed = 5;
@@ -234,7 +232,7 @@ message GameEvent {
234232
optional uint32 violator = 2;
235233
// the bot of the opposite team that was pushed
236234
optional uint32 victim = 3;
237-
// the location of the push (center between both bots)
235+
// the location of the push (center between both bots) [m]
238236
optional Vector2 location = 4;
239237
// the pushed distance [m]
240238
optional float pushed_distance = 5;
@@ -245,9 +243,9 @@ message GameEvent {
245243
required Team by_team = 1;
246244
// the bot that tipped over
247245
optional uint32 by_bot = 2;
248-
// the location of the bot
246+
// the location of the bot [m]
249247
optional Vector2 location = 3;
250-
// the location of the ball at the moment when this foul occurred
248+
// the location of the ball at the moment when this foul occurred [m]
251249
optional Vector2 ball_location = 4;
252250
}
253251
// a defender other than the keeper was fully located inside its own defense and touched the ball
@@ -256,7 +254,7 @@ message GameEvent {
256254
required Team by_team = 1;
257255
// the bot that is inside the penalty area
258256
optional uint32 by_bot = 2;
259-
// the location of the bot
257+
// the location of the bot [m]
260258
optional Vector2 location = 3;
261259
// the distance [m] from bot case to the nearest point outside the defense area
262260
optional float distance = 4;
@@ -271,7 +269,7 @@ message GameEvent {
271269
optional Vector2 location = 3;
272270
// the distance [m] that the bot is inside the penalty area
273271
optional float distance = 4;
274-
// the location of the ball at the moment when this foul occurred
272+
// the location of the ball at the moment when this foul occurred [m]
275273
optional Vector2 ball_location = 5;
276274
}
277275
// an attacker touched the ball inside the opponent defense area
@@ -280,7 +278,7 @@ message GameEvent {
280278
required Team by_team = 1;
281279
// the bot that is inside the penalty area
282280
optional uint32 by_bot = 2;
283-
// the location of the bot
281+
// the location of the bot [m]
284282
optional Vector2 location = 3;
285283
// the distance [m] that the bot is inside the penalty area
286284
optional float distance = 4;
@@ -291,7 +289,7 @@ message GameEvent {
291289
required Team by_team = 1;
292290
// the bot that kicked too fast
293291
optional uint32 by_bot = 2;
294-
// the location of the ball at the time of the highest speed
292+
// the location of the ball at the time of the highest speed [m]
295293
optional Vector2 location = 3;
296294
// the absolute initial ball speed (kick speed) [m/s]
297295
optional float initial_ball_speed = 4;
@@ -304,9 +302,9 @@ message GameEvent {
304302
required Team by_team = 1;
305303
// the bot that dribbled too far
306304
optional uint32 by_bot = 2;
307-
// the location where the dribbling started
305+
// the location where the dribbling started [m]
308306
optional Vector2 start = 3;
309-
// the location where the maximum dribbling distance was reached
307+
// the location where the maximum dribbling distance was reached [m]
310308
optional Vector2 end = 4;
311309
}
312310
// an attacker touched the opponent robot inside defense area
@@ -317,7 +315,7 @@ message GameEvent {
317315
optional uint32 by_bot = 2;
318316
// the bot of the opposite team that was touched
319317
optional uint32 victim = 4;
320-
// the location of the contact point between both bots
318+
// the location of the contact point between both bots [m]
321319
optional Vector2 location = 3;
322320
}
323321
// an attacker touched the ball multiple times when it was not allowed to
@@ -326,7 +324,7 @@ message GameEvent {
326324
required Team by_team = 1;
327325
// the bot that touched the ball twice
328326
optional uint32 by_bot = 2;
329-
// the location of the ball when it was first touched
327+
// the location of the ball when it was first touched [m]
330328
optional Vector2 location = 3;
331329
}
332330
// an attacker was located too near to the opponent defense area during stop or free kick
@@ -335,11 +333,11 @@ message GameEvent {
335333
required Team by_team = 1;
336334
// the bot that is too close to the defense area
337335
optional uint32 by_bot = 2;
338-
// the location of the bot
336+
// the location of the bot [m]
339337
optional Vector2 location = 3;
340338
// the distance [m] of the bot to the penalty area
341339
optional float distance = 4;
342-
// the location of the ball at the moment when this foul occurred
340+
// the location of the ball at the moment when this foul occurred [m]
343341
optional Vector2 ball_location = 5;
344342
}
345343
// a bot held the ball for too long
@@ -348,7 +346,7 @@ message GameEvent {
348346
required Team by_team = 1;
349347
// the bot that holds the ball
350348
optional uint32 by_bot = 2;
351-
// the location of the ball
349+
// the location of the ball [m]
352350
optional Vector2 location = 3;
353351
// the duration [s] that the bot hold the ball
354352
optional float duration = 4;
@@ -359,7 +357,7 @@ message GameEvent {
359357
required Team by_team = 1;
360358
// the bot that interfered the placement
361359
optional uint32 by_bot = 2;
362-
// the location of the bot
360+
// the location of the bot [m]
363361
optional Vector2 location = 3;
364362
}
365363
// a team collected multiple cards (yellow and red), which results in a penalty kick
@@ -371,6 +369,8 @@ message GameEvent {
371369
message MultipleFouls {
372370
// the team that collected multiple fouls
373371
required Team by_team = 1;
372+
// the list of game events that caused the multiple fouls
373+
repeated GameEvent caused_game_events = 2;
374374
}
375375
// a team failed to place the ball multiple times in a row
376376
message MultiplePlacementFailures {
@@ -381,7 +381,7 @@ message GameEvent {
381381
message KickTimeout {
382382
// the team that that should have kicked
383383
required Team by_team = 1;
384-
// the location of the ball
384+
// the location of the ball [m]
385385
optional Vector2 location = 2;
386386
// the time [s] that was waited
387387
optional float time = 3;
@@ -418,7 +418,7 @@ message GameEvent {
418418
message KeeperHeldBall {
419419
// the team that found guilty
420420
required Team by_team = 1;
421-
// the location of the ball
421+
// the location of the ball [m]
422422
optional Vector2 location = 2;
423423
// the duration [s] that the keeper hold the ball
424424
optional float duration = 3;
@@ -462,21 +462,21 @@ message GameEvent {
462462
optional int32 num_robots_allowed = 2;
463463
// number of robots currently on the field
464464
optional int32 num_robots_on_field = 3;
465-
// the location of the ball at the moment when this foul occurred
465+
// the location of the ball at the moment when this foul occurred [m]
466466
optional Vector2 ball_location = 4;
467467
}
468468
// a robot chipped the ball over the field boundary out of the playing surface
469469
message BoundaryCrossing {
470470
// the team that has too many robots
471471
required Team by_team = 1;
472-
// the location of the ball
472+
// the location of the ball [m]
473473
optional Vector2 location = 2;
474474
}
475475
// the penalty kick failed (by time or by keeper)
476476
message PenaltyKickFailed {
477477
// the team that last touched the ball
478478
required Team by_team = 1;
479-
// the location of the ball at the moment of this event
479+
// the location of the ball at the moment of this event [m]
480480
optional Vector2 location = 2;
481481
}
482482

@@ -494,7 +494,7 @@ message GameEvent {
494494
ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA = 19; // triggered by autoRef
495495
DEFENDER_IN_DEFENSE_AREA = 31; // triggered by autoRef
496496
BOUNDARY_CROSSING = 41; // triggered by autoRef
497-
KEEPER_HELD_BALL = 13; // triggered by autoRef
497+
KEEPER_HELD_BALL = 13; // triggered by GC
498498
BOT_DRIBBLED_BALL_TOO_FAR = 17; // triggered by autoRef
499499

500500
BOT_PUSHED_BOT = 24; // triggered by human ref

0 commit comments

Comments
 (0)