Skip to content

Commit c1dbed4

Browse files
committed
Add new information from refMsg to board
- Status message - excessive bot substitution - nearestOwnBotDistance from failed placement event
1 parent 6d1e6ff commit c1dbed4

File tree

6 files changed

+525
-60
lines changed

6 files changed

+525
-60
lines changed

frontend/src/components/MatchStatus.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<hr class="separator"/>
2323

2424
<PowerPlay/>
25+
<StatusMessage/>
2526

2627
</div>
2728
<div class="time-container"
@@ -35,10 +36,11 @@
3536
import {Referee, Team} from "@/sslProto"
3637
import {mapStageToText, mapCommandToText} from "@/texts";
3738
import PowerPlay from "./PowerPlay";
39+
import StatusMessage from "./StatusMessage";
3840
3941
export default {
4042
name: "MatchStatus",
41-
components: {PowerPlay},
43+
components: {PowerPlay, StatusMessage},
4244
computed: {
4345
refereeMessage() {
4446
return this.$store.state.refereeMsg;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<template>
2+
<div>
3+
<span v-if="statusMessage !== null">
4+
{{ statusMessage }}
5+
</span>
6+
</div>
7+
</template>
8+
9+
<script>
10+
export default {
11+
name: "StatusMessage",
12+
computed: {
13+
statusMessage() {
14+
return this.$store.state.refereeMsg.statusMessage;
15+
},
16+
}
17+
}
18+
</script>
19+
20+
<style scoped>
21+
22+
</style>

frontend/src/proto/ssl_gc_game_event.proto

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

3+
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
4+
35
import "ssl_gc_common.proto";
46
import "ssl_gc_geometry.proto";
57

@@ -78,6 +80,7 @@ message GameEvent {
7880
MultipleCards multiple_cards = 32;
7981
MultipleFouls multiple_fouls = 34;
8082
BotSubstitution bot_substitution = 37;
83+
ExcessiveBotSubstitution excessive_bot_substitution = 52;
8184
TooManyRobots too_many_robots = 38;
8285
ChallengeFlag challenge_flag = 46;
8386
ChallengeFlagHandled challenge_flag_handled = 48;
@@ -419,6 +422,8 @@ message GameEvent {
419422
required Team by_team = 1;
420423
// the remaining distance [m] from ball to placement position
421424
optional float remaining_distance = 2;
425+
// the distance [m] of the nearest own robot to the ball
426+
optional float nearest_own_bot_distance = 3;
422427
}
423428
// a team was found guilty for minor unsporting behavior
424429
message UnsportingBehaviorMinor {
@@ -464,6 +469,11 @@ message GameEvent {
464469
// the team that substitutes robots
465470
required Team by_team = 1;
466471
}
472+
// A foul for excessive bot substitutions
473+
message ExcessiveBotSubstitution {
474+
// the team that substitutes robots
475+
required Team by_team = 1;
476+
}
467477
// A challenge flag, requested by a team previously, is flagged
468478
message ChallengeFlag {
469479
// the team that requested the challenge flag
@@ -543,6 +553,7 @@ message GameEvent {
543553
DEFENDER_TOO_CLOSE_TO_KICK_POINT = 29; // triggered by autoRef
544554
BOT_TOO_FAST_IN_STOP = 28; // triggered by autoRef
545555
BOT_INTERFERED_PLACEMENT = 20; // triggered by autoRef
556+
EXCESSIVE_BOT_SUBSTITUTION = 48; // triggered by GC
546557

547558
// Scoring goals
548559

frontend/src/proto/ssl_gc_referee_message.proto

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ message Referee {
7171
//
7272
// If the stage runs over its specified time, this value
7373
// becomes negative.
74-
optional sint32 stage_time_left = 3;
74+
optional sint64 stage_time_left = 3;
7575

7676
// These are the "fine" states of play on the field.
7777
enum Command {
@@ -160,6 +160,10 @@ message Referee {
160160
optional bool ball_placement_failures_reached = 15;
161161
// The team is allowed to substitute one or more robots currently
162162
optional bool bot_substitution_allowed = 16;
163+
// The number of bot substitutions left by the team in this halftime
164+
optional uint32 bot_substitutions_left = 17;
165+
// The number of microseconds left for current bot substitution
166+
optional uint32 bot_substitution_time_left = 18;
163167
}
164168

165169
// Information about the two teams.
@@ -183,7 +187,7 @@ message Referee {
183187

184188
// The game event that caused the referee command.
185189
// deprecated in favor of game_events.
186-
// optional Game_Event game_event = 11 [deprecated = true];
190+
// optional Game_Event game_event = 11 [deprecated = true];
187191
reserved 11;
188192

189193
// The command that will be issued after the current stoppage and ball placement to continue the game.
@@ -194,7 +198,7 @@ message Referee {
194198
reserved 13;
195199
repeated GameEvent game_events = 16;
196200

197-
// All non-finished proposed game events that may be processed next.
201+
// All proposed game events that were detected since the last RUNNING state.
198202
reserved 14;
199203
repeated GameEventProposalGroup game_event_proposals = 17;
200204

@@ -205,13 +209,18 @@ message Referee {
205209
// * free kicks
206210
// * kickoff, penalty kick, force start
207211
// * ball placement
208-
optional int32 current_action_time_remaining = 15;
212+
optional int64 current_action_time_remaining = 15;
213+
214+
// A message that can be displayed to the spectators, like a reason for a stoppage.
215+
optional string status_message = 20;
209216
}
210217

211218
// List of matching proposals
212219
message GameEventProposalGroup {
213-
// The proposed game event.
214-
repeated GameEvent game_event = 1;
220+
// Unique ID of this group
221+
optional string id = 3;
222+
// The proposed game events
223+
repeated GameEvent game_events = 1;
215224
// Whether the proposal group was accepted
216225
optional bool accepted = 2;
217226
}

0 commit comments

Comments
 (0)