Skip to content

Commit dd5a409

Browse files
committed
[feature] Add tracker state to gcState
1 parent ddd77eb commit dd5a409

File tree

3 files changed

+426
-37
lines changed

3 files changed

+426
-37
lines changed

internal/app/engine/ssl_gc_engine.pb.go

Lines changed: 122 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/ssl_gc_engine.proto

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,62 @@ syntax = "proto2";
22

33
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/engine";
44

5+
import "ssl_game_event.proto";
6+
57
message GcState {
68
map<string, GcStateTeam> team_state = 1;
79
map<string, GcStateAutoRef> auto_ref_state = 2;
10+
map<string, GcStateTracker> tracker_state = 3;
811
}
912

1013
message GcStateTeam {
14+
// true: The team is connected
1115
optional bool connected = 1;
16+
17+
// true: The team connected via TLS with a verified certificate
1218
optional bool connection_verified = 2;
1319
}
1420

1521
message GcStateAutoRef {
22+
// true: The autoRef connected via TLS with a verified certificate
1623
optional bool connection_verified = 1;
1724

25+
// if current state is prepare_kickoff, prepare_penalty, stop or ball_placement:
26+
// true: all conditions are met to continue from the current state
27+
// false: at least one condition not met yet
28+
// not present: not supported by the autoRef
29+
// else:
30+
// undefined
1831
optional bool ready_to_continue = 2;
32+
33+
// if current state is stop:
34+
// true: ball placement not required, can directly continue
35+
// false: need to initiate ball placement
36+
// if current state is ball placement:
37+
// true: ball placement done, all conditions met
38+
// false: ball not yet placed successfully
1939
optional bool ball_placed = 3;
40+
41+
// UNIX timestamp [μs] when the ball last moved
42+
// Used by the GC to determine if there is still progress
2043
optional uint64 last_progress = 4;
2144

45+
// map team -> team specific state
2246
map<string, GcStateAutoRefTeam> team_state = 5;
2347
}
2448

2549
message GcStateAutoRefTeam {
50+
// Number of robots currently on the field
2651
optional uint32 number_of_robots = 1;
52+
53+
// When the ball is in play, this flag indicates, if this team may change the keeper in confirmation with the rules
2754
optional bool may_change_keeper = 2;
2855
}
56+
57+
message GcStateTracker {
58+
// Current ball position [m]
59+
optional Location ball_pos = 1;
60+
61+
// Current ball velocity [m/s]
62+
optional Location ball_vel = 2;
63+
}

0 commit comments

Comments
 (0)