-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathssl_gc_engine.proto
151 lines (119 loc) · 3.68 KB
/
ssl_gc_engine.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
syntax = "proto2";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/engine";
import "ssl_gc_geometry.proto";
import "ssl_gc_common.proto";
import "google/protobuf/timestamp.proto";
// The GC state contains settings and state independent of the match state
message GcState {
// the state of each team
map<string, GcStateTeam> team_state = 1;
// the states of the auto referees
map<string, GcStateAutoRef> auto_ref_state = 2;
// the attached trackers (uuid -> source_name)
map<string, string> trackers = 3;
// the next actions that can be executed when continuing
repeated ContinueAction continue_actions = 4;
// the next actions that can be executed when continuing
repeated ContinueHint continue_hints = 5;
}
// The GC state for a single team
message GcStateTeam {
// true: The team is connected
optional bool connected = 1;
// true: The team connected via TLS with a verified certificate
optional bool connection_verified = 2;
// true: The remote control for the team is connected
optional bool remote_control_connected = 3;
// true: The remote control for the team connected via TLS with a verified certificate
optional bool remote_control_connection_verified = 4;
// the advantage choice of the team
optional TeamAdvantageChoice advantage_choice = 5;
}
// The choice from a team regarding the advantage rule
message TeamAdvantageChoice {
// the choice of the team
optional AdvantageChoice choice = 1;
// possible advantage choices
enum AdvantageChoice {
// stop the game
STOP = 0;
// keep the match running
CONTINUE = 1;
}
}
// The GC state of an auto referee
message GcStateAutoRef {
// true: The autoRef connected via TLS with a verified certificate
optional bool connection_verified = 1;
}
// GC state of a tracker
message GcStateTracker {
// Name of the source
optional string source_name = 1;
// UUID of the source
optional string uuid = 4;
// Current ball
optional Ball ball = 2;
// Current robots
repeated Robot robots = 3;
}
// The ball state
message Ball {
// ball position [m]
optional Vector3 pos = 1;
// ball velocity [m/s]
optional Vector3 vel = 2;
}
// The robot state
message Robot {
// robot id and team
optional RobotId id = 1;
// robot position [m]
optional Vector2 pos = 2;
}
message ContinueAction {
// type of action that will be performed next
required Type type = 1;
// for which team (if team specific)
required Team for_team = 2;
// list of issues that hinders the game from continuing
repeated string continuation_issues = 3;
// timestamp at which the action will be ready (to give some preparation time)
optional google.protobuf.Timestamp ready_at = 4;
// state of the action
optional State state = 5;
enum Type {
TYPE_UNKNOWN = 0;
HALT = 1;
RESUME_FROM_HALT = 10;
STOP_GAME = 2;
FORCE_START = 11;
FREE_KICK = 17;
NEXT_COMMAND = 3;
BALL_PLACEMENT_START = 4;
BALL_PLACEMENT_CANCEL = 9;
BALL_PLACEMENT_COMPLETE = 14;
BALL_PLACEMENT_FAIL = 15;
TIMEOUT_START = 5;
TIMEOUT_STOP = 6;
BOT_SUBSTITUTION = 7;
NEXT_STAGE = 8;
END_GAME = 16;
ACCEPT_GOAL = 12;
REJECT_GOAL = 20;
NORMAL_START = 13;
CHALLENGE_ACCEPT = 18;
CHALLENGE_REJECT = 19;
}
enum State {
STATE_UNKNOWN = 0;
BLOCKED = 1;
WAITING = 2;
READY_AUTO = 3;
READY_MANUAL = 4;
DISABLED = 5;
}
}
message ContinueHint {
required string message = 1;
}