Skip to content

Commit ec106ee

Browse files
committed
Initial draft of the auto-referee CI protocol
1 parent 63add25 commit ec106ee

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

doc/AutoRefCi.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Auto-referee continuous integration (CI)
2+
3+
To ease integration of the ssl-game-controller and the auto-referee implementations, there are separate unicast protocols that avoid the asynchronous communication via multicast and allows for integration with simulators and running at non-realtime speeds.
4+
5+
## Connection sequence
6+
7+
The connection is described in the following sequence diagram:
8+
9+
![sequence diagram](https://www.websequencediagrams.com/cgi-bin/cdraw?lz=bG9vcAoKU2ltdWxhdG9yIC0-IAADCjogcwATBmUgc3RlcAAZDkF1dG9SZWYgOgACCENpSW5wdXQgeyBTU0xfV3JhcHBlclBha2V0LCBSZWZlcmVlTXNnIH0KCm9wdAoANwgtPiBHQwA7ClRvQ29udHJvbGxlciB7IEdhbWVFdmVudCB9CkdDAGkOAB8KVG8AgQUIeyBSZXBseSB9CmVuZAoAWQwAgUoMAIEoCU91dACBLAZUcmFja2VyAIEsCWNrZXQgfQCCCg4AgSIFAIFbCgAcFwCBIAYAgjgMAFwLAIF5DmVuZAo&s=default)
10+
11+
Source to generate the diagram: [autoRefCi.puml](autoRefCi.puml)
12+
13+
## Protobuf protocol
14+
15+
All protobuf files can be found in [../proto](../proto).

doc/autoRefCi.puml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@startuml
2+
loop
3+
4+
Simulator -> Simulator : simulate step
5+
Simulator -> AutoRef : AutoRefCiInput { SSL_WrapperPaket, RefereeMsg }
6+
7+
opt
8+
AutoRef -> GC : AutoRefToController { GameEvent }
9+
GC -> AutoRef : ControllerToAutoRef { Reply }
10+
end
11+
12+
AutoRef -> Simulator : AutoRefCiOutput { TrackerWrapperPacket }
13+
Simulator -> GC : CiInput { TrackerWrapperPacket }
14+
GC -> Simulator : CiOutput { RefereeMsg }
15+
16+
end
17+
@enduml

proto/ssl_autoref_ci.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
syntax = "proto2";
2+
3+
import "ssl_vision_wrapper_tracked.proto";
4+
import "ssl_vision_detection.proto";
5+
import "ssl_vision_geometry.proto";
6+
import "ssl_gc_referee_message.proto";
7+
8+
// The AutoRefCiInput contains all packets/messages that would otherwise be received through multicast by the auto-referee
9+
// It may contain either a raw or a tracked SSL-vision packet. If both are given, the implementation may choose either one.
10+
message AutoRefCiInput {
11+
// Latest referee message
12+
optional Referee referee_message = 1;
13+
// A tracked SSL-Vision packet to be processed without filtering
14+
optional TrackerWrapperPacket tracker_wrapper_packet = 2;
15+
// A list of unfiltered SSL-Vision packets (for multiple cameras) to be filtered and processed
16+
repeated SSL_DetectionFrame detection = 3;
17+
// Current geometry data, to be sent at least once at the beginning of the connection
18+
optional SSL_GeometryData geometry = 4;
19+
}
20+
21+
// The AutoRefCiOutput contains any new data created by the auto-referee for further processing
22+
message AutoRefCiOutput {
23+
// A resulting tracked SSL-Vision packet for input into the ssl-game-controller.
24+
// The auto-referee will either generate it from the unfiltered SSL-Vision packets
25+
// or simply return the tracked packet from the input.
26+
optional TrackerWrapperPacket tracker_wrapper_packet = 1;
27+
}

0 commit comments

Comments
 (0)