From 6ed2a60eae5891f24c9b2f58ba76d59b3c2176c4 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:36:14 +0530 Subject: [PATCH 01/18] Update ssl.sh --- kgpkubs_launch/scripts/ssl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kgpkubs_launch/scripts/ssl.sh b/kgpkubs_launch/scripts/ssl.sh index ffc8d951..202fd901 100755 --- a/kgpkubs_launch/scripts/ssl.sh +++ b/kgpkubs_launch/scripts/ssl.sh @@ -31,6 +31,7 @@ pr_launcher "vision" "vision.launch" pr_launcher "belief_state" "belief_state.launch" pr_launcher "grsim_comm" "grsim_comm.launch" pr_launcher "path_planner_ompl" "ompl_planner.launch" +pr_launcher "ref_data" "ref_data.launch" screen -S "GUI" -dm python run_gui.py screen -S "bs_memcache" -dm python bs.py From 086912d0d8676233e617a06304c962ae7057a422 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:37:14 +0530 Subject: [PATCH 02/18] Update CMakeLists.txt --- krssg_ssl_msgs/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/krssg_ssl_msgs/CMakeLists.txt b/krssg_ssl_msgs/CMakeLists.txt index ae13f2e2..8ccbc485 100644 --- a/krssg_ssl_msgs/CMakeLists.txt +++ b/krssg_ssl_msgs/CMakeLists.txt @@ -72,7 +72,6 @@ SSL_DetectionRobot.msg SSL_DetectionFrame.msg SSL_FieldLineSegment.msg gr_Replacement.msg -SSL_Refbox.msg gr_Packet.msg profilerOutput.msg SSL_GeometryCameraCalibration.msg @@ -81,6 +80,10 @@ gr_BallReplacement.msg sslDebug_Data.msg gr_RobotReplacement.msg target_triangle.msg +Ref.msg +game_event.msg +Originator.msg +SSL_Refbox.msg ) @@ -90,6 +93,7 @@ target_triangle.msg FILES path_plan.srv bsServer.srv + ref_comm.srv # Service2.srv ) From b9c6c69a9c187814dc7d81fa9abe76285080524b Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:39:47 +0530 Subject: [PATCH 03/18] Update GoToBall.py To update alignment angle wrt ball while moving --- role/GoToBall.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/role/GoToBall.py b/role/GoToBall.py index e9d7d3f5..ea90aa17 100644 --- a/role/GoToBall.py +++ b/role/GoToBall.py @@ -6,8 +6,16 @@ from utils.geometry import * from utils.config import * from math import * - +from math import * +import time +from krssg_ssl_msgs.msg import BeliefState +from krssg_ssl_msgs.srv import bsServer +from krssg_ssl_msgs.srv import * +from krssg_ssl_msgs.msg import Ref first = 0 +rospy.wait_for_service('bsServer',) +getState = rospy.ServiceProxy('bsServer',bsServer) +state = None class GoToBall(behavior.Behavior): """docstring for GoToBall""" @@ -150,8 +158,16 @@ def on_exit_setup(self): pass def on_enter_course_approach(self): + global state + state = None self.target_point = getPointBehindTheBall(self.kub.state.ballPos,self.theta) self.target_point = self.kub.state.ballPos + try: + state = getState(state).stateB + except rospy.ServiceException, e: + print("chutiya") + if state : + self.theta = normalize_angle(pi+atan2(state.ballPos.y,state.ballPos.x-3000)) _GoToPoint_.init(self.kub, self.target_point, self.theta) pass @@ -252,8 +268,3 @@ def on_exit_fine_approach(self): self.kub.kick(self.power) self.kub.execute() pass - - - - - From bdfa839ffa090f1b8a20b7f245c9cca380baa8ec Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:47:36 +0530 Subject: [PATCH 04/18] Update GoToPoint.py stop when reached the point --- role/GoToPoint.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/role/GoToPoint.py b/role/GoToPoint.py index 150c4b49..49bfb426 100644 --- a/role/GoToPoint.py +++ b/role/GoToPoint.py @@ -1,5 +1,7 @@ +print("Gotopoint imported") from enum import Enum import behavior +print("Importing _gotopoint_") import _GoToPoint_ try: _GoToPoint_ = reload(_GoToPoint_) @@ -86,6 +88,7 @@ def on_exit_setup(self): pass def on_enter_drive(self): + _GoToPoint_.init(self.kub,self.target_point,self.theta) pass def terminate(self): @@ -95,26 +98,31 @@ def execute_drive(self): print("Execute drive") start_time = rospy.Time.now() start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) - _GoToPoint_.init(self.kub,self.target_point,self.theta) generatingfunction = _GoToPoint_.execute(start_time,self.DISTANCE_THRESH) print("Datatype of gf:",type(generatingfunction)) for gf in generatingfunction: self.kub,target_point = gf # print self.behavior_failed - if not vicinity_points(self.target_point,target_point): - # print - # print (self.target_point.x,self.target_point.y) - # print (target_point.x,target_point.y) - # print - self.behavior_failed = True - # print self.behavior_failed - break + # if not vicinity_points(self.target_point,target_point): + # # print + # # print (self.target_point.x,self.target_point.y) + # # print (target_point.x,target_point.y) + # # print + # self.behavior_failed = True + # # print self.behavior_failed + # break + if vicinity_points(self.target_point, self.kub.get_pos()): + self.kub.reset() + self.kub.execute() + break self.new_point = self.kub.get_pos() def on_exit_drive(self): + self.kub.reset() + self.kub.execute() pass From 6d2ec0fbcbdae8214452788fcf8a7e9dcc1cb1ea Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:49:15 +0530 Subject: [PATCH 05/18] Add files via upload --- callRef.py | 371 ++++++++++++++++++++++++++++++++++++++++++++++++++++ rc.py | 30 +++++ test_ref.py | 74 +++++++++++ 3 files changed, 475 insertions(+) create mode 100644 callRef.py create mode 100644 rc.py create mode 100644 test_ref.py diff --git a/callRef.py b/callRef.py new file mode 100644 index 00000000..002dacc3 --- /dev/null +++ b/callRef.py @@ -0,0 +1,371 @@ +import rospy,sys +from utils.geometry import Vector2D +from utils.functions import * +from krssg_ssl_msgs.msg import point_2d +from krssg_ssl_msgs.msg import BeliefState +from krssg_ssl_msgs.msg import gr_Commands +from krssg_ssl_msgs.msg import gr_Robot_Command +from krssg_ssl_msgs.msg import Ref +from role import _GoToPoint_, GoToPoint +from multiprocessing import Process +from kubs import kubs +from krssg_ssl_msgs.srv import * +from math import atan2,pi +from utils.functions import * +import multiprocessing +import threading +import time +#pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) +command = 5 +flag = 0 +pcommand = 12 +rospy.wait_for_service('ref_comm',) +getrState = rospy.ServiceProxy('ref_comm',ref_comm) + +def kickoff_Blue(id_1,state,pub, target): + kub = kubs.kubs(id_1,state,pub) + kub.update_state(state) + print("HEREEE") + # time.sleep(2) + gotopoint_fsm = GoToPoint.GoToPoint() + gotopoint_fsm.add_kub(kub) + gotopoint_fsm.add_point(target, 0) + gotopoint_fsm.spin() + kub.reset() + kub.execute() + # _GoToPoint_.init(kub,target,0) + # start_time = rospy.Time.now() + # start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) + # generatingfunction = _GoToPoint_.execute(start_time,DISTANCE_THRESH/3,True) + # #self.behavior_failed = False + # for gf in generatingfunction: + # kub,target_point = gf + # # self.target_point = getPointBehindTheBall(self.kub.state.ballPos,self.theta) + # if not vicinity_points(target,target_point,BOT_RADIUS*2.0): + # # self.behavior_failed = True + # break + # if vicinity_points(kub.get_pos(), target,BOT_RADIUS*1.5): + # print("bot", id_1) + # print("reached") + # kub.reset() + # kub.execute() + # time.sleep(2) + # break + +def main1(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 1",command) + if command == 5: + target = Vector2D(-1500,0) + kickoff_Blue(1,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() + +def main2(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 2 ",command) + if command == 5: + target = Vector2D(-1500,-1120) + kickoff_Blue(2,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() +def main3(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 3 ",command) + if command == 5: + target = Vector2D(-550,0) + kickoff_Blue(3,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() +def main4(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 4 ",command) + if command == 5: + target = Vector2D(-2500,0) + kickoff_Blue(4,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() +def main5(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 5 ",command) + if command == 5: + target = Vector2D(-3600,0) + kickoff_Blue(5,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() +def main6(process_id,pub): + global command + # pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + try : + rospy.init_node('node' + str(process_id),anonymous=False) + except: + pass + + while True: + state = None + # state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + try: + state = getState(state) + except rospy.ServiceException, e: + print("chutiya") + if state: + #print('lasknfcjscnajnstate',state.stateB.homePos) + #p2 = multiprocessing.Process(target=function2, args=(2,state.stateB, )) + kub = kubs.kubs(process_id,state,pub) + kub.reset() + kub.execute() + print("process 6 ",command) + if command == 5: + target = Vector2D(-1500,1120) + kickoff_Blue(0,state.stateB,pub,target) + kub.reset() + kub.execute() + print(process_id) + print("COMPLETED") + time.sleep(1) + break + else: + break + # break + #p2.start() + #p1.join() + #p2.join() + # print('chal ja') + # break + # rospy.spin() +# def main(comm,pub): + +# global command +# command = comm +# # print(command) +# # time.sleep(2) +# # print(pub.get_num_connections()) +# # print("##########################################################################") +# # time.sleep(3) +# p1 = multiprocessing.Process(target=main1, args=(1,pub,)) +# p2 = multiprocessing.Process(target=main2, args=(2,pub,)) +# p3 = multiprocessing.Process(target=main3, args=(3,pub,)) +# p4 = multiprocessing.Process(target=main4, args=(4,pub,)) +# p5 = multiprocessing.Process(target=main4, args=(5,pub,)) +# p6 = multiprocessing.Process(target=main6, args=(0,pub,)) +# p1.start() +# p2.start() +# p3.start() +# p4.start() +# p5.start() +# p6.start() +# p1.join() +# p2.join() +# p3.join() +# p4.join() +# p5.join() +# p6.join() +# print("COMMAND COMPLETED") +# time.sleep(2) +pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) +while True: + ref_state = None + ref_state = getrState(ref_state).stateB + print ref_state.command + # time.sleep(2) + if ref_state.command == 2 or ref_state.command == 3 or pcommand==ref_state.command: + continue + command = ref_state.command + print("command: ",command) + print("pcommand: ", pcommand) + pcommand = command + # time.sleep(2) + p1 = multiprocessing.Process(target=main1, args=(1,pub)) + p2 = multiprocessing.Process(target=main2, args=(2,pub)) + p3 = multiprocessing.Process(target=main3, args=(3,pub)) + p4 = multiprocessing.Process(target=main4, args=(4,pub)) + p5 = multiprocessing.Process(target=main5, args=(5,pub)) + p6 = multiprocessing.Process(target=main6, args=(0,pub)) + p1.start() + p2.start() + p3.start() + p4.start() + p5.start() + p6.start() + p1.join() + p2.join() + p3.join() + p4.join() + p5.join() + p6.join() + print("COMMAND COMPLETED") +#main1() + +# rospy.Subscriber('/belief_state', BeliefState, BS_callback, queue_size=1000) \ No newline at end of file diff --git a/rc.py b/rc.py new file mode 100644 index 00000000..563c8619 --- /dev/null +++ b/rc.py @@ -0,0 +1,30 @@ +import rospy +from krssg_ssl_msgs.msg import Ref +import memcache +# from utils.config import RC_ADDRESS +from krssg_ssl_msgs.srv import * +#shared = memcache.Client(BS_ADDRESS,debug=False) +State = None + +def RC_callback(state): + global State + State = state + print("122") + # print state + +def rc(req): + global State + print State + req.stateA = State + print("12") + return ref_commResponse(req.stateA) + +def refcomm(): + rospy.init_node('RCnode',anonymous=False) + rospy.Subscriber('/ref_data', Ref, RC_callback, queue_size=1000) + s = rospy.Service('ref_comm',ref_comm,rc) + print("11") + rospy.spin() +if __name__ == "__main__": + refcomm() + diff --git a/test_ref.py b/test_ref.py new file mode 100644 index 00000000..3e499bcd --- /dev/null +++ b/test_ref.py @@ -0,0 +1,74 @@ +import rospy,sys +from utils.geometry import Vector2D +from utils.functions import * +from krssg_ssl_msgs.msg import point_2d +from krssg_ssl_msgs.msg import BeliefState +from krssg_ssl_msgs.msg import gr_Commands +from krssg_ssl_msgs.msg import gr_Robot_Command +from krssg_ssl_msgs.msg import BeliefState +from role import Referee, GoToPoint +from multiprocessing import Process +from kubs import kubs +from krssg_ssl_msgs.srv import bsServer +from krssg_ssl_msgs.srv import ref_comm +from krssg_ssl_msgs.msg import Ref +from math import atan2,pi +from utils.functions import * +import time +pub = rospy.Publisher('/grsim_data',gr_Commands,queue_size=1000) + +# def ref_callback(data): + # rospy.loginfo(data.command) + + +# rospy.Subscriber('/ref_data',Ref,ref_callback) +def function(id_,state,ref_state): + kub = kubs.kubs(id_,state,pub) + kub.update_state(state) + print(kub.kubs_id) + print("11") + # print(ref_state) + g_fsm = Referee.Referee(ref_state) + # g_fsm = GoToPoint.GoToPoint() + g_fsm.add_kub(kub) + # g_fsm.add_point(point=kub.state.ballPos,orient=normalize_angle(pi+atan2(state.ballPos.y,state.ballPos.x-3000))) + g_fsm.add_theta(theta=normalize_angle(pi+atan2(state.ballPos.y,state.ballPos.x+3000))) + g_fsm.as_graphviz() + g_fsm.write_diagram_png() + print('something before spin') + g_fsm.spin() + # +#print str(kub.kubs_id) + str('***********') +rospy.init_node('node',anonymous=False) +start_time = rospy.Time.now() +start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) +# rospy.Subscriber('/belief_state', BeliefState, BS_callback, queue_size=1000) +while True: + print("enter") + state = None + ref_state = None + #state=shared.get('state') + rospy.wait_for_service('bsServer',) + getState = rospy.ServiceProxy('bsServer',bsServer) + # print("11") + rospy.wait_for_service('ref_comm',) + getrState = rospy.ServiceProxy('ref_comm',ref_comm) + # print("12") + try: + state = getState(state) + ref_state = getrState(ref_state) + except rospy.ServiceException, e: + print("chutiya") + # print(state) + # print(ref_state) + if state and ref_state: + print('lasknfcjscnajnstate',state.stateB.homePos) + # print(ref_state.stateB) + function(1,state.stateB,ref_state.stateB) + print('chal ja') + time.sleep(5) +rospy.spin() + + + + From 4723f0fb03dd3e4d4163cede21f31dfce2f4a7e6 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:50:39 +0530 Subject: [PATCH 06/18] Add files via upload --- role/Referee.py | 328 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 role/Referee.py diff --git a/role/Referee.py b/role/Referee.py new file mode 100644 index 00000000..d731b231 --- /dev/null +++ b/role/Referee.py @@ -0,0 +1,328 @@ +from enum import Enum +import behavior +import _GoToPoint_ +import rospy +from utils.functions import * +from utils.geometry import * +from utils.config import * +from math import * +import time +from krssg_ssl_msgs.msg import BeliefState +from krssg_ssl_msgs.srv import bsServer +from krssg_ssl_msgs.srv import * +from krssg_ssl_msgs.msg import Ref +first = 0 + +rospy.wait_for_service('ref_comm',) +getrState = rospy.ServiceProxy('ref_comm',ref_comm) +rospy.wait_for_service('bsServer',) +getState = rospy.ServiceProxy('bsServer',bsServer) +state = None +class Referee(behavior.Behavior): + """docstring for Referee""" + class State(Enum): + setup = 1 + course_approach = 2 + fine_approach = 3 + intercept = 4 + ref = 5 + + def __init__(self,ref_state,course_approch_thresh = DISTANCE_THRESH/3,continuous=False): + super(Referee,self).__init__() + + self.name = "Referee" + + self.power = 7.0 + + self.target_point = None + + + self.course_approch_thresh = course_approch_thresh + + self.ball_dist_thresh = 2*BOT_BALL_THRESH + + self.behavior_failed = False + + self.ref_state = ref_state + + self.add_state(Referee.State.setup, + behavior.Behavior.State.running) + + self.add_state(Referee.State.course_approach, + behavior.Behavior.State.running) + + self.add_state(Referee.State.fine_approach, + behavior.Behavior.State.running) + + self.add_state(Referee.State.intercept, + behavior.Behavior.State.running) + + self.add_state(Referee.State.ref, + behavior.Behavior.State.running) + + self.add_transition(behavior.Behavior.State.start, + Referee.State.setup,lambda: True,'immediately') + + self.add_transition(Referee.State.setup, + Referee.State.intercept,lambda:self.ball_moving() and self.ref_check(),'intercept_ball') + + self.add_transition(Referee.State.setup, + Referee.State.ref,lambda:not self.ref_check(),'referee') + + self.add_transition(Referee.State.ref, + Referee.State.setup,lambda:True,'referee') + + self.add_transition(Referee.State.setup, + Referee.State.fine_approach,lambda: self.fine_approach() and not self.ball_moving() and self.ref_check(),'ball_in_vicinity') + + self.add_transition(Referee.State.setup, + Referee.State.course_approach,lambda: self.course_approach() and not self.ball_moving() and self.ref_check(),'setup') + + self.add_transition(Referee.State.setup, + Referee.State.intercept,lambda:self.ball_moving() and self.ref_check(),'intercept_ball') + + self.add_transition(Referee.State.intercept, + Referee.State.course_approach,lambda:self.course_approach() and not self.ball_moving() and self.ref_check(),'setup') + + self.add_transition(Referee.State.intercept, + Referee.State.ref,lambda:not self.ref_check(),'referee') + + self.add_transition(Referee.State.course_approach, + Referee.State.fine_approach,lambda:self.at_target_point() and self.ref_check() ,'complete') + + self.add_transition(Referee.State.course_approach, + Referee.State.ref,lambda:not self.ref_check(),'referee') + + self.add_transition(Referee.State.fine_approach, + Referee.State.ref,lambda:not self.ref_check(),'referee') + + self.add_transition(Referee.State.course_approach, + Referee.State.intercept,lambda:self.ball_moving() and self.ref_check(),'intercept_ball') + + #self.add_transition(Referee.State.fine_approach, + #Referee.State.intercept,lambda:self.ball_moving(),'intercept_ball') + + self.add_transition(Referee.State.fine_approach, + behavior.Behavior.State.completed,lambda:self.at_target_point(),'complete') + + self.add_transition(Referee.State.intercept, + Referee.State.fine_approach,lambda:self.intercept_complete() and self.ref_check(),'intercept_complete') + + # self.add_transition(Referee.State.setup, + # behavior.Behavior.State.failed,lambda: self.behavior_failed,'failed') + #These three conditions for fail might cause a problem in dynamic gameplay as we are sending it back to setup and going to new point. + self.add_transition(Referee.State.course_approach, + Referee.State.setup,lambda: self.behavior_failed,'failed') + + self.add_transition(Referee.State.fine_approach, + Referee.State.setup,lambda: self.behavior_failed,'failed') + + self.add_transition(Referee.State.intercept, + Referee.State.setup,lambda: self.behavior_failed,'failed') + + + + def ref_check(self): + self.ref_state = None + self.ref_state = getrState(self.ref_state).stateB + # print("ref_state: ", self.ref_state) + # time.sleep(2) + + if self.ref_state.command == 2 or self.ref_state.command == 3: + return True + else: + return False + # time.sleep(2) + def add_kub(self,kub): + self.kub = kub + + def add_theta(self,theta): + self.theta = theta + + def fine_approach(self): + return self.ball_in_vicinity() + + def course_approach(self): + return not self.ball_in_vicinity() + # def target_present(self): + # return not ball_in_front_of_bot(self.kub) and self.target_point is not None + + def at_target_point(self): + return vicinity_points(self.target_point,self.kub.get_pos(),thresh= self.course_approch_thresh) + + + def ball_in_vicinity(self): + if ball_in_front_of_bot(self.kub): + return True + return False + + def ball_moving(self): + #print("try to move idiot") + return False + #print("vx = ",self.kub.state.ballVel.x + ball_vel_dir = Vector2D(self.kub.state.ballVel.x, self.kub.state.ballVel.y) + ball_vel_angle = ball_vel_dir.tan_inverse() + bot_ball = Vector2D(self.kub.state.ballPos.x-self.kub.state.homePos[self.kub.kubs_id].x , self.kub.state.ballPos.y-self.kub.state.homePos[self.kub.kubs_id].y) + bot_ball_angle = bot_ball.tan_inverse() + perp_dist = sqrt((self.kub.state.homePos[self.kub.kubs_id].x -self.kub.state.ballPos.x)**2 + (self.kub.state.homePos[self.kub.kubs_id].y -self.kub.state.ballPos.y)**2)*sin(abs(ball_vel_angle-bot_ball_angle)) + #if ( getTime(perp_dist) < ) + if(abs(ball_vel_angle-bot_ball_angle) < SATISFIABLE_THETA_DEG): + return False + if (abs(self.kub.state.ballVel.x) > 10*MIN_BOT_SPEED and abs(self.kub.state.ballVel.x) < MAX_BOT_SPEED ) or ( abs(self.kub.state.ballVel.y) > 10*MIN_BOT_SPEED and abs(self.kub.state.ballVel.y) < MAX_BOT_SPEED ) : + print("ball moved", self.kub.state.ballVel.x, self.kub.state.ballVel.y) + return True + else: + return False + + def at_ball_pos(self): + error = 50 + return vicinity_points(self.kub.get_pos(),self.kub.state.ballPos,thresh=self.ball_dist_thresh+error) + + def terminate(self): + super().terminate() + + def on_enter_setup(self): + pass + def execute_setup(self): + pass + + def on_enter_ref(self): + pass + + def execute_ref(self): + print("executing ref") + self.kub.reset() + self.kub.execute() + while True: + if self.ref_check(): + break + # time.sleep(2) + pass + def on_exit_ref(self): + pass + + def on_exit_setup(self): + pass + + def on_enter_course_approach(self): + # print("#################entered course approach",self.kub.state) + global state + state = None + self.target_point = getPointBehindTheBall(self.kub.state.ballPos,self.theta,5) + self.target_point = self.kub.state.ballPos + try: + state = getState(state).stateB + except rospy.ServiceException, e: + print("chutiya") + if state : + self.theta = normalize_angle(pi+atan2(state.ballPos.y,state.ballPos.x-3000)) + _GoToPoint_.init(self.kub, self.target_point, self.theta) + pass + + def execute_course_approach(self): + + start_time = rospy.Time.now() + start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) + generatingfunction = _GoToPoint_.execute(start_time,self.course_approch_thresh,True) + #self.behavior_failed = False + for gf in generatingfunction: + + self.kub,target_point = gf + # self.target_point = getPointBehindTheBall(self.kub.state.ballPos,self.theta) + self.target_point = self.kub.state.ballPos + print("behaviour =", behavior.Behavior.State) + print("behaviour =", self.State) + # time.sleep(2) + if not self.ref_check(): + break + if not vicinity_points(self.target_point,target_point,thresh=BOT_RADIUS*2.0): + self.behavior_failed = True + break + + + def on_exit_course_approach(self): + pass + + def on_exit_intercept(self): + pass + + def on_enter_fine_approach(self): + # print("##########################entered fine approach",self.kub.state) + theta = self.kub.get_pos().theta + _GoToPoint_.init(self.kub, self.kub.state.ballPos, theta) + pass + + def execute_fine_approach(self): + start_time = rospy.Time.now() + start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) + generatingfunction = _GoToPoint_.execute(start_time,self.ball_dist_thresh) + for gf in generatingfunction: + self.kub,ballPos = gf + # print("behaviour = ",behavior.Behavior.State) + # print("behaviour =", self.State) + # time.sleep(2) + if not vicinity_points(ballPos,self.kub.state.ballPos,thresh=BOT_RADIUS): + self.behavior_failed = True + break + + def intercept_complete(self): + ball_vel = Vector2D(self.kub.state.ballVel.y,self.kub.state.ballVel.x) + ball_vel_angle = ball_vel.tan_inverse() + bot_ball_dir = Vector2D(self.kub.state.ballPos.y-self.kub.state.homePos[self.kub.kubs_id].y , self.kub.state.ballPos.x-self.kub.state.homePos[self.kub.kubs_id].x) + if ( abs(ball_vel_angle - bot_ball_dir.tan_inverse() )< 0.0523599): + return 1 + return 0 + + # def intercept_possible(self,angle,ball_vel_angle,bot_ball_angle,perp_dist): + + # ball_dist = (perp_dist*tan(1.5707963-(3.14159265-ball_vel_angle+bot_ball_angle)) - perp_dist*tan(angle) ) + # a = cos(angle) + # if a == 0: + # a = 0.0001 + # if self.ball_moving(): + # if(1.5*self.getTime(perp_dist/a) < ball_dist/sqrt(self.kub.state.ballVel.y*self.kub.state.ballVel.y + self.kub.state.ballVel.x*self.kub.state.ballVel.x) ): + # return True + # return False + # return False + + def on_enter_intercept(self): + global first + first = 1 + + def execute_intercept(self): + #print("ballvel= ",state.ballVel) + #$print("intercept") + global first + ball_vel = Vector2D(self.kub.state.ballVel.y,self.kub.state.ballVel.x) + bot_ball_dir = Vector2D(self.kub.state.ballPos.y-self.kub.state.homePos[self.kub.kubs_id].y , self.kub.state.ballPos.x-self.kub.state.homePos[self.kub.kubs_id].x) + ball_vel_angle = ball_vel.tan_inverse() + bot_ball_angle = bot_ball_dir.tan_inverse() + perp_dist = sqrt((self.kub.state.homePos[self.kub.kubs_id].x -self.kub.state.ballPos.x)**2 + (self.kub.state.homePos[self.kub.kubs_id].y -self.kub.state.ballPos.y)**2)*sin(abs(ball_vel_angle-bot_ball_angle)) + approach = True + + if (approach ): + first = 0 + #theta = 1.5707963-abs(ball_vel_angle-bot_ball_angle) - 0.0872665 + my_target = Vector2D(0,0) + + final_theta = atan2(self.kub.state.ballVel.x,self.kub.state.ballVel.y) + + x_final = self.kub.state.homePos[self.kub.kubs_id].x + perp_dist*cos(final_theta) + y_final = self.kub.state.homePos[self.kub.kubs_id].y + perp_dist*sin(final_theta) + my_target = Vector2D(x_final, y_final) + + start_time = rospy.Time.now() + start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9) + print("my_target = ",my_target) + _GoToPoint_.init(self.kub, my_target, 0) + generatingfunction = _GoToPoint_.execute(start_time, self.ball_dist_thresh) + + + def disable_kick(self): + self.power = 0.0 + + def on_exit_fine_approach(self): + + self.kub.kick(self.power) + self.kub.execute() + pass \ No newline at end of file From c8c9415978a6ef174199bab90daf75398c927b2b Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:54:12 +0530 Subject: [PATCH 07/18] ssl ref --- ssl-game-controller-1.1.7/LICENCE.txt | 674 ++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 ssl-game-controller-1.1.7/LICENCE.txt diff --git a/ssl-game-controller-1.1.7/LICENCE.txt b/ssl-game-controller-1.1.7/LICENCE.txt new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/ssl-game-controller-1.1.7/LICENCE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 12e7af9f1bd02094c5b5fca1a3d02023160ead15 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:56:11 +0530 Subject: [PATCH 08/18] ref --- kgpkubs_launch/launch/ref_data.launch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 kgpkubs_launch/launch/ref_data.launch diff --git a/kgpkubs_launch/launch/ref_data.launch b/kgpkubs_launch/launch/ref_data.launch new file mode 100644 index 00000000..95f7933c --- /dev/null +++ b/kgpkubs_launch/launch/ref_data.launch @@ -0,0 +1,10 @@ + + + + + + + + + + From 34289820d4f1f4c8fd50b137e0e93059b2936974 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:58:22 +0530 Subject: [PATCH 09/18] Add files via upload --- krssg_ssl_msgs/msg/Originator.msg | 2 ++ krssg_ssl_msgs/msg/Ref.msg | 12 ++++++++++++ krssg_ssl_msgs/msg/game_event.msg | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 krssg_ssl_msgs/msg/Originator.msg create mode 100644 krssg_ssl_msgs/msg/Ref.msg create mode 100644 krssg_ssl_msgs/msg/game_event.msg diff --git a/krssg_ssl_msgs/msg/Originator.msg b/krssg_ssl_msgs/msg/Originator.msg new file mode 100644 index 00000000..597c1553 --- /dev/null +++ b/krssg_ssl_msgs/msg/Originator.msg @@ -0,0 +1,2 @@ +uint8 team +uint32 botId \ No newline at end of file diff --git a/krssg_ssl_msgs/msg/Ref.msg b/krssg_ssl_msgs/msg/Ref.msg new file mode 100644 index 00000000..d03e1c0a --- /dev/null +++ b/krssg_ssl_msgs/msg/Ref.msg @@ -0,0 +1,12 @@ +uint64 packet_timestamp +uint8 stage +int32 stage_time_left +uint8 command +uint32 command_counter +uint64 command_timestamp +team_info yellow +team_info blue +point_2d designated_position +bool blueTeamOnPositiveHalf +game_event gameEvent + \ No newline at end of file diff --git a/krssg_ssl_msgs/msg/game_event.msg b/krssg_ssl_msgs/msg/game_event.msg new file mode 100644 index 00000000..db975e8b --- /dev/null +++ b/krssg_ssl_msgs/msg/game_event.msg @@ -0,0 +1,3 @@ +uint8 gameEventType +Originator originator +string message \ No newline at end of file From bd30adabca9c42e2e78851ab41f33408e9b194b9 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 20:58:57 +0530 Subject: [PATCH 10/18] Add files via upload --- krssg_ssl_msgs/srv/ref_comm.srv | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 krssg_ssl_msgs/srv/ref_comm.srv diff --git a/krssg_ssl_msgs/srv/ref_comm.srv b/krssg_ssl_msgs/srv/ref_comm.srv new file mode 100644 index 00000000..8bbc98e5 --- /dev/null +++ b/krssg_ssl_msgs/srv/ref_comm.srv @@ -0,0 +1,3 @@ +krssg_ssl_msgs/Ref stateA +--- +krssg_ssl_msgs/Ref stateB \ No newline at end of file From 24321781d3f6cf5b9a485c921470bea8a252caa0 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:00:39 +0530 Subject: [PATCH 11/18] Create package.xml --- referee_comm/package.xml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 referee_comm/package.xml diff --git a/referee_comm/package.xml b/referee_comm/package.xml new file mode 100644 index 00000000..e75b50b5 --- /dev/null +++ b/referee_comm/package.xml @@ -0,0 +1,59 @@ + + + referee_comm + 0.0.0 + The referee_comm package + + + + + saurabh + + + + + + TODO + + + + + + + + + + + + + + + + + + + message_generation + + + + message_runtime + + + + catkin + roscpp + rospy + std_msgs + krssg_ssl_msgs + krssg_ssl_msgs + roscpp + rospy + std_msgs + + + + + + + + From 5e5056b5a521fc12cf05b1e88879cffd919771d0 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:02:12 +0530 Subject: [PATCH 12/18] Add files via upload --- referee_comm/CMakeLists.txt | 193 ++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 referee_comm/CMakeLists.txt diff --git a/referee_comm/CMakeLists.txt b/referee_comm/CMakeLists.txt new file mode 100644 index 00000000..3ec2c2be --- /dev/null +++ b/referee_comm/CMakeLists.txt @@ -0,0 +1,193 @@ +cmake_minimum_required(VERSION 2.8.3) +project(referee_comm) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED COMPONENTS + roscpp + rospy + std_msgs +) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +find_package(catkin REQUIRED COMPONENTS + roscpp + rospy + std_msgs + message_generation + krssg_ssl_msgs +) + +##Generate messages in the 'msg' folder + # add_message_files( + # FILES + # ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( + INCLUDE_DIRS include + LIBRARIES referee_comm + CATKIN_DEPENDS roscpp rospy std_msgs + DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +# include_directories(include) +include_directories( + ${catkin_INCLUDE_DIRS} +) + +## Declare a cpp library +# add_library(referee_comm +# src/${PROJECT_NAME}/referee_comm.cpp +# ) + +## Declare a cpp executable +# add_executable(referee_comm_node src/referee_comm_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(referee_comm_node referee_comm_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +# target_link_libraries(referee_comm_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS referee_comm referee_comm_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_referee_comm.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) +#set(libs) +set(QT_USE_QTNETWORK TRUE) +find_package(Qt REQUIRED) +include(${QT_USE_FILE}) +list(APPEND libs ${QT_LIBRARIES}) + +find_package(Protobuf REQUIRED) +protobuf_generate_cpp(PROTO_CPP PROTO_H + include/proto/ssl_game_controller_auto_ref.proto + include/proto/ssl_game_controller_common.proto + include/proto/ssl_game_controller_team.proto + include/proto/ssl_game_event.proto + include/proto/ssl_game_event_2019.proto + include/proto/ssl_referee.proto +) + +set(src + src/netraw.cpp + src/robocup_ssl_client.cpp +) +#Including proto files +include_directories(include ${catkin_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIRS}) +include_directories(${CMAKE_BINARY_DIR}/${PROJECT_NAME}) + + +add_executable(ref_data src/referee_node.cpp ${src} ${PROTO_CPP} ${PROTO_H}) +target_link_libraries(ref_data ${catkin_LIBRARIES} ${PROTOBUF_LIBRARIES} ${QT_LIBRARIES}) +add_dependencies(ref_data grsim_comm_generate_messages_cpp) \ No newline at end of file From f6cfd8f0fa5336da20fcdc0aa127c7b5da09d559 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:03:38 +0530 Subject: [PATCH 13/18] Create util.h --- referee_comm/include/util.h | 556 ++++++++++++++++++++++++++++++++++++ 1 file changed, 556 insertions(+) create mode 100644 referee_comm/include/util.h diff --git a/referee_comm/include/util.h b/referee_comm/include/util.h new file mode 100644 index 00000000..34cf0dcd --- /dev/null +++ b/referee_comm/include/util.h @@ -0,0 +1,556 @@ +//======================================================================== +// This software is free: you can redistribute it and/or modify +// it under the terms of the GNU General Public License Version 3, +// as published by the Free Software Foundation. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// Version 3 in the file COPYING that came with this distribution. +// If not, see . +//======================================================================== +/*! + \file util.h + \brief Numerical utility functions + \author James R. Bruce, (C) 1999-2002 +*/ +//======================================================================== + +#ifndef __UTIL_H__ +#define __UTIL_H__ + +#include +#include +#include + +// UnusedVar can suppress gcc warnings about unused variables. +// MustCheckReturn lets a function emit a warning if its return value +// isn't used +#if __GNUC__ >= 3 +# define UnusedVar __attribute__((unused)) +# define MustUseResult __attribute__((warn_unused_result)) +#else +# define UnusedVar +# define MustUseResult +#endif + +// This seems to be missing from some systems +#ifndef M_2PI +#define M_2PI 6.28318530717958647693 +#endif + +using std::sort; + +#if 1 + +using std::min; +using std::max; +using std::swap; + +#else +template +inline num max(num a,num b) +{ + return((a > b)? a : b); +} + +template +inline num min(num a,num b) +{ + return((a < b)? a : b); +} + +template +inline void swap(data &a,data &b) +{ + data t; + t = a; + a = b; + b = t; +} +#endif + +template +inline num1 bound(num1 x,num2 low,num2 high) MustUseResult; + +template +inline num1 bound(num1 x,num2 low,num2 high) +{ + if(x < low ) x = low; + if(x > high) x = high; + return(x); +} + +template +inline num1 abs_bound(num1 x,num2 range) MustUseResult; + +template +inline num1 abs_bound(num1 x,num2 range) +// bound absolute value x in [-range,range] +{ + if(x < -range) x = -range; + if(x > range) x = range; + return(x); +} + +template +inline num abs_max(num a,num b) +{ + return((fabs(a) > fabs(b))? a : b); +} + +template +inline num abs_min(num a,num b) +{ + return((fabs(a) < fabs(b))? a : b); +} + +template +inline num max3(num a,num b,num c) +{ + if(a > b){ + return((a > c)? a : c); + }else{ + return((b > c)? b : c); + } +} + +template +inline num min3(num a,num b,num c) +{ + if(a < b){ + return((a < c)? a : c); + }else{ + return((b < c)? b : c); + } +} + +template +inline num max4(num a,num b,num c,num d) +{ + num x,y; + x = max(a,b); + y = max(c,d); + return(max(x,y)); +} + +template +inline num min4(num a,num b,num c,num d) +{ + num x,y; + x = min(a,b); + y = min(c,d); + return(min(x,y)); +} + +template +inline num max_abs(num a,num b) +{ + return((fabs(a) > fabs(b))? a : b); +} + +template +inline num min_abs(num a,num b) +{ + return((fabs(a) < fabs(b))? a : b); +} + +template +inline int max_idx(data_t *arr,int num) +{ + int mi = 0; + for(int i=1; i arr[mi]) mi = i; + } + return(mi); +} + +template +inline int min_idx(data_t *arr,int num) +{ + int mi = 0; + for(int i=1; i +inline void sort(num &a,num &b,num &c) +{ + if(a > b) swap(a,b); + if(b > c) swap(b,c); + if(a > b) swap(a,b); +} + +template +inline bool take_min(num &base,num val) +{ + if(val < base){ + base = val; + return(true); + }else{ + return(false); + } +} + +template +inline bool take_max(num &base,num val) +{ + if(val > base){ + base = val; + return(true); + }else{ + return(false); + } +} + +template +real sq(real x) MustUseResult; + +template +real sq(real x) +{ + return(x * x); +} + +template +real cube(real x) MustUseResult; + +template +real cube(real x) +{ + return(x * x * x); +} + +template +num sign_nz(num x) +{ + return((x >= 0)? 1 : -1); +} + +template +num sign_eq(num a,num b) +{ + return((a >= 0) == (b >= 0)); +} + +template +num sign(num x) +{ + return((x >= 0)? (x > 0) : -1); +} + +template +void toggle(bool_t &b) +{ + b = !b; +} + +template +bool one_bit_set(num n) +// returns true if num has only one bit set, i.e. n=2^k for some integer k +{ + return(n!=0 && ((-n) & n) == n); +} + +template +num gcd(num x,num y) +// returns greatest common divisor of x,y +// NOTE: untested +{ + int w; + while (y != 0) { + w = x % y; + x = y; + y = w; + } + return x; +} + +template +num lcm(num x,num y) +// returns least common multiple of x,y +// NOTE: untested +{ + num d = gcd(x,y); + num r = (x / d) * (y / d); + // num r = (x * y) / d; // faster but more likely to overflow + return(r); +} + +template +num mod(num x,num m) +// returns x mod m, where x e [0,m-1] +// note this is different from %, which can return negative numbers +{ + return(((x % m) + m) % m); +} + +template +real fmodt(real x,real m) +// Does a real modulus the *right* way, using +// truncation instead of round to zero. +{ + return(x - floor(x / m)*m); +} + +template +real ramp(real x,real x0,real x1) +// linear ramp from f(x0)=0 to f(x1)=1, with output bounded to [0,1] +// returns f(x) +{ + if(x < x0) return(0); + if(x > x1) return(1); + return((x - x0) / (x1 - x0)); +} + +template +real ramp(real x, real x0,real y0, real x1,real y1) +// linear ramp from f(x0)=y0 to f(x1)=y1, with output bounded to [y0,y1] +// returns f(x) +{ + if(x < x0) return(y0); + if(x > x1) return(y1); + return(y0 + (y1 - y0) * (x - x0) / (x1 - x0)); +} + +template +num bool_sat_count(num cnt,num2 min,num2 max,bool val) +// Saturating counter of a boolean value, clipped to the range +// [min,max]. True values increment the counter (up to max), while +// false values decrement the counter (down to min). +{ + if(val){ + return((cnt < max)? cnt+1 : max); + }else{ + return((cnt > min)? cnt-1 : min); + } +} + +//==== Bitwise Utilities =============================================// + +template +bool all_bits_set(num1 x,num2 m) +// returns true if all set bits in are present in +{ + return((x & m) == m); +} + +template +bool any_bits_set(num1 x,num2 m) +// returns true if any set bits in are present in +{ + return((x & m) != 0); +} + +//==== Angle Utilities ===============================================// + +template +real angle_mod(real angle) MustUseResult; + +// Returns angle within [-PI,PI] +template +real angle_mod(real angle) +{ + angle -= M_2PI * rint(angle / M_2PI); + + return(angle); +} + +// Returns the secondary angle x such that PI <= fabs(x) <= 2PI +template +real angle_long(real angle) +{ + if (angle < 0.0) { + return M_2PI + angle; + } else { + return -M_2PI + angle; + } +} + +// Returns angle within [0,2*PI] +template +real angle_pos(real angle) +{ + return(fmod(angle+M_2PI,M_2PI)); +} + +// Returns difference of two angles (a-b), within [-PI,PI] +template +real angle_diff(real a,real b) +{ + real d; + + d = a - b; + d -= M_2PI * rint(d / M_2PI); + + return(d); +} + +// Returns absolute angular distance between two angles +template +real angle_dist(real a,real b) +{ + return(fabs(angle_mod(a-b))); +} + +// return the normalized angle halfway between these two +// assumes the arguments are already normalized to (-M_PI, M_PI]. +template +real avg_angle(real left,real right) +{ + real result; + + if(left < right) left += 2*M_PI; + result = (left + right)/2; + if(result > M_PI) result -= 2*M_PI; + + return(result); +} + +template +real abs_bound_angle(real bound_angle,real tolerance,real a) MustUseResult; + +// bound angle to interval [bound_angle-tolerance, bound_angle+tolerance] +// does the appropriate normalization of angles as long as +// is below M_PI. +template +real abs_bound_angle(real bound_angle,real tolerance,real a) +{ + real x = angle_mod(a - bound_angle); + x = abs_bound(x,tolerance); + return(angle_mod(x + bound_angle)); +} + +//==== Array Functions ===============================================// + +template +int find_item(const data *arr,int num,data key) +{ + int i = 0; + while(i +data *alloc_array(data *arr,num &size,num new_size) MustUseResult; + +template +data *alloc_array(data *arr,num &size,num new_size) +{ + if((arr!=NULL && new_size==size) || + (arr==NULL && new_size==0)) return(arr); + + delete[](arr); + arr = new data[new_size]; + size = (arr != NULL)? new_size : 0; + return(arr); +} + +template +data *resize_array(data *arr,num &size,num new_size,num cur_used) +{ + if((arr!=NULL && new_size==size) || + (arr==NULL && new_size==0)) return(arr); + + data *narr = new data[new_size]; + if(narr){ + // copy existing data + for(num i=0; i +void free_array(data *&arr,num &size) +{ + delete[](arr); + arr = NULL; + size = 0; +} + +template +data *alloc_array2(data *arr,num &w,num &h, + int new_w,int new_h) MustUseResult; + +template +data *alloc_array2(data *arr,num &w,num &h, + int new_w,int new_h) +{ + int size = w * h; + int new_size = new_w * new_h; + + if((arr!=NULL && new_size==size) || + (arr==NULL && new_size==0)) return(arr); + + delete[](arr); + arr = new data[new_size]; + if(arr){ + w = new_w; + h = new_h; + }else{ + w = h = 0; + } + + return(arr); +} + +template +void set_range(data *arr,int start,int num,const data &val) +{ + num += start; + for(int i=start; i +inline int mcopy(data *dest,data *src,int num) +{ + int i; + + for(i=0; i +inline data mset(data *dest,data val,int num) +{ + int i; + + for(i=0; i +inline void mzero(data &d) +{ + memset(&d,0,sizeof(d)); +} + +template +inline void mzero(data *d,int n) +{ + memset(d,0,sizeof(data)*n); +} + +#if __GNUC__ >= 3 +# define likely(x) __builtin_expect(!!(x),1) +# define unlikely(x) __builtin_expect(!!(x),0) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif + +#endif From 73c7cc37ea234104da15c01c1afbd6a04777a2ff Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:04:02 +0530 Subject: [PATCH 14/18] Add files via upload --- referee_comm/include/netraw.h | 83 +++++++ referee_comm/include/robocup_ssl_client.h | 54 +++++ referee_comm/include/timer.h | 250 ++++++++++++++++++++++ 3 files changed, 387 insertions(+) create mode 100644 referee_comm/include/netraw.h create mode 100644 referee_comm/include/robocup_ssl_client.h create mode 100644 referee_comm/include/timer.h diff --git a/referee_comm/include/netraw.h b/referee_comm/include/netraw.h new file mode 100644 index 00000000..208692bf --- /dev/null +++ b/referee_comm/include/netraw.h @@ -0,0 +1,83 @@ +#ifndef _INCLUDED_NETRAW_H_ +#define _INCLUDED_NETRAW_H_ + +#include +#include +#include +#include + +#include +#include + +namespace Net{ + +//====================================================================// +// Net::Address: Network address class +// (C) James Bruce +//====================================================================// + +class Address{ + sockaddr addr; + socklen_t addr_len; +public: + Address() + {memset(&addr,0,sizeof(addr)); addr_len=0;} + Address(const Address &src) + {copy(src);} + ~Address() + {reset();} + + bool setHost(const char *hostname,int port); + void setAny(int port=0); + + bool operator==(const Address &a) const + {return(addr_len==a.addr_len && memcmp(&addr,&a.addr,addr_len)==0);} + void copy(const Address &src) + {memcpy(&addr,&src.addr,src.addr_len); addr_len=src.addr_len;} + void reset() + {memset(&addr,0,sizeof(addr)); addr_len=0;} + void clear() + {reset();} + + in_addr_t getInAddr() const; + + void print(FILE *out = stdout) const; + + friend class UDP; +}; + +//====================================================================// +// Net::UDP: Simple raw UDP messaging +// (C) James Bruce +//====================================================================// + +class UDP { + int fd; +public: + unsigned sent_packets; + unsigned sent_bytes; + unsigned recv_packets; + unsigned recv_bytes; +public: + UDP() {fd=-1; close();} + ~UDP() {close();} + + bool open(int port = 0, bool share_port_for_multicasting=false, bool multicast_include_localhost=false, bool blocking=false); + bool addMulticast(const Address &multiaddr,const Address &interface); + void close(); + bool isOpen() const + {return(fd >= 0);} + + bool send(const void *data,int length,const Address &dest); + int recv(void *data,int length,Address &src); + bool wait(int timeout_ms = -1) const; + bool havePendingData() const + {return(wait(0));} + + int getFd() const + {return(fd);} +}; + +}; // namespace Net + +#endif diff --git a/referee_comm/include/robocup_ssl_client.h b/referee_comm/include/robocup_ssl_client.h new file mode 100644 index 00000000..9f4f81b4 --- /dev/null +++ b/referee_comm/include/robocup_ssl_client.h @@ -0,0 +1,54 @@ +//======================================================================== +// This software is free: you can redistribute it and/or modify +// it under the terms of the GNU General Public License Version 3, +// as published by the Free Software Foundation. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// Version 3 in the file COPYING that came with this distribution. +// If not, see . +//======================================================================== +/*! + \file robocup_ssl_client.h + \brief C++ Interface: robocup_ssl_client + \author Stefan Zickler, 2009 +*/ +//======================================================================== +#ifndef ROBOCUP_SSL_CLIENT_H +#define ROBOCUP_SSL_CLIENT_H +#include "netraw.h" +#include +#include +#include "ssl_referee.pb.h" +using namespace std; +/** + @author Author Name +*/ + +class RoboCupSSLClient{ +protected: + // static const int MaxDataGramSize = 65536; + static const int MaxDataGramSize = 1024; + char * in_buffer; + Net::UDP mc; // multicast client + QMutex mutex; + int _port; + string _net_address; + string _net_interface; +public: + RoboCupSSLClient(int port = 10003, + string net_ref_address="224.5.23.1", + string net_ref_interface=""); + + ~RoboCupSSLClient(); + bool open(bool blocking=false); + void close(); + bool receive(Referee & packet); + +}; + +#endif diff --git a/referee_comm/include/timer.h b/referee_comm/include/timer.h new file mode 100644 index 00000000..e618c9d8 --- /dev/null +++ b/referee_comm/include/timer.h @@ -0,0 +1,250 @@ +//======================================================================== +// This software is free: you can redistribute it and/or modify +// it under the terms of the GNU General Public License Version 3, +// as published by the Free Software Foundation. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// Version 3 in the file COPYING that came with this distribution. +// If not, see . +//======================================================================== + +/*! + + \file timer.h + \brief Interval timers, cycle counters, and time utilities + \author James R. Bruce, (C) 1999-2002 +*/ +//======================================================================== + +#ifndef __TIMER_H__ +#define __TIMER_H__ + +#include +#include +#include +#include +#include + +#include +#include + + +/*! + \class Timer + \brief a basic timer class + \author James R. Bruce, (C) 1999-2002 +*/ +class Timer{ + timeval tv1,tv2; +public: + void start() {gettimeofday(&tv1,NULL);} + void stop() {gettimeofday(&tv2,NULL);} + void end() {stop();} + double time() {return((tv2.tv_sec - tv1.tv_sec) + + (tv2.tv_usec - tv1.tv_usec) * 1.0E-6);} + double timeMSec() {return(time() * 1.0E3);} + double timeUSec() {return(time() * 1.0E6);} + + double interval(){ + double t; + gettimeofday(&tv2,NULL); + t = time(); + tv1 = tv2; + return(t); + } + double midtime() { + timeval tmp; + gettimeofday(&tmp,NULL); + return((tmp.tv_sec - tv1.tv_sec) + + (tmp.tv_usec - tv1.tv_usec) * 1.0E-6); + } +}; + + +/*! + \class AccumulativeTimer + \brief a basic timer class + \author James R. Bruce, (C) 1999-2002 +*/ +class AccumulativeTimer{ + timeval tv1,tv2; + double total; +public: + AccumulativeTimer() { + clear(); + } + void clear() { + total=0.0; + } + void start() {gettimeofday(&tv1,NULL);} + void stop() { + gettimeofday(&tv2,NULL); + total+=time(); + } + double getTotal() { + return total; + } + void end() {stop();} + double time() {return((tv2.tv_sec - tv1.tv_sec) + + (tv2.tv_usec - tv1.tv_usec) * 1.0E-6);} + double timeMSec() {return(time() * 1.0E3);} + double timeUSec() {return(time() * 1.0E6);} + + double interval(){ + double t; + gettimeofday(&tv2,NULL); + t = time(); + tv1 = tv2; + return(t); + } + double midtime() { + timeval tmp; + gettimeofday(&tmp,NULL); + return((tmp.tv_sec - tv1.tv_sec) + + (tmp.tv_usec - tv1.tv_usec) * 1.0E-6); + } +}; + +typedef uint32_t cycle_t; +typedef uint64_t cycle64_t; + +// Access clock cycle counter on i386 compatibles +#ifdef __i386__ + +#define get_cycle(cnt) \ + __asm__ __volatile__("rdtsc" : "=a" (cnt) : : "edx") + +#define get_cycle64(cnt) \ + __asm__ __volatile__("rdtsc" : "=A" (cnt)) + +#endif + +#ifdef __x86_64__ + +#define get_cycle(cnt) \ + __asm__ __volatile__("rdtsc" : "=A" (cnt)) + +#define get_cycle64(cnt) \ + __asm__ __volatile__("rdtsc" : "=A" (cnt)) + +#endif + + +// The following is untested +#ifdef Apertos +#define get_cycle(cp0r9) \ + __asm__ __volatile__("mfc0 %0, $9" :: "=r" (cp0r9)); +#endif + +inline unsigned GetTimeUSec() +{ +#ifdef Apertos + struct SystemTime time; + GetSystemTime(&time); + return(time.seconds*1000000 + time.useconds); +#else + timeval tv; + gettimeofday(&tv,NULL); + return(tv.tv_sec*1000000 + tv.tv_usec); +#endif +} + +inline double GetTimeSec() +{ +#ifdef Apertos + struct SystemTime time; + GetSystemTime(&time); + return((double)time.seconds + time.useconds*(1.0E-6)); +#else + timeval tv; + gettimeofday(&tv,NULL); + return((double)tv.tv_sec + tv.tv_usec*(1.0E-6)); +#endif +} + +inline void GetDate(struct tm &date) +{ + time_t t = time(NULL); + localtime_r(&t,&date); +} + +// returns CPU clock rate in MHz +double GetCPUClockRateMHz(); + +// returns CPU clock period in sec +double GetCPUClockPeriod(); + + +class CycleTimer{ + cycle_t c1,c2; + static double cpu_period; +public: + CycleTimer() {cpu_period=GetCPUClockPeriod();} + + void start() {get_cycle(c1);} + void stop() {get_cycle(c2);} + void end() {stop();} + + unsigned cycles() {return(c2 - c1);} + double time() {return((double)(c2-c1) * cpu_period * 1.0E0);} + double timeMSec() {return((double)(c2-c1) * cpu_period * 1.0E3);} + double timeUSec() {return((double)(c2-c1) * cpu_period * 1.0E6);} +}; + +template +class StageCycleTimer{ + cycle_t c[num+1]; + unsigned n; +public: + void start() + {n=0; get_cycle(c[n]);} + void stage() + {if(n +void StageCycleTimer::print(FILE *out) +{ + if(num){ + cycle_t tot = c[n] - c[0]; + for(unsigned i=0; i Date: Sat, 29 Feb 2020 21:04:52 +0530 Subject: [PATCH 15/18] Create ssl_referee.proto --- referee_comm/include/proto/ssl_referee.proto | 204 +++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 referee_comm/include/proto/ssl_referee.proto diff --git a/referee_comm/include/proto/ssl_referee.proto b/referee_comm/include/proto/ssl_referee.proto new file mode 100644 index 00000000..c1a7cd69 --- /dev/null +++ b/referee_comm/include/proto/ssl_referee.proto @@ -0,0 +1,204 @@ +syntax = "proto2"; + +import "ssl_game_event.proto"; +import "ssl_game_event_2019.proto"; + +// Each UDP packet contains one of these messages. +message Referee { + // The UNIX timestamp when the packet was sent, in microseconds. + // Divide by 1,000,000 to get a time_t. + required uint64 packet_timestamp = 1; + + // These are the "coarse" stages of the game. + enum Stage { + // The first half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_FIRST_HALF_PRE = 0; + // The first half of the normal game, before half time. + NORMAL_FIRST_HALF = 1; + // Half time between first and second halves. + NORMAL_HALF_TIME = 2; + // The second half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_SECOND_HALF_PRE = 3; + // The second half of the normal game, after half time. + NORMAL_SECOND_HALF = 4; + // The break before extra time. + EXTRA_TIME_BREAK = 5; + // The first half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_FIRST_HALF_PRE = 6; + // The first half of extra time. + EXTRA_FIRST_HALF = 7; + // Half time between first and second extra halves. + EXTRA_HALF_TIME = 8; + // The second half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_SECOND_HALF_PRE = 9; + // The second half of extra time. + EXTRA_SECOND_HALF = 10; + // The break before penalty shootout. + PENALTY_SHOOTOUT_BREAK = 11; + // The penalty shootout. + PENALTY_SHOOTOUT = 12; + // The game is over. + POST_GAME = 13; + } + required Stage stage = 2; + + // The number of microseconds left in the stage. + // The following stages have this value; the rest do not: + // NORMAL_FIRST_HALF + // NORMAL_HALF_TIME + // NORMAL_SECOND_HALF + // EXTRA_TIME_BREAK + // EXTRA_FIRST_HALF + // EXTRA_HALF_TIME + // EXTRA_SECOND_HALF + // PENALTY_SHOOTOUT_BREAK + // + // If the stage runs over its specified time, this value + // becomes negative. + optional sint32 stage_time_left = 3; + + // These are the "fine" states of play on the field. + enum Command { + // All robots should completely stop moving. + HALT = 0; + // Robots must keep 50 cm from the ball. + STOP = 1; + // A prepared kickoff or penalty may now be taken. + NORMAL_START = 2; + // The ball is dropped and free for either team. + FORCE_START = 3; + // The yellow team may move into kickoff position. + PREPARE_KICKOFF_YELLOW = 4; + // The blue team may move into kickoff position. + PREPARE_KICKOFF_BLUE = 5; + // The yellow team may move into penalty position. + PREPARE_PENALTY_YELLOW = 6; + // The blue team may move into penalty position. + PREPARE_PENALTY_BLUE = 7; + // The yellow team may take a direct free kick. + DIRECT_FREE_YELLOW = 8; + // The blue team may take a direct free kick. + DIRECT_FREE_BLUE = 9; + // The yellow team may take an indirect free kick. + INDIRECT_FREE_YELLOW = 10; + // The blue team may take an indirect free kick. + INDIRECT_FREE_BLUE = 11; + // The yellow team is currently in a timeout. + TIMEOUT_YELLOW = 12; + // The blue team is currently in a timeout. + TIMEOUT_BLUE = 13; + // The yellow team just scored a goal. + // For information only. + // For rules compliance, teams must treat as STOP. + // Deprecated: Use the score field from the team infos instead. That way, you can also detect revoked goals. + GOAL_YELLOW = 14 [deprecated = true]; + // The blue team just scored a goal. See also GOAL_YELLOW. + GOAL_BLUE = 15 [deprecated = true]; + // Equivalent to STOP, but the yellow team must pick up the ball and + // drop it in the Designated Position. + BALL_PLACEMENT_YELLOW = 16; + // Equivalent to STOP, but the blue team must pick up the ball and drop + // it in the Designated Position. + BALL_PLACEMENT_BLUE = 17; + } + required Command command = 4; + + // The number of commands issued since startup (mod 2^32). + required uint32 command_counter = 5; + + // The UNIX timestamp when the command was issued, in microseconds. + // This value changes only when a new command is issued, not on each packet. + required uint64 command_timestamp = 6; + + // Information about a single team. + message TeamInfo { + // The team's name (empty string if operator has not typed anything). + required string name = 1; + // The number of goals scored by the team during normal play and overtime. + required uint32 score = 2; + // The number of red cards issued to the team since the beginning of the game. + required uint32 red_cards = 3; + // The amount of time (in microseconds) left on each yellow card issued to the team. + // If no yellow cards are issued, this array has no elements. + // Otherwise, times are ordered from smallest to largest. + repeated uint32 yellow_card_times = 4 [packed = true]; + // The total number of yellow cards ever issued to the team. + required uint32 yellow_cards = 5; + // The number of timeouts this team can still call. + // If in a timeout right now, that timeout is excluded. + required uint32 timeouts = 6; + // The number of microseconds of timeout this team can use. + required uint32 timeout_time = 7; + // The pattern number of this team's goalkeeper. + required uint32 goalkeeper = 8; + // The total number of countable fouls that act towards yellow cards + optional uint32 foul_counter = 9; + // The number of consecutive ball placement failures of this team + optional uint32 ball_placement_failures = 10; + // Indicate if the team is able and allowed to place the ball + optional bool can_place_ball = 12; + // The maximum number of bots allowed on the field based on division and cards + optional uint32 max_allowed_bots = 13; + // The team has submitted an intent to substitute one or more robots at the next chance + optional bool bot_substitution_intent = 14; + } + + // Information about the two teams. + required TeamInfo yellow = 7; + required TeamInfo blue = 8; + + // The coordinates of the Designated Position. These are measured in + // millimetres and correspond to SSL-Vision coordinates. These fields are + // always either both present (in the case of a ball placement command) or + // both absent (in the case of any other command). + message Point { + required float x = 1; + required float y = 2; + } + optional Point designated_position = 9; + + // Information about the direction of play. + // True, if the blue team will have it's goal on the positive x-axis of the ssl-vision coordinate system. + // Obviously, the yellow team will play on the opposite half. + optional bool blue_team_on_positive_half = 10; + + // The game event that caused the referee command. + // deprecated in favor of game_events. + optional Game_Event game_event = 11 [deprecated = true]; + + // The command that will be issued after the current stoppage and ball placement to continue the game. + optional Command next_command = 12; + + // All game events that were detected since the last RUNNING state. + // Will be cleared as soon as the game is continued. + repeated GameEvent game_events = 13; + + // All non-finished proposed game events that may be processed next. + repeated ProposedGameEvent proposed_game_events = 14; + + // The time in microseconds that is remaining until the current action times out + // The time will not be reset. It can get negative. + // An autoRef would raise an appropriate event, if the time gets negative. + // Possible actions where this time is relevant: + // * free kicks + // * kickoff, penalty kick, force start + // * ball placement + optional int32 current_action_time_remaining = 15; +} + +message ProposedGameEvent { + // The UNIX timestamp when the game event proposal will time out, in microseconds. + required uint64 valid_until = 1; + // The identifier of the proposer. + required string proposer_id = 2; + // The proposed game event. + required GameEvent game_event = 3; +} From 5f1804123d9f5af9ffbba9ba48cbe41e2b7cd80f Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:05:33 +0530 Subject: [PATCH 16/18] Add files via upload --- referee_comm/include/proto/generateProto.sh | 4 + .../proto/ssl_game_controller_auto_ref.pb.go | 410 +++ .../proto/ssl_game_controller_auto_ref.proto | 55 + .../proto/ssl_game_controller_common.pb.go | 481 +++ .../proto/ssl_game_controller_common.proto | 72 + .../proto/ssl_game_controller_team.pb.go | 490 +++ .../proto/ssl_game_controller_team.proto | 74 + .../include/proto/ssl_game_event.pb.go | 347 ++ .../include/proto/ssl_game_event.proto | 100 + .../include/proto/ssl_game_event_2019.pb.go | 3165 +++++++++++++++++ .../include/proto/ssl_game_event_2019.proto | 457 +++ referee_comm/include/proto/ssl_referee.pb.go | 767 ++++ 12 files changed, 6422 insertions(+) create mode 100644 referee_comm/include/proto/generateProto.sh create mode 100644 referee_comm/include/proto/ssl_game_controller_auto_ref.pb.go create mode 100644 referee_comm/include/proto/ssl_game_controller_auto_ref.proto create mode 100644 referee_comm/include/proto/ssl_game_controller_common.pb.go create mode 100644 referee_comm/include/proto/ssl_game_controller_common.proto create mode 100644 referee_comm/include/proto/ssl_game_controller_team.pb.go create mode 100644 referee_comm/include/proto/ssl_game_controller_team.proto create mode 100644 referee_comm/include/proto/ssl_game_event.pb.go create mode 100644 referee_comm/include/proto/ssl_game_event.proto create mode 100644 referee_comm/include/proto/ssl_game_event_2019.pb.go create mode 100644 referee_comm/include/proto/ssl_game_event_2019.proto create mode 100644 referee_comm/include/proto/ssl_referee.pb.go diff --git a/referee_comm/include/proto/generateProto.sh b/referee_comm/include/proto/generateProto.sh new file mode 100644 index 00000000..4652d86c --- /dev/null +++ b/referee_comm/include/proto/generateProto.sh @@ -0,0 +1,4 @@ +#!/bin/sh +go get -u github.com/golang/protobuf/protoc-gen-go + +protoc --go_out=import_path=refproto:. *.proto \ No newline at end of file diff --git a/referee_comm/include/proto/ssl_game_controller_auto_ref.pb.go b/referee_comm/include/proto/ssl_game_controller_auto_ref.pb.go new file mode 100644 index 00000000..01617a5c --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_auto_ref.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_game_controller_auto_ref.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// AutoRefRegistration is the first message that a client must send to the controller to identify itself +type AutoRefRegistration struct { + // identifier is a unique name of the client + Identifier *string `protobuf:"bytes,1,req,name=identifier" json:"identifier,omitempty"` + // signature can optionally be specified to enable secure communication + Signature *Signature `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AutoRefRegistration) Reset() { *m = AutoRefRegistration{} } +func (m *AutoRefRegistration) String() string { return proto.CompactTextString(m) } +func (*AutoRefRegistration) ProtoMessage() {} +func (*AutoRefRegistration) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{0} +} + +func (m *AutoRefRegistration) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoRefRegistration.Unmarshal(m, b) +} +func (m *AutoRefRegistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoRefRegistration.Marshal(b, m, deterministic) +} +func (m *AutoRefRegistration) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoRefRegistration.Merge(m, src) +} +func (m *AutoRefRegistration) XXX_Size() int { + return xxx_messageInfo_AutoRefRegistration.Size(m) +} +func (m *AutoRefRegistration) XXX_DiscardUnknown() { + xxx_messageInfo_AutoRefRegistration.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoRefRegistration proto.InternalMessageInfo + +func (m *AutoRefRegistration) GetIdentifier() string { + if m != nil && m.Identifier != nil { + return *m.Identifier + } + return "" +} + +func (m *AutoRefRegistration) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +// AutoRefToController is the wrapper message for all subsequent messages from the autoRef to the controller +type AutoRefToController struct { + // signature can optionally be specified to enable secure communication + Signature *Signature `protobuf:"bytes,1,opt,name=signature" json:"signature,omitempty"` + // game_event is an optional event that the autoRef detected during the game + GameEvent *GameEvent `protobuf:"bytes,2,opt,name=game_event,json=gameEvent" json:"game_event,omitempty"` + // auto_ref_message is an optional message that describes the current state or situation of the game/autoRef + // it is not and never was processed by the GC and is this marked deprecated + AutoRefMessage *AutoRefMessage `protobuf:"bytes,3,opt,name=auto_ref_message,json=autoRefMessage" json:"auto_ref_message,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AutoRefToController) Reset() { *m = AutoRefToController{} } +func (m *AutoRefToController) String() string { return proto.CompactTextString(m) } +func (*AutoRefToController) ProtoMessage() {} +func (*AutoRefToController) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{1} +} + +func (m *AutoRefToController) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoRefToController.Unmarshal(m, b) +} +func (m *AutoRefToController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoRefToController.Marshal(b, m, deterministic) +} +func (m *AutoRefToController) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoRefToController.Merge(m, src) +} +func (m *AutoRefToController) XXX_Size() int { + return xxx_messageInfo_AutoRefToController.Size(m) +} +func (m *AutoRefToController) XXX_DiscardUnknown() { + xxx_messageInfo_AutoRefToController.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoRefToController proto.InternalMessageInfo + +func (m *AutoRefToController) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +func (m *AutoRefToController) GetGameEvent() *GameEvent { + if m != nil { + return m.GameEvent + } + return nil +} + +// Deprecated: Do not use. +func (m *AutoRefToController) GetAutoRefMessage() *AutoRefMessage { + if m != nil { + return m.AutoRefMessage + } + return nil +} + +// ControllerToAutoRef is the wrapper message for all messages from controller to autoRef +type ControllerToAutoRef struct { + // Types that are valid to be assigned to Msg: + // *ControllerToAutoRef_ControllerReply + Msg isControllerToAutoRef_Msg `protobuf_oneof:"msg"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ControllerToAutoRef) Reset() { *m = ControllerToAutoRef{} } +func (m *ControllerToAutoRef) String() string { return proto.CompactTextString(m) } +func (*ControllerToAutoRef) ProtoMessage() {} +func (*ControllerToAutoRef) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{2} +} + +func (m *ControllerToAutoRef) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ControllerToAutoRef.Unmarshal(m, b) +} +func (m *ControllerToAutoRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ControllerToAutoRef.Marshal(b, m, deterministic) +} +func (m *ControllerToAutoRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControllerToAutoRef.Merge(m, src) +} +func (m *ControllerToAutoRef) XXX_Size() int { + return xxx_messageInfo_ControllerToAutoRef.Size(m) +} +func (m *ControllerToAutoRef) XXX_DiscardUnknown() { + xxx_messageInfo_ControllerToAutoRef.DiscardUnknown(m) +} + +var xxx_messageInfo_ControllerToAutoRef proto.InternalMessageInfo + +type isControllerToAutoRef_Msg interface { + isControllerToAutoRef_Msg() +} + +type ControllerToAutoRef_ControllerReply struct { + ControllerReply *ControllerReply `protobuf:"bytes,1,opt,name=controller_reply,json=controllerReply,oneof"` +} + +func (*ControllerToAutoRef_ControllerReply) isControllerToAutoRef_Msg() {} + +func (m *ControllerToAutoRef) GetMsg() isControllerToAutoRef_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (m *ControllerToAutoRef) GetControllerReply() *ControllerReply { + if x, ok := m.GetMsg().(*ControllerToAutoRef_ControllerReply); ok { + return x.ControllerReply + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ControllerToAutoRef) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ControllerToAutoRef_ControllerReply)(nil), + } +} + +// a message from autoRef, describing the current state or situation +type AutoRefMessage struct { + // Types that are valid to be assigned to Message: + // *AutoRefMessage_Custom + // *AutoRefMessage_WaitForBots_ + Message isAutoRefMessage_Message `protobuf_oneof:"message"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AutoRefMessage) Reset() { *m = AutoRefMessage{} } +func (m *AutoRefMessage) String() string { return proto.CompactTextString(m) } +func (*AutoRefMessage) ProtoMessage() {} +func (*AutoRefMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{3} +} + +func (m *AutoRefMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoRefMessage.Unmarshal(m, b) +} +func (m *AutoRefMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoRefMessage.Marshal(b, m, deterministic) +} +func (m *AutoRefMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoRefMessage.Merge(m, src) +} +func (m *AutoRefMessage) XXX_Size() int { + return xxx_messageInfo_AutoRefMessage.Size(m) +} +func (m *AutoRefMessage) XXX_DiscardUnknown() { + xxx_messageInfo_AutoRefMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoRefMessage proto.InternalMessageInfo + +type isAutoRefMessage_Message interface { + isAutoRefMessage_Message() +} + +type AutoRefMessage_Custom struct { + Custom string `protobuf:"bytes,1,opt,name=custom,oneof"` +} + +type AutoRefMessage_WaitForBots_ struct { + WaitForBots *AutoRefMessage_WaitForBots `protobuf:"bytes,2,opt,name=wait_for_bots,json=waitForBots,oneof"` +} + +func (*AutoRefMessage_Custom) isAutoRefMessage_Message() {} + +func (*AutoRefMessage_WaitForBots_) isAutoRefMessage_Message() {} + +func (m *AutoRefMessage) GetMessage() isAutoRefMessage_Message { + if m != nil { + return m.Message + } + return nil +} + +func (m *AutoRefMessage) GetCustom() string { + if x, ok := m.GetMessage().(*AutoRefMessage_Custom); ok { + return x.Custom + } + return "" +} + +func (m *AutoRefMessage) GetWaitForBots() *AutoRefMessage_WaitForBots { + if x, ok := m.GetMessage().(*AutoRefMessage_WaitForBots_); ok { + return x.WaitForBots + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AutoRefMessage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AutoRefMessage_Custom)(nil), + (*AutoRefMessage_WaitForBots_)(nil), + } +} + +// the bots that is waited for +type AutoRefMessage_WaitForBots struct { + // the bots that are waited for + Violators []*AutoRefMessage_WaitForBots_Violator `protobuf:"bytes,1,rep,name=violators" json:"violators,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AutoRefMessage_WaitForBots) Reset() { *m = AutoRefMessage_WaitForBots{} } +func (m *AutoRefMessage_WaitForBots) String() string { return proto.CompactTextString(m) } +func (*AutoRefMessage_WaitForBots) ProtoMessage() {} +func (*AutoRefMessage_WaitForBots) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{3, 0} +} + +func (m *AutoRefMessage_WaitForBots) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoRefMessage_WaitForBots.Unmarshal(m, b) +} +func (m *AutoRefMessage_WaitForBots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoRefMessage_WaitForBots.Marshal(b, m, deterministic) +} +func (m *AutoRefMessage_WaitForBots) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoRefMessage_WaitForBots.Merge(m, src) +} +func (m *AutoRefMessage_WaitForBots) XXX_Size() int { + return xxx_messageInfo_AutoRefMessage_WaitForBots.Size(m) +} +func (m *AutoRefMessage_WaitForBots) XXX_DiscardUnknown() { + xxx_messageInfo_AutoRefMessage_WaitForBots.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoRefMessage_WaitForBots proto.InternalMessageInfo + +func (m *AutoRefMessage_WaitForBots) GetViolators() []*AutoRefMessage_WaitForBots_Violator { + if m != nil { + return m.Violators + } + return nil +} + +type AutoRefMessage_WaitForBots_Violator struct { + // the id of the violator + BotId *BotId `protobuf:"bytes,1,req,name=bot_id,json=botId" json:"bot_id,omitempty"` + // the distance to the next valid position + Distance *float32 `protobuf:"fixed32,2,req,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AutoRefMessage_WaitForBots_Violator) Reset() { *m = AutoRefMessage_WaitForBots_Violator{} } +func (m *AutoRefMessage_WaitForBots_Violator) String() string { return proto.CompactTextString(m) } +func (*AutoRefMessage_WaitForBots_Violator) ProtoMessage() {} +func (*AutoRefMessage_WaitForBots_Violator) Descriptor() ([]byte, []int) { + return fileDescriptor_2fbb3ba3bab9727c, []int{3, 0, 0} +} + +func (m *AutoRefMessage_WaitForBots_Violator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoRefMessage_WaitForBots_Violator.Unmarshal(m, b) +} +func (m *AutoRefMessage_WaitForBots_Violator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoRefMessage_WaitForBots_Violator.Marshal(b, m, deterministic) +} +func (m *AutoRefMessage_WaitForBots_Violator) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoRefMessage_WaitForBots_Violator.Merge(m, src) +} +func (m *AutoRefMessage_WaitForBots_Violator) XXX_Size() int { + return xxx_messageInfo_AutoRefMessage_WaitForBots_Violator.Size(m) +} +func (m *AutoRefMessage_WaitForBots_Violator) XXX_DiscardUnknown() { + xxx_messageInfo_AutoRefMessage_WaitForBots_Violator.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoRefMessage_WaitForBots_Violator proto.InternalMessageInfo + +func (m *AutoRefMessage_WaitForBots_Violator) GetBotId() *BotId { + if m != nil { + return m.BotId + } + return nil +} + +func (m *AutoRefMessage_WaitForBots_Violator) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +func init() { + proto.RegisterType((*AutoRefRegistration)(nil), "AutoRefRegistration") + proto.RegisterType((*AutoRefToController)(nil), "AutoRefToController") + proto.RegisterType((*ControllerToAutoRef)(nil), "ControllerToAutoRef") + proto.RegisterType((*AutoRefMessage)(nil), "AutoRefMessage") + proto.RegisterType((*AutoRefMessage_WaitForBots)(nil), "AutoRefMessage.WaitForBots") + proto.RegisterType((*AutoRefMessage_WaitForBots_Violator)(nil), "AutoRefMessage.WaitForBots.Violator") +} + +func init() { proto.RegisterFile("ssl_game_controller_auto_ref.proto", fileDescriptor_2fbb3ba3bab9727c) } + +var fileDescriptor_2fbb3ba3bab9727c = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x6e, 0xd4, 0x40, + 0x10, 0xc6, 0xcf, 0x3e, 0xe5, 0x88, 0xc7, 0x22, 0x89, 0x36, 0x8d, 0x39, 0x04, 0x3a, 0x59, 0x14, + 0xa6, 0xb1, 0xe0, 0x3a, 0x0a, 0x8a, 0x18, 0x05, 0x8e, 0x82, 0x66, 0x89, 0xa0, 0xa0, 0x58, 0xed, + 0xd9, 0x6b,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, 0xfc, 0x03, 0x2e, 0xa7, 0x84, 0x37, 0xe8, 0x26, + 0x7a, 0xd7, 0xa3, 0x93, 0x35, 0xea, 0xb6, 0xfe, 0xe9, 0x12, 0x5f, 0xa4, 0x93, 0x9e, 0xf7, 0x7c, + 0xb7, 0xe0, 0xe7, 0xf9, 0x1c, 0x65, 0x27, 0xb0, 0x6c, 0x6c, 0x15, 0xff, 0xf2, 0xe1, 0x6c, 0x9e, + 0x81, 0x45, 0xb0, 0xca, 0x3b, 0x4b, 0xd8, 0x1c, 0xec, 0x82, 0xdd, 0x82, 0xbb, 0x9a, 0x5d, 0xc1, + 0xd3, 0x7b, 0xa9, 0x49, 0x94, 0x68, 0xc4, 0x1e, 0xc9, 0xba, 0x6d, 0x3f, 0xff, 0x67, 0x17, 0xe9, + 0x77, 0xa9, 0xe9, 0x23, 0x9a, 0x0c, 0xc9, 0xee, 0x16, 0x3c, 0xbc, 0x9f, 0xca, 0xf5, 0x6f, 0x0f, + 0xc2, 0xa3, 0x36, 0xcb, 0x20, 0xb8, 0xd3, 0x58, 0x4b, 0x42, 0x63, 0x23, 0x6f, 0xb3, 0x4c, 0xc2, + 0xed, 0xab, 0x47, 0xec, 0xd2, 0x6f, 0x4e, 0xcc, 0xa7, 0xb1, 0xf5, 0x35, 0x9c, 0x0e, 0x98, 0xbd, + 0x80, 0xd5, 0x1e, 0x49, 0xe8, 0xe2, 0xf0, 0x3c, 0xc2, 0xed, 0x2a, 0xcd, 0x90, 0x3e, 0x17, 0xfc, + 0x64, 0xdf, 0x7f, 0xd8, 0x1a, 0x4e, 0x0b, 0x6d, 0x49, 0xb6, 0x79, 0xff, 0x40, 0xfc, 0xc4, 0xe7, + 0x63, 0x9d, 0x05, 0xf0, 0xc4, 0xdd, 0xce, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x11, 0xc6, + 0xfa, 0xe1, 0x02, 0x00, 0x00, +} diff --git a/referee_comm/include/proto/ssl_game_controller_auto_ref.proto b/referee_comm/include/proto/ssl_game_controller_auto_ref.proto new file mode 100644 index 00000000..0a6c14da --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_auto_ref.proto @@ -0,0 +1,55 @@ +syntax = "proto2"; + +import "ssl_game_controller_common.proto"; +import "ssl_game_event_2019.proto"; + +// AutoRefRegistration is the first message that a client must send to the controller to identify itself +message AutoRefRegistration { + // identifier is a unique name of the client + required string identifier = 1; + // signature can optionally be specified to enable secure communication + optional Signature signature = 2; +} + +// AutoRefToController is the wrapper message for all subsequent messages from the autoRef to the controller +message AutoRefToController { + // signature can optionally be specified to enable secure communication + optional Signature signature = 1; + // game_event is an optional event that the autoRef detected during the game + optional GameEvent game_event = 2; + // auto_ref_message is an optional message that describes the current state or situation of the game/autoRef + // it is not and never was processed by the GC and is this marked deprecated + optional AutoRefMessage auto_ref_message = 3 [deprecated = true]; +} + +// ControllerToAutoRef is the wrapper message for all messages from controller to autoRef +message ControllerToAutoRef { + oneof msg { + // a reply from the controller + ControllerReply controller_reply = 1; + } +} + +// a message from autoRef, describing the current state or situation +message AutoRefMessage { + oneof message { + // a custom message + // an empty string indicates that there is no message + string custom = 1; + // one or more bots are at invalid locations and need to move + WaitForBots wait_for_bots = 2; + } + + // the bots that is waited for + message WaitForBots { + // the bots that are waited for + repeated Violator violators = 1; + + message Violator { + // the id of the violator + required BotId bot_id = 1; + // the distance to the next valid position + required float distance = 2; + } + } +} diff --git a/referee_comm/include/proto/ssl_game_controller_common.pb.go b/referee_comm/include/proto/ssl_game_controller_common.pb.go new file mode 100644 index 00000000..565c431b --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_common.pb.go @@ -0,0 +1,481 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_game_controller_common.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Team is either blue or yellow +type Team int32 + +const ( + // team not set + Team_UNKNOWN Team = 0 + // yellow team + Team_YELLOW Team = 1 + // blue team + Team_BLUE Team = 2 +) + +var Team_name = map[int32]string{ + 0: "UNKNOWN", + 1: "YELLOW", + 2: "BLUE", +} + +var Team_value = map[string]int32{ + "UNKNOWN": 0, + "YELLOW": 1, + "BLUE": 2, +} + +func (x Team) Enum() *Team { + p := new(Team) + *p = x + return p +} + +func (x Team) String() string { + return proto.EnumName(Team_name, int32(x)) +} + +func (x *Team) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Team_value, data, "Team") + if err != nil { + return err + } + *x = Team(value) + return nil +} + +func (Team) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{0} +} + +type ControllerReply_StatusCode int32 + +const ( + ControllerReply_UNKNOWN_STATUS_CODE ControllerReply_StatusCode = 0 + ControllerReply_OK ControllerReply_StatusCode = 1 + ControllerReply_REJECTED ControllerReply_StatusCode = 2 +) + +var ControllerReply_StatusCode_name = map[int32]string{ + 0: "UNKNOWN_STATUS_CODE", + 1: "OK", + 2: "REJECTED", +} + +var ControllerReply_StatusCode_value = map[string]int32{ + "UNKNOWN_STATUS_CODE": 0, + "OK": 1, + "REJECTED": 2, +} + +func (x ControllerReply_StatusCode) Enum() *ControllerReply_StatusCode { + p := new(ControllerReply_StatusCode) + *p = x + return p +} + +func (x ControllerReply_StatusCode) String() string { + return proto.EnumName(ControllerReply_StatusCode_name, int32(x)) +} + +func (x *ControllerReply_StatusCode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ControllerReply_StatusCode_value, data, "ControllerReply_StatusCode") + if err != nil { + return err + } + *x = ControllerReply_StatusCode(value) + return nil +} + +func (ControllerReply_StatusCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{2, 0} +} + +type ControllerReply_Verification int32 + +const ( + ControllerReply_UNKNOWN_VERIFICATION ControllerReply_Verification = 0 + ControllerReply_VERIFIED ControllerReply_Verification = 1 + ControllerReply_UNVERIFIED ControllerReply_Verification = 2 +) + +var ControllerReply_Verification_name = map[int32]string{ + 0: "UNKNOWN_VERIFICATION", + 1: "VERIFIED", + 2: "UNVERIFIED", +} + +var ControllerReply_Verification_value = map[string]int32{ + "UNKNOWN_VERIFICATION": 0, + "VERIFIED": 1, + "UNVERIFIED": 2, +} + +func (x ControllerReply_Verification) Enum() *ControllerReply_Verification { + p := new(ControllerReply_Verification) + *p = x + return p +} + +func (x ControllerReply_Verification) String() string { + return proto.EnumName(ControllerReply_Verification_name, int32(x)) +} + +func (x *ControllerReply_Verification) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ControllerReply_Verification_value, data, "ControllerReply_Verification") + if err != nil { + return err + } + *x = ControllerReply_Verification(value) + return nil +} + +func (ControllerReply_Verification) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{2, 1} +} + +// BotId is the combination of a team and a robot id +type BotId struct { + // the robot id - a negative value indicates that the id is not set + Id *int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + // the team that the robot belongs to + Team *Team `protobuf:"varint,2,opt,name=team,enum=Team" json:"team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BotId) Reset() { *m = BotId{} } +func (m *BotId) String() string { return proto.CompactTextString(m) } +func (*BotId) ProtoMessage() {} +func (*BotId) Descriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{0} +} + +func (m *BotId) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BotId.Unmarshal(m, b) +} +func (m *BotId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BotId.Marshal(b, m, deterministic) +} +func (m *BotId) XXX_Merge(src proto.Message) { + xxx_messageInfo_BotId.Merge(m, src) +} +func (m *BotId) XXX_Size() int { + return xxx_messageInfo_BotId.Size(m) +} +func (m *BotId) XXX_DiscardUnknown() { + xxx_messageInfo_BotId.DiscardUnknown(m) +} + +var xxx_messageInfo_BotId proto.InternalMessageInfo + +func (m *BotId) GetId() int32 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *BotId) GetTeam() Team { + if m != nil && m.Team != nil { + return *m.Team + } + return Team_UNKNOWN +} + +// Location is a 2d-coordinate on the field in ssl-vision coordinate system. Units are in meters. +type Location struct { + // the x-coordinate in [m] in the ssl-vision coordinate system + X *float32 `protobuf:"fixed32,1,req,name=x" json:"x,omitempty"` + // the y-coordinate in [m] in the ssl-vision coordinate system + Y *float32 `protobuf:"fixed32,2,req,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{1} +} + +func (m *Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Location.Unmarshal(m, b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return xxx_messageInfo_Location.Size(m) +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetX() float32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *Location) GetY() float32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +// a reply that is sent by the controller for each request from teams or autoRefs +type ControllerReply struct { + // status_code is an optional code that indicates the result of the last request + StatusCode *ControllerReply_StatusCode `protobuf:"varint,1,opt,name=status_code,json=statusCode,enum=ControllerReply_StatusCode" json:"status_code,omitempty"` + // reason is an optional explanation of the status code + Reason *string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"` + // next_token must be send with the next request, if secure communication is used + // the token is used to avoid replay attacks + // the token is always present in the very first message before the registration starts + // the token is not present, if secure communication is not used + NextToken *string `protobuf:"bytes,3,opt,name=next_token,json=nextToken" json:"next_token,omitempty"` + // verification indicates if the last request could be verified (secure communication) + Verification *ControllerReply_Verification `protobuf:"varint,4,opt,name=verification,enum=ControllerReply_Verification" json:"verification,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ControllerReply) Reset() { *m = ControllerReply{} } +func (m *ControllerReply) String() string { return proto.CompactTextString(m) } +func (*ControllerReply) ProtoMessage() {} +func (*ControllerReply) Descriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{2} +} + +func (m *ControllerReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ControllerReply.Unmarshal(m, b) +} +func (m *ControllerReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ControllerReply.Marshal(b, m, deterministic) +} +func (m *ControllerReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControllerReply.Merge(m, src) +} +func (m *ControllerReply) XXX_Size() int { + return xxx_messageInfo_ControllerReply.Size(m) +} +func (m *ControllerReply) XXX_DiscardUnknown() { + xxx_messageInfo_ControllerReply.DiscardUnknown(m) +} + +var xxx_messageInfo_ControllerReply proto.InternalMessageInfo + +func (m *ControllerReply) GetStatusCode() ControllerReply_StatusCode { + if m != nil && m.StatusCode != nil { + return *m.StatusCode + } + return ControllerReply_UNKNOWN_STATUS_CODE +} + +func (m *ControllerReply) GetReason() string { + if m != nil && m.Reason != nil { + return *m.Reason + } + return "" +} + +func (m *ControllerReply) GetNextToken() string { + if m != nil && m.NextToken != nil { + return *m.NextToken + } + return "" +} + +func (m *ControllerReply) GetVerification() ControllerReply_Verification { + if m != nil && m.Verification != nil { + return *m.Verification + } + return ControllerReply_UNKNOWN_VERIFICATION +} + +// Signature can be added to a request to let it be verfied by the controller +type Signature struct { + // the token that was received with the last controller reply + Token *string `protobuf:"bytes,1,req,name=token" json:"token,omitempty"` + // the PKCS1v15 signature of this message + Pkcs1V15 []byte `protobuf:"bytes,2,req,name=pkcs1v15" json:"pkcs1v15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Signature) Reset() { *m = Signature{} } +func (m *Signature) String() string { return proto.CompactTextString(m) } +func (*Signature) ProtoMessage() {} +func (*Signature) Descriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{3} +} + +func (m *Signature) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Signature.Unmarshal(m, b) +} +func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Signature.Marshal(b, m, deterministic) +} +func (m *Signature) XXX_Merge(src proto.Message) { + xxx_messageInfo_Signature.Merge(m, src) +} +func (m *Signature) XXX_Size() int { + return xxx_messageInfo_Signature.Size(m) +} +func (m *Signature) XXX_DiscardUnknown() { + xxx_messageInfo_Signature.DiscardUnknown(m) +} + +var xxx_messageInfo_Signature proto.InternalMessageInfo + +func (m *Signature) GetToken() string { + if m != nil && m.Token != nil { + return *m.Token + } + return "" +} + +func (m *Signature) GetPkcs1V15() []byte { + if m != nil { + return m.Pkcs1V15 + } + return nil +} + +// BallSpeedMeasurement is a single measurement sample of the ball speed +type BallSpeedMeasurement struct { + // The UNIX timestamp [μs] when the measurement was taken. + Timestamp *uint64 `protobuf:"varint,1,req,name=timestamp" json:"timestamp,omitempty"` + // the ball speed measurement [m/s] + BallSpeed *float32 `protobuf:"fixed32,2,req,name=ball_speed,json=ballSpeed" json:"ball_speed,omitempty"` + // the estimated initial ball speed (kick speed) [m/s] + InitialBallSpeed *float32 `protobuf:"fixed32,3,opt,name=initial_ball_speed,json=initialBallSpeed" json:"initial_ball_speed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BallSpeedMeasurement) Reset() { *m = BallSpeedMeasurement{} } +func (m *BallSpeedMeasurement) String() string { return proto.CompactTextString(m) } +func (*BallSpeedMeasurement) ProtoMessage() {} +func (*BallSpeedMeasurement) Descriptor() ([]byte, []int) { + return fileDescriptor_3d09d87af007c4fe, []int{4} +} + +func (m *BallSpeedMeasurement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BallSpeedMeasurement.Unmarshal(m, b) +} +func (m *BallSpeedMeasurement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BallSpeedMeasurement.Marshal(b, m, deterministic) +} +func (m *BallSpeedMeasurement) XXX_Merge(src proto.Message) { + xxx_messageInfo_BallSpeedMeasurement.Merge(m, src) +} +func (m *BallSpeedMeasurement) XXX_Size() int { + return xxx_messageInfo_BallSpeedMeasurement.Size(m) +} +func (m *BallSpeedMeasurement) XXX_DiscardUnknown() { + xxx_messageInfo_BallSpeedMeasurement.DiscardUnknown(m) +} + +var xxx_messageInfo_BallSpeedMeasurement proto.InternalMessageInfo + +func (m *BallSpeedMeasurement) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *BallSpeedMeasurement) GetBallSpeed() float32 { + if m != nil && m.BallSpeed != nil { + return *m.BallSpeed + } + return 0 +} + +func (m *BallSpeedMeasurement) GetInitialBallSpeed() float32 { + if m != nil && m.InitialBallSpeed != nil { + return *m.InitialBallSpeed + } + return 0 +} + +func init() { + proto.RegisterEnum("Team", Team_name, Team_value) + proto.RegisterEnum("ControllerReply_StatusCode", ControllerReply_StatusCode_name, ControllerReply_StatusCode_value) + proto.RegisterEnum("ControllerReply_Verification", ControllerReply_Verification_name, ControllerReply_Verification_value) + proto.RegisterType((*BotId)(nil), "BotId") + proto.RegisterType((*Location)(nil), "Location") + proto.RegisterType((*ControllerReply)(nil), "ControllerReply") + proto.RegisterType((*Signature)(nil), "Signature") + proto.RegisterType((*BallSpeedMeasurement)(nil), "BallSpeedMeasurement") +} + +func init() { proto.RegisterFile("ssl_game_controller_common.proto", fileDescriptor_3d09d87af007c4fe) } + +var fileDescriptor_3d09d87af007c4fe = []byte{ + // 470 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xed, 0x2e, 0x49, 0x88, 0xa7, 0x51, 0xb0, 0x86, 0x08, 0xcc, 0x47, 0xa5, 0xc8, 0x07, 0x14, + 0x10, 0x8a, 0xd4, 0x48, 0x9c, 0x80, 0x43, 0x3e, 0x5c, 0x29, 0x34, 0x24, 0xd2, 0xc6, 0x69, 0xc5, + 0xc9, 0xda, 0xda, 0x4b, 0xb5, 0xaa, 0xed, 0xb5, 0xbc, 0x9b, 0x2a, 0x39, 0xf2, 0x07, 0xf9, 0x4d, + 0xc8, 0x76, 0xea, 0x06, 0xb8, 0xf9, 0xbd, 0x79, 0x6f, 0xde, 0x78, 0x66, 0xa1, 0xaf, 0x75, 0x1c, + 0xdc, 0xf2, 0x44, 0x04, 0xa1, 0x4a, 0x4d, 0xae, 0xe2, 0x58, 0xe4, 0x41, 0xa8, 0x92, 0x44, 0xa5, + 0xc3, 0x2c, 0x57, 0x46, 0xb9, 0x23, 0x68, 0x4e, 0x94, 0x99, 0x47, 0xd8, 0x05, 0x2a, 0x23, 0x87, + 0xf4, 0xc9, 0xa0, 0xc9, 0xa8, 0x8c, 0xf0, 0x15, 0x34, 0x8c, 0xe0, 0x89, 0x43, 0xfb, 0x64, 0xd0, + 0x1d, 0x35, 0x87, 0xbe, 0xe0, 0x09, 0x2b, 0x29, 0xf7, 0x1d, 0xb4, 0x17, 0x2a, 0xe4, 0x46, 0xaa, + 0x14, 0x3b, 0x40, 0x76, 0x0e, 0xe9, 0xd3, 0x01, 0x65, 0x64, 0x57, 0xa0, 0xbd, 0x43, 0x2b, 0xb4, + 0x77, 0x7f, 0x53, 0x78, 0x36, 0xad, 0x73, 0x99, 0xc8, 0xe2, 0x3d, 0x7e, 0x81, 0x53, 0x6d, 0xb8, + 0xd9, 0xea, 0x20, 0x54, 0x91, 0x28, 0xf3, 0xba, 0xa3, 0x37, 0xc3, 0x7f, 0x64, 0xc3, 0x75, 0xa9, + 0x99, 0xaa, 0x48, 0x30, 0xd0, 0xf5, 0x37, 0xbe, 0x80, 0x56, 0x2e, 0xb8, 0x56, 0x69, 0x39, 0x96, + 0xc5, 0x0e, 0x08, 0xcf, 0x00, 0x52, 0xb1, 0x33, 0x81, 0x51, 0x77, 0x22, 0x75, 0x9e, 0x94, 0x35, + 0xab, 0x60, 0xfc, 0x82, 0xc0, 0x31, 0x74, 0xee, 0x45, 0x2e, 0x7f, 0xca, 0x6a, 0x68, 0xa7, 0x51, + 0xa6, 0x9e, 0xfd, 0x97, 0x7a, 0x75, 0x24, 0x62, 0x7f, 0x59, 0xdc, 0xcf, 0x00, 0x8f, 0x33, 0xe1, + 0x4b, 0x78, 0xbe, 0x59, 0x5e, 0x2e, 0x57, 0xd7, 0xcb, 0x60, 0xed, 0x8f, 0xfd, 0xcd, 0x3a, 0x98, + 0xae, 0x66, 0x9e, 0x7d, 0x82, 0x2d, 0xa0, 0xab, 0x4b, 0x9b, 0x60, 0x07, 0xda, 0xcc, 0xfb, 0xe6, + 0x4d, 0x7d, 0x6f, 0x66, 0x53, 0xf7, 0x02, 0x3a, 0xc7, 0xad, 0xd1, 0x81, 0xde, 0x83, 0xfd, 0xca, + 0x63, 0xf3, 0x8b, 0xf9, 0x74, 0xec, 0xcf, 0x57, 0x4b, 0xfb, 0xa4, 0xf0, 0x55, 0x8c, 0x37, 0xb3, + 0x09, 0x76, 0x01, 0x36, 0xcb, 0x1a, 0x53, 0xf7, 0x2b, 0x58, 0x6b, 0x79, 0x9b, 0x72, 0xb3, 0xcd, + 0x05, 0xf6, 0xa0, 0x59, 0xfd, 0x6e, 0xb1, 0x7d, 0x8b, 0x55, 0x00, 0x5f, 0x43, 0x3b, 0xbb, 0x0b, + 0xf5, 0xf9, 0xfd, 0xf9, 0xa7, 0xf2, 0x10, 0x1d, 0x56, 0x63, 0xf7, 0x17, 0x81, 0xde, 0x84, 0xc7, + 0xf1, 0x3a, 0x13, 0x22, 0xfa, 0x2e, 0xb8, 0xde, 0xe6, 0x22, 0x11, 0xa9, 0xc1, 0xb7, 0x60, 0x19, + 0x99, 0x08, 0x6d, 0x78, 0x92, 0x95, 0xed, 0x1a, 0xec, 0x91, 0x28, 0x96, 0x7b, 0xc3, 0xe3, 0x38, + 0xd0, 0x85, 0xed, 0x70, 0x5d, 0xeb, 0xe6, 0xa1, 0x0f, 0x7e, 0x04, 0x94, 0xa9, 0x34, 0x92, 0xc7, + 0xc1, 0x91, 0xac, 0xb8, 0x01, 0x65, 0xf6, 0xa1, 0x52, 0xa7, 0x7e, 0x78, 0x0f, 0x8d, 0xe2, 0x25, + 0xe1, 0x29, 0x3c, 0x3d, 0xac, 0xc0, 0x3e, 0x41, 0x80, 0xd6, 0x0f, 0x6f, 0xb1, 0x58, 0x5d, 0xdb, + 0x04, 0xdb, 0xd0, 0x98, 0x2c, 0x36, 0x9e, 0x4d, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xdb, + 0x45, 0xd3, 0xbd, 0x02, 0x00, 0x00, +} diff --git a/referee_comm/include/proto/ssl_game_controller_common.proto b/referee_comm/include/proto/ssl_game_controller_common.proto new file mode 100644 index 00000000..252e4699 --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_common.proto @@ -0,0 +1,72 @@ +syntax = "proto2"; + +// Team is either blue or yellow +enum Team { + // team not set + UNKNOWN = 0; + // yellow team + YELLOW = 1; + // blue team + BLUE = 2; +} + +// BotId is the combination of a team and a robot id +message BotId { + // the robot id - a negative value indicates that the id is not set + optional int32 id = 1; + // the team that the robot belongs to + optional Team team = 2; +} + +// Location is a 2d-coordinate on the field in ssl-vision coordinate system. Units are in meters. +message Location { + // the x-coordinate in [m] in the ssl-vision coordinate system + required float x = 1; + // the y-coordinate in [m] in the ssl-vision coordinate system + required float y = 2; +} + +// a reply that is sent by the controller for each request from teams or autoRefs +message ControllerReply { + // status_code is an optional code that indicates the result of the last request + optional StatusCode status_code = 1; + // reason is an optional explanation of the status code + optional string reason = 2; + // next_token must be send with the next request, if secure communication is used + // the token is used to avoid replay attacks + // the token is always present in the very first message before the registration starts + // the token is not present, if secure communication is not used + optional string next_token = 3; + // verification indicates if the last request could be verified (secure communication) + optional Verification verification = 4; + + enum StatusCode { + UNKNOWN_STATUS_CODE = 0; + OK = 1; + REJECTED = 2; + } + + enum Verification { + UNKNOWN_VERIFICATION = 0; + VERIFIED = 1; + UNVERIFIED = 2; + } +} + +// Signature can be added to a request to let it be verfied by the controller +message Signature { + // the token that was received with the last controller reply + required string token = 1; + // the PKCS1v15 signature of this message + required bytes pkcs1v15 = 2; +} + +// BallSpeedMeasurement is a single measurement sample of the ball speed +message BallSpeedMeasurement { + // The UNIX timestamp [μs] when the measurement was taken. + required uint64 timestamp = 1; + // the ball speed measurement [m/s] + required float ball_speed = 2; + // the estimated initial ball speed (kick speed) [m/s] + optional float initial_ball_speed = 3; +} \ No newline at end of file diff --git a/referee_comm/include/proto/ssl_game_controller_team.pb.go b/referee_comm/include/proto/ssl_game_controller_team.pb.go new file mode 100644 index 00000000..265d4135 --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_team.pb.go @@ -0,0 +1,490 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_game_controller_team.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type TeamToController_AdvantageResponse int32 + +const ( + // stop the game and handle the foul immediately + TeamToController_STOP TeamToController_AdvantageResponse = 0 + // continue the game until the next stop of the game, then handle the foul + TeamToController_CONTINUE TeamToController_AdvantageResponse = 1 + // no choice -> will default to STOP + TeamToController_UNDECIDED TeamToController_AdvantageResponse = 0 +) + +var TeamToController_AdvantageResponse_name = map[int32]string{ + 0: "STOP", + 1: "CONTINUE", + // Duplicate value: 0: "UNDECIDED", +} + +var TeamToController_AdvantageResponse_value = map[string]int32{ + "STOP": 0, + "CONTINUE": 1, + "UNDECIDED": 0, +} + +func (x TeamToController_AdvantageResponse) Enum() *TeamToController_AdvantageResponse { + p := new(TeamToController_AdvantageResponse) + *p = x + return p +} + +func (x TeamToController_AdvantageResponse) String() string { + return proto.EnumName(TeamToController_AdvantageResponse_name, int32(x)) +} + +func (x *TeamToController_AdvantageResponse) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TeamToController_AdvantageResponse_value, data, "TeamToController_AdvantageResponse") + if err != nil { + return err + } + *x = TeamToController_AdvantageResponse(value) + return nil +} + +func (TeamToController_AdvantageResponse) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{1, 0} +} + +type AdvantageChoice_Foul int32 + +const ( + // default value when not set + AdvantageChoice_UNKNOWN AdvantageChoice_Foul = 0 + // an opponent bot has crashed with one of your bots + AdvantageChoice_COLLISION AdvantageChoice_Foul = 1 + // an opponent bot has pushed one of your bots + AdvantageChoice_PUSHING AdvantageChoice_Foul = 2 + // an opponent has touched one of your bots while your bot has been at least partially inside the defense area + AdvantageChoice_ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA AdvantageChoice_Foul = 3 +) + +var AdvantageChoice_Foul_name = map[int32]string{ + 0: "UNKNOWN", + 1: "COLLISION", + 2: "PUSHING", + 3: "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA", +} + +var AdvantageChoice_Foul_value = map[string]int32{ + "UNKNOWN": 0, + "COLLISION": 1, + "PUSHING": 2, + "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA": 3, +} + +func (x AdvantageChoice_Foul) Enum() *AdvantageChoice_Foul { + p := new(AdvantageChoice_Foul) + *p = x + return p +} + +func (x AdvantageChoice_Foul) String() string { + return proto.EnumName(AdvantageChoice_Foul_name, int32(x)) +} + +func (x *AdvantageChoice_Foul) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AdvantageChoice_Foul_value, data, "AdvantageChoice_Foul") + if err != nil { + return err + } + *x = AdvantageChoice_Foul(value) + return nil +} + +func (AdvantageChoice_Foul) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{3, 0} +} + +// a registration that must be send by teams and autoRefs to the controller as the very first message +type TeamRegistration struct { + // the exact team name as published by the game-controller + TeamName *string `protobuf:"bytes,1,req,name=team_name,json=teamName" json:"team_name,omitempty"` + // signature can optionally be specified to enable secure communication + Signature *Signature `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TeamRegistration) Reset() { *m = TeamRegistration{} } +func (m *TeamRegistration) String() string { return proto.CompactTextString(m) } +func (*TeamRegistration) ProtoMessage() {} +func (*TeamRegistration) Descriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{0} +} + +func (m *TeamRegistration) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TeamRegistration.Unmarshal(m, b) +} +func (m *TeamRegistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TeamRegistration.Marshal(b, m, deterministic) +} +func (m *TeamRegistration) XXX_Merge(src proto.Message) { + xxx_messageInfo_TeamRegistration.Merge(m, src) +} +func (m *TeamRegistration) XXX_Size() int { + return xxx_messageInfo_TeamRegistration.Size(m) +} +func (m *TeamRegistration) XXX_DiscardUnknown() { + xxx_messageInfo_TeamRegistration.DiscardUnknown(m) +} + +var xxx_messageInfo_TeamRegistration proto.InternalMessageInfo + +func (m *TeamRegistration) GetTeamName() string { + if m != nil && m.TeamName != nil { + return *m.TeamName + } + return "" +} + +func (m *TeamRegistration) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +// wrapper for all messages from a team's computer to the controller +type TeamToController struct { + // signature can optionally be specified to enable secure communication + Signature *Signature `protobuf:"bytes,1,opt,name=signature" json:"signature,omitempty"` + // Types that are valid to be assigned to Msg: + // *TeamToController_DesiredKeeper + // *TeamToController_AdvantageResponse_ + // *TeamToController_SubstituteBot + // *TeamToController_Ping + Msg isTeamToController_Msg `protobuf_oneof:"msg"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TeamToController) Reset() { *m = TeamToController{} } +func (m *TeamToController) String() string { return proto.CompactTextString(m) } +func (*TeamToController) ProtoMessage() {} +func (*TeamToController) Descriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{1} +} + +func (m *TeamToController) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TeamToController.Unmarshal(m, b) +} +func (m *TeamToController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TeamToController.Marshal(b, m, deterministic) +} +func (m *TeamToController) XXX_Merge(src proto.Message) { + xxx_messageInfo_TeamToController.Merge(m, src) +} +func (m *TeamToController) XXX_Size() int { + return xxx_messageInfo_TeamToController.Size(m) +} +func (m *TeamToController) XXX_DiscardUnknown() { + xxx_messageInfo_TeamToController.DiscardUnknown(m) +} + +var xxx_messageInfo_TeamToController proto.InternalMessageInfo + +func (m *TeamToController) GetSignature() *Signature { + if m != nil { + return m.Signature + } + return nil +} + +type isTeamToController_Msg interface { + isTeamToController_Msg() +} + +type TeamToController_DesiredKeeper struct { + DesiredKeeper int32 `protobuf:"varint,2,opt,name=desired_keeper,json=desiredKeeper,oneof"` +} + +type TeamToController_AdvantageResponse_ struct { + AdvantageResponse TeamToController_AdvantageResponse `protobuf:"varint,3,opt,name=advantage_response,json=advantageResponse,enum=TeamToController_AdvantageResponse,oneof"` +} + +type TeamToController_SubstituteBot struct { + SubstituteBot bool `protobuf:"varint,4,opt,name=substitute_bot,json=substituteBot,oneof"` +} + +type TeamToController_Ping struct { + Ping bool `protobuf:"varint,5,opt,name=ping,oneof"` +} + +func (*TeamToController_DesiredKeeper) isTeamToController_Msg() {} + +func (*TeamToController_AdvantageResponse_) isTeamToController_Msg() {} + +func (*TeamToController_SubstituteBot) isTeamToController_Msg() {} + +func (*TeamToController_Ping) isTeamToController_Msg() {} + +func (m *TeamToController) GetMsg() isTeamToController_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (m *TeamToController) GetDesiredKeeper() int32 { + if x, ok := m.GetMsg().(*TeamToController_DesiredKeeper); ok { + return x.DesiredKeeper + } + return 0 +} + +func (m *TeamToController) GetAdvantageResponse() TeamToController_AdvantageResponse { + if x, ok := m.GetMsg().(*TeamToController_AdvantageResponse_); ok { + return x.AdvantageResponse + } + return TeamToController_STOP +} + +func (m *TeamToController) GetSubstituteBot() bool { + if x, ok := m.GetMsg().(*TeamToController_SubstituteBot); ok { + return x.SubstituteBot + } + return false +} + +func (m *TeamToController) GetPing() bool { + if x, ok := m.GetMsg().(*TeamToController_Ping); ok { + return x.Ping + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TeamToController) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TeamToController_DesiredKeeper)(nil), + (*TeamToController_AdvantageResponse_)(nil), + (*TeamToController_SubstituteBot)(nil), + (*TeamToController_Ping)(nil), + } +} + +// wrapper for all messages from controller to a team's computer +type ControllerToTeam struct { + // Types that are valid to be assigned to Msg: + // *ControllerToTeam_ControllerReply + // *ControllerToTeam_AdvantageChoice + Msg isControllerToTeam_Msg `protobuf_oneof:"msg"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ControllerToTeam) Reset() { *m = ControllerToTeam{} } +func (m *ControllerToTeam) String() string { return proto.CompactTextString(m) } +func (*ControllerToTeam) ProtoMessage() {} +func (*ControllerToTeam) Descriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{2} +} + +func (m *ControllerToTeam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ControllerToTeam.Unmarshal(m, b) +} +func (m *ControllerToTeam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ControllerToTeam.Marshal(b, m, deterministic) +} +func (m *ControllerToTeam) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControllerToTeam.Merge(m, src) +} +func (m *ControllerToTeam) XXX_Size() int { + return xxx_messageInfo_ControllerToTeam.Size(m) +} +func (m *ControllerToTeam) XXX_DiscardUnknown() { + xxx_messageInfo_ControllerToTeam.DiscardUnknown(m) +} + +var xxx_messageInfo_ControllerToTeam proto.InternalMessageInfo + +type isControllerToTeam_Msg interface { + isControllerToTeam_Msg() +} + +type ControllerToTeam_ControllerReply struct { + ControllerReply *ControllerReply `protobuf:"bytes,1,opt,name=controller_reply,json=controllerReply,oneof"` +} + +type ControllerToTeam_AdvantageChoice struct { + AdvantageChoice *AdvantageChoice `protobuf:"bytes,2,opt,name=advantage_choice,json=advantageChoice,oneof"` +} + +func (*ControllerToTeam_ControllerReply) isControllerToTeam_Msg() {} + +func (*ControllerToTeam_AdvantageChoice) isControllerToTeam_Msg() {} + +func (m *ControllerToTeam) GetMsg() isControllerToTeam_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (m *ControllerToTeam) GetControllerReply() *ControllerReply { + if x, ok := m.GetMsg().(*ControllerToTeam_ControllerReply); ok { + return x.ControllerReply + } + return nil +} + +func (m *ControllerToTeam) GetAdvantageChoice() *AdvantageChoice { + if x, ok := m.GetMsg().(*ControllerToTeam_AdvantageChoice); ok { + return x.AdvantageChoice + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ControllerToTeam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ControllerToTeam_ControllerReply)(nil), + (*ControllerToTeam_AdvantageChoice)(nil), + } +} + +// information about the advantage choice that is offered to a team +type AdvantageChoice struct { + // the type of foul that occurred + Foul *AdvantageChoice_Foul `protobuf:"varint,1,req,name=foul,enum=AdvantageChoice_Foul" json:"foul,omitempty"` + // the bot crash event that was the source for this advantage choice + BotCrashUnique *GameEvent_BotCrashUnique `protobuf:"bytes,2,opt,name=bot_crash_unique,json=botCrashUnique" json:"bot_crash_unique,omitempty"` + // the bot push event that was the source for this advantage choice + BotPushedBot *GameEvent_BotPushedBot `protobuf:"bytes,3,opt,name=bot_pushed_bot,json=botPushedBot" json:"bot_pushed_bot,omitempty"` + // the bot push event that was the source for this advantage choice + AttackerTouchedOpponentInDefenseArea *GameEvent_AttackerTouchedOpponentInDefenseArea `protobuf:"bytes,4,opt,name=attacker_touched_opponent_in_defense_area,json=attackerTouchedOpponentInDefenseArea" json:"attacker_touched_opponent_in_defense_area,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AdvantageChoice) Reset() { *m = AdvantageChoice{} } +func (m *AdvantageChoice) String() string { return proto.CompactTextString(m) } +func (*AdvantageChoice) ProtoMessage() {} +func (*AdvantageChoice) Descriptor() ([]byte, []int) { + return fileDescriptor_96c0c3d07dcb3676, []int{3} +} + +func (m *AdvantageChoice) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AdvantageChoice.Unmarshal(m, b) +} +func (m *AdvantageChoice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AdvantageChoice.Marshal(b, m, deterministic) +} +func (m *AdvantageChoice) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdvantageChoice.Merge(m, src) +} +func (m *AdvantageChoice) XXX_Size() int { + return xxx_messageInfo_AdvantageChoice.Size(m) +} +func (m *AdvantageChoice) XXX_DiscardUnknown() { + xxx_messageInfo_AdvantageChoice.DiscardUnknown(m) +} + +var xxx_messageInfo_AdvantageChoice proto.InternalMessageInfo + +func (m *AdvantageChoice) GetFoul() AdvantageChoice_Foul { + if m != nil && m.Foul != nil { + return *m.Foul + } + return AdvantageChoice_UNKNOWN +} + +func (m *AdvantageChoice) GetBotCrashUnique() *GameEvent_BotCrashUnique { + if m != nil { + return m.BotCrashUnique + } + return nil +} + +func (m *AdvantageChoice) GetBotPushedBot() *GameEvent_BotPushedBot { + if m != nil { + return m.BotPushedBot + } + return nil +} + +func (m *AdvantageChoice) GetAttackerTouchedOpponentInDefenseArea() *GameEvent_AttackerTouchedOpponentInDefenseArea { + if m != nil { + return m.AttackerTouchedOpponentInDefenseArea + } + return nil +} + +func init() { + proto.RegisterEnum("TeamToController_AdvantageResponse", TeamToController_AdvantageResponse_name, TeamToController_AdvantageResponse_value) + proto.RegisterEnum("AdvantageChoice_Foul", AdvantageChoice_Foul_name, AdvantageChoice_Foul_value) + proto.RegisterType((*TeamRegistration)(nil), "TeamRegistration") + proto.RegisterType((*TeamToController)(nil), "TeamToController") + proto.RegisterType((*ControllerToTeam)(nil), "ControllerToTeam") + proto.RegisterType((*AdvantageChoice)(nil), "AdvantageChoice") +} + +func init() { proto.RegisterFile("ssl_game_controller_team.proto", fileDescriptor_96c0c3d07dcb3676) } + +var fileDescriptor_96c0c3d07dcb3676 = []byte{ + // 614 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xdf, 0x6e, 0xd3, 0x3c, + 0x14, 0x6f, 0xda, 0x4e, 0x5f, 0xeb, 0x6d, 0x9d, 0x67, 0x7d, 0x88, 0x6e, 0x48, 0xa8, 0x2a, 0x48, + 0x74, 0x17, 0x04, 0xe8, 0x1d, 0x17, 0x43, 0x4a, 0xd3, 0x6c, 0x8d, 0x36, 0x25, 0x95, 0x9b, 0x0a, + 0x71, 0x83, 0xe5, 0xa6, 0x67, 0x5d, 0xb4, 0xc6, 0x0e, 0x89, 0x33, 0x89, 0x37, 0xe0, 0x0d, 0x78, + 0x08, 0x9e, 0x82, 0x37, 0x43, 0x4e, 0xd3, 0x75, 0x2d, 0x08, 0x71, 0xe9, 0xdf, 0xbf, 0x73, 0x72, + 0xce, 0x09, 0x7a, 0x9e, 0x65, 0x4b, 0xb6, 0xe0, 0x31, 0xb0, 0x50, 0x0a, 0x95, 0xca, 0xe5, 0x12, + 0x52, 0xa6, 0x80, 0xc7, 0x66, 0x92, 0x4a, 0x25, 0x4f, 0x4f, 0x1e, 0x78, 0xb8, 0x07, 0xa1, 0x58, + 0xff, 0xed, 0xbb, 0xf7, 0x25, 0xd5, 0xf9, 0x93, 0x35, 0x94, 0x71, 0x2c, 0xc5, 0x4a, 0xd1, 0xfd, + 0x84, 0x70, 0x00, 0x3c, 0xa6, 0xb0, 0x88, 0x32, 0x95, 0x72, 0x15, 0x49, 0x41, 0x9e, 0xa1, 0xa6, + 0x8e, 0x67, 0x82, 0xc7, 0xd0, 0x36, 0x3a, 0xd5, 0x5e, 0x93, 0x36, 0x34, 0xe0, 0xf1, 0x18, 0x48, + 0x0f, 0x35, 0xb3, 0x68, 0x21, 0xb8, 0xca, 0x53, 0x68, 0x57, 0x3b, 0x46, 0x6f, 0xbf, 0x8f, 0xcc, + 0x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e7, 0x7f, 0xf4, 0x70, + 0x45, 0x9f, 0x85, 0xed, 0x5f, 0x5f, 0xbb, 0x13, 0xd7, 0xf7, 0xb0, 0xa1, 0xb9, 0xf1, 0x74, 0x32, + 0x72, 0xbd, 0x4b, 0x5c, 0x25, 0xaf, 0xd1, 0x99, 0x15, 0x04, 0x96, 0x7d, 0xe5, 0x50, 0x16, 0xf8, + 0x53, 0x7b, 0xe4, 0x0c, 0x99, 0x3f, 0x1e, 0xfb, 0x9e, 0xe3, 0x05, 0xcc, 0xf5, 0xd8, 0xd0, 0xb9, + 0x70, 0xbc, 0x89, 0xc3, 0x2c, 0xea, 0x58, 0xb8, 0xf6, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x84, 0xf3, + 0xb6, 0xe5, 0x44, 0x04, 0x00, 0x00, +} diff --git a/referee_comm/include/proto/ssl_game_controller_team.proto b/referee_comm/include/proto/ssl_game_controller_team.proto new file mode 100644 index 00000000..a48b95a2 --- /dev/null +++ b/referee_comm/include/proto/ssl_game_controller_team.proto @@ -0,0 +1,74 @@ +syntax = "proto2"; + +import "ssl_game_event_2019.proto"; +import "ssl_game_controller_common.proto"; + +// a registration that must be send by teams and autoRefs to the controller as the very first message +message TeamRegistration { + // the exact team name as published by the game-controller + required string team_name = 1; + // signature can optionally be specified to enable secure communication + optional Signature signature = 2; +} + +// wrapper for all messages from a team's computer to the controller +message TeamToController { + // signature can optionally be specified to enable secure communication + optional Signature signature = 1; + + oneof msg { + // request a new desired keeper id + // this is only allowed during STOP and will be rejected otherwise + int32 desired_keeper = 2; + // response to an advantage choice request + AdvantageResponse advantage_response = 3; + // request to substitute a robot at the next possibility + bool substitute_bot = 4; + // send a ping to the GC to test if the connection is still open. + // the value is ignored and a reply is sent back + bool ping = 5; + } + + enum AdvantageResponse { + option allow_alias = true; + // stop the game and handle the foul immediately + STOP = 0; + // continue the game until the next stop of the game, then handle the foul + CONTINUE = 1; + // no choice -> will default to STOP + UNDECIDED = 0; + } +} + +// wrapper for all messages from controller to a team's computer +message ControllerToTeam { + oneof msg { + // a reply from the controller + ControllerReply controller_reply = 1; + // the team is offered an advantage choice + AdvantageChoice advantage_choice = 2; + } +} + +// information about the advantage choice that is offered to a team +message AdvantageChoice { + // the type of foul that occurred + required Foul foul = 1; + // the bot crash event that was the source for this advantage choice + optional GameEvent.BotCrashUnique bot_crash_unique = 2; + // the bot push event that was the source for this advantage choice + optional GameEvent.BotPushedBot bot_pushed_bot = 3; + // the bot push event that was the source for this advantage choice + optional GameEvent.AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area = 4; + + enum Foul { + // default value when not set + UNKNOWN = 0; + // an opponent bot has crashed with one of your bots + COLLISION = 1; + // an opponent bot has pushed one of your bots + PUSHING = 2; + // an opponent has touched one of your bots while your bot has been at least partially inside the defense area + ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA = 3; + } +} diff --git a/referee_comm/include/proto/ssl_game_event.pb.go b/referee_comm/include/proto/ssl_game_event.pb.go new file mode 100644 index 00000000..cb03b9aa --- /dev/null +++ b/referee_comm/include/proto/ssl_game_event.pb.go @@ -0,0 +1,347 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_game_event.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type Game_Event_GameEventType int32 + +const ( + // not set + Game_Event_UNKNOWN Game_Event_GameEventType = 0 + // an event that is not listed in this enum yet. + // Give further details in the message below + Game_Event_CUSTOM Game_Event_GameEventType = 1 + // Law 3: Number of players + Game_Event_NUMBER_OF_PLAYERS Game_Event_GameEventType = 2 + // Law 9: Ball out of play + Game_Event_BALL_LEFT_FIELD Game_Event_GameEventType = 3 + // Law 10: Team scored a goal + Game_Event_GOAL Game_Event_GameEventType = 4 + // Law 9.3: lack of progress while bringing the ball into play + Game_Event_KICK_TIMEOUT Game_Event_GameEventType = 5 + // Law ?: There is no progress in game for (10|15)? seconds + Game_Event_NO_PROGRESS_IN_GAME Game_Event_GameEventType = 6 + // Law 12: Pushing / Substantial Contact + Game_Event_BOT_COLLISION Game_Event_GameEventType = 7 + // Law 12.2: Defender is completely inside penalty area + Game_Event_MULTIPLE_DEFENDER Game_Event_GameEventType = 8 + // Law 12: Defender is partially inside penalty area + Game_Event_MULTIPLE_DEFENDER_PARTIALLY Game_Event_GameEventType = 9 + // Law 12.3: Attacker in defense area + Game_Event_ATTACKER_IN_DEFENSE_AREA Game_Event_GameEventType = 10 + // Law 12: Icing (kicking over midline and opponent goal line) + Game_Event_ICING Game_Event_GameEventType = 11 + // Law 12: Ball speed + Game_Event_BALL_SPEED Game_Event_GameEventType = 12 + // Law 12: Robot speed during STOP + Game_Event_ROBOT_STOP_SPEED Game_Event_GameEventType = 13 + // Law 12: Maximum dribbling distance + Game_Event_BALL_DRIBBLING Game_Event_GameEventType = 14 + // Law 12: Touching the opponent goalkeeper + Game_Event_ATTACKER_TOUCH_KEEPER Game_Event_GameEventType = 15 + // Law 12: Double touch + Game_Event_DOUBLE_TOUCH Game_Event_GameEventType = 16 + // Law 13-17: Attacker not too close to the opponent's penalty area when ball enters play + Game_Event_ATTACKER_TO_DEFENCE_AREA Game_Event_GameEventType = 17 + // Law 13-17: Keeping the correct distance to the ball during opponents freekicks + Game_Event_DEFENDER_TO_KICK_POINT_DISTANCE Game_Event_GameEventType = 18 + // Law 12: A robot holds the ball deliberately + Game_Event_BALL_HOLDING Game_Event_GameEventType = 19 + // Law 12: The ball entered the goal directly after an indirect kick was performed + Game_Event_INDIRECT_GOAL Game_Event_GameEventType = 20 + // Law 9.2: Ball placement + Game_Event_BALL_PLACEMENT_FAILED Game_Event_GameEventType = 21 + // Law 10: A goal is only scored if the ball has not exceeded a robot height (150mm) between the last + // kick of an attacker and the time the ball crossed the goal line. + Game_Event_CHIP_ON_GOAL Game_Event_GameEventType = 22 +) + +var Game_Event_GameEventType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CUSTOM", + 2: "NUMBER_OF_PLAYERS", + 3: "BALL_LEFT_FIELD", + 4: "GOAL", + 5: "KICK_TIMEOUT", + 6: "NO_PROGRESS_IN_GAME", + 7: "BOT_COLLISION", + 8: "MULTIPLE_DEFENDER", + 9: "MULTIPLE_DEFENDER_PARTIALLY", + 10: "ATTACKER_IN_DEFENSE_AREA", + 11: "ICING", + 12: "BALL_SPEED", + 13: "ROBOT_STOP_SPEED", + 14: "BALL_DRIBBLING", + 15: "ATTACKER_TOUCH_KEEPER", + 16: "DOUBLE_TOUCH", + 17: "ATTACKER_TO_DEFENCE_AREA", + 18: "DEFENDER_TO_KICK_POINT_DISTANCE", + 19: "BALL_HOLDING", + 20: "INDIRECT_GOAL", + 21: "BALL_PLACEMENT_FAILED", + 22: "CHIP_ON_GOAL", +} + +var Game_Event_GameEventType_value = map[string]int32{ + "UNKNOWN": 0, + "CUSTOM": 1, + "NUMBER_OF_PLAYERS": 2, + "BALL_LEFT_FIELD": 3, + "GOAL": 4, + "KICK_TIMEOUT": 5, + "NO_PROGRESS_IN_GAME": 6, + "BOT_COLLISION": 7, + "MULTIPLE_DEFENDER": 8, + "MULTIPLE_DEFENDER_PARTIALLY": 9, + "ATTACKER_IN_DEFENSE_AREA": 10, + "ICING": 11, + "BALL_SPEED": 12, + "ROBOT_STOP_SPEED": 13, + "BALL_DRIBBLING": 14, + "ATTACKER_TOUCH_KEEPER": 15, + "DOUBLE_TOUCH": 16, + "ATTACKER_TO_DEFENCE_AREA": 17, + "DEFENDER_TO_KICK_POINT_DISTANCE": 18, + "BALL_HOLDING": 19, + "INDIRECT_GOAL": 20, + "BALL_PLACEMENT_FAILED": 21, + "CHIP_ON_GOAL": 22, +} + +func (x Game_Event_GameEventType) Enum() *Game_Event_GameEventType { + p := new(Game_Event_GameEventType) + *p = x + return p +} + +func (x Game_Event_GameEventType) String() string { + return proto.EnumName(Game_Event_GameEventType_name, int32(x)) +} + +func (x *Game_Event_GameEventType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Game_Event_GameEventType_value, data, "Game_Event_GameEventType") + if err != nil { + return err + } + *x = Game_Event_GameEventType(value) + return nil +} + +func (Game_Event_GameEventType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9d7737834ddab500, []int{0, 0} +} + +// a team +type Game_Event_Team int32 + +const ( + Game_Event_TEAM_UNKNOWN Game_Event_Team = 0 + Game_Event_TEAM_YELLOW Game_Event_Team = 1 + Game_Event_TEAM_BLUE Game_Event_Team = 2 +) + +var Game_Event_Team_name = map[int32]string{ + 0: "TEAM_UNKNOWN", + 1: "TEAM_YELLOW", + 2: "TEAM_BLUE", +} + +var Game_Event_Team_value = map[string]int32{ + "TEAM_UNKNOWN": 0, + "TEAM_YELLOW": 1, + "TEAM_BLUE": 2, +} + +func (x Game_Event_Team) Enum() *Game_Event_Team { + p := new(Game_Event_Team) + *p = x + return p +} + +func (x Game_Event_Team) String() string { + return proto.EnumName(Game_Event_Team_name, int32(x)) +} + +func (x *Game_Event_Team) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Game_Event_Team_value, data, "Game_Event_Team") + if err != nil { + return err + } + *x = Game_Event_Team(value) + return nil +} + +func (Game_Event_Team) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9d7737834ddab500, []int{0, 1} +} + +// a game event that caused a referee command +type Game_Event struct { + // the game event type that happened + GameEventType *Game_Event_GameEventType `protobuf:"varint,1,req,name=gameEventType,enum=Game_Event_GameEventType" json:"gameEventType,omitempty"` + // the team and optionally a designated robot that is the originator of the game event + Originator *Game_Event_Originator `protobuf:"bytes,2,opt,name=originator" json:"originator,omitempty"` + // a message describing further details of this game event + Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Game_Event) Reset() { *m = Game_Event{} } +func (m *Game_Event) String() string { return proto.CompactTextString(m) } +func (*Game_Event) ProtoMessage() {} +func (*Game_Event) Descriptor() ([]byte, []int) { + return fileDescriptor_9d7737834ddab500, []int{0} +} + +func (m *Game_Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Game_Event.Unmarshal(m, b) +} +func (m *Game_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Game_Event.Marshal(b, m, deterministic) +} +func (m *Game_Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Game_Event.Merge(m, src) +} +func (m *Game_Event) XXX_Size() int { + return xxx_messageInfo_Game_Event.Size(m) +} +func (m *Game_Event) XXX_DiscardUnknown() { + xxx_messageInfo_Game_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Game_Event proto.InternalMessageInfo + +func (m *Game_Event) GetGameEventType() Game_Event_GameEventType { + if m != nil && m.GameEventType != nil { + return *m.GameEventType + } + return Game_Event_UNKNOWN +} + +func (m *Game_Event) GetOriginator() *Game_Event_Originator { + if m != nil { + return m.Originator + } + return nil +} + +func (m *Game_Event) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +// information about an originator +type Game_Event_Originator struct { + Team *Game_Event_Team `protobuf:"varint,1,req,name=team,enum=Game_Event_Team" json:"team,omitempty"` + BotId *uint32 `protobuf:"varint,2,opt,name=botId" json:"botId,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Game_Event_Originator) Reset() { *m = Game_Event_Originator{} } +func (m *Game_Event_Originator) String() string { return proto.CompactTextString(m) } +func (*Game_Event_Originator) ProtoMessage() {} +func (*Game_Event_Originator) Descriptor() ([]byte, []int) { + return fileDescriptor_9d7737834ddab500, []int{0, 0} +} + +func (m *Game_Event_Originator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Game_Event_Originator.Unmarshal(m, b) +} +func (m *Game_Event_Originator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Game_Event_Originator.Marshal(b, m, deterministic) +} +func (m *Game_Event_Originator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Game_Event_Originator.Merge(m, src) +} +func (m *Game_Event_Originator) XXX_Size() int { + return xxx_messageInfo_Game_Event_Originator.Size(m) +} +func (m *Game_Event_Originator) XXX_DiscardUnknown() { + xxx_messageInfo_Game_Event_Originator.DiscardUnknown(m) +} + +var xxx_messageInfo_Game_Event_Originator proto.InternalMessageInfo + +func (m *Game_Event_Originator) GetTeam() Game_Event_Team { + if m != nil && m.Team != nil { + return *m.Team + } + return Game_Event_TEAM_UNKNOWN +} + +func (m *Game_Event_Originator) GetBotId() uint32 { + if m != nil && m.BotId != nil { + return *m.BotId + } + return 0 +} + +func init() { + proto.RegisterEnum("Game_Event_GameEventType", Game_Event_GameEventType_name, Game_Event_GameEventType_value) + proto.RegisterEnum("Game_Event_Team", Game_Event_Team_name, Game_Event_Team_value) + proto.RegisterType((*Game_Event)(nil), "Game_Event") + proto.RegisterType((*Game_Event_Originator)(nil), "Game_Event.Originator") +} + +func init() { proto.RegisterFile("ssl_game_event.proto", fileDescriptor_9d7737834ddab500) } + +var fileDescriptor_9d7737834ddab500 = []byte{ + // 532 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x4f, 0x6f, 0x1a, 0x31, + 0x10, 0xc5, 0x0b, 0x21, 0x7f, 0x18, 0xb2, 0xc4, 0x99, 0x90, 0x94, 0xb4, 0x95, 0x12, 0xa5, 0x3d, + 0xe4, 0x94, 0x43, 0x0e, 0x55, 0x6f, 0x95, 0x77, 0x77, 0x00, 0x0b, 0xaf, 0x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92, + 0xb2, 0xb0, 0x3a, 0x63, 0x35, 0xbc, 0x84, 0x73, 0x55, 0x66, 0x31, 0x19, 0xa7, 0x7b, 0x2e, 0x97, + 0x7c, 0x44, 0xa6, 0x60, 0x75, 0xbc, 0x80, 0xb3, 0x98, 0x4b, 0xe9, 0x24, 0xf5, 0xac, 0xeb, 0x09, + 0x92, 0x29, 0x3b, 0xc0, 0x13, 0x68, 0xf4, 0x35, 0x97, 0xac, 0x81, 0x0c, 0x4e, 0x87, 0x22, 0x19, + 0x3a, 0x2b, 0x32, 0xd2, 0xa5, 0x65, 0x87, 0xf8, 0x16, 0x2e, 0x94, 0x76, 0xb9, 0xd1, 0x7d, 0x43, + 0x45, 0xe1, 0x84, 0x72, 0x7d, 0x9e, 0x11, 0x3b, 0xc2, 0x73, 0x88, 0x62, 0x6d, 0x5d, 0xa2, 0xa5, + 0x14, 0x85, 0xd0, 0x8a, 0x1d, 0xfb, 0x99, 0x59, 0x29, 0xad, 0xc8, 0x25, 0xb9, 0x94, 0x7a, 0xa4, + 0x52, 0x32, 0xec, 0x04, 0x6f, 0xe0, 0xfd, 0x7f, 0xb2, 0xcb, 0xb9, 0xb1, 0x82, 0x4b, 0x39, 0x62, + 0x4d, 0xfc, 0x00, 0x5d, 0x6e, 0x2d, 0x4f, 0x86, 0x64, 0xfc, 0x80, 0xe0, 0x29, 0xc8, 0x71, 0x43, + 0x9c, 0x01, 0x36, 0xe1, 0x50, 0x24, 0x42, 0xf5, 0x59, 0x0b, 0xdb, 0x00, 0x81, 0xbe, 0xc8, 0x89, + 0x52, 0x76, 0x8a, 0x1d, 0x60, 0x46, 0x7b, 0x8a, 0xc2, 0xea, 0x7c, 0xad, 0x46, 0x88, 0xd0, 0x0e, + 0xae, 0xd4, 0x88, 0x38, 0x96, 0x3e, 0xd9, 0xc6, 0x6b, 0xb8, 0xdc, 0x8c, 0xb0, 0xba, 0x4c, 0x06, + 0x6e, 0x48, 0x94, 0x93, 0x61, 0x67, 0xfe, 0xce, 0xa9, 0x2e, 0x63, 0x49, 0xab, 0x06, 0x63, 0x7b, + 0x3c, 0x56, 0xaf, 0x78, 0x92, 0x35, 0xcf, 0x39, 0x7e, 0x84, 0x9b, 0xcd, 0x2d, 0xac, 0x76, 0x61, + 0x5f, 0xb9, 0x16, 0xca, 0xba, 0x54, 0x14, 0x96, 0xab, 0x84, 0x18, 0xfa, 0x43, 0x03, 0xc3, 0x40, + 0xcb, 0xd4, 0x13, 0x5c, 0xf8, 0x7d, 0x09, 0x95, 0x0a, 0x43, 0x89, 0x75, 0x61, 0xdb, 0x1d, 0x0f, + 0x15, 0x4c, 0xb9, 0xe4, 0x09, 0x65, 0xa4, 0xac, 0xeb, 0x71, 0x21, 0x29, 0x65, 0x97, 0x3e, 0x9f, + 0x0c, 0x44, 0xee, 0xb4, 0x5a, 0x99, 0xaf, 0xee, 0xbe, 0x40, 0xc3, 0xbf, 0x0f, 0xdf, 0xb1, 0xc4, + 0x33, 0xb7, 0xfd, 0xed, 0x67, 0xd0, 0x0a, 0xca, 0x88, 0xa4, 0xd4, 0x4f, 0xac, 0x86, 0x11, 0x34, + 0x83, 0x10, 0xcb, 0x92, 0x58, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x1c, 0x24, 0xc5, + 0x38, 0x03, 0x00, 0x00, +} diff --git a/referee_comm/include/proto/ssl_game_event.proto b/referee_comm/include/proto/ssl_game_event.proto new file mode 100644 index 00000000..246e4215 --- /dev/null +++ b/referee_comm/include/proto/ssl_game_event.proto @@ -0,0 +1,100 @@ +syntax = "proto2"; + +// a game event that caused a referee command +message Game_Event { + + enum GameEventType { + // not set + UNKNOWN = 0; + + // an event that is not listed in this enum yet. + // Give further details in the message below + CUSTOM = 1; + + // Law 3: Number of players + NUMBER_OF_PLAYERS = 2; + + // Law 9: Ball out of play + BALL_LEFT_FIELD = 3; + + // Law 10: Team scored a goal + GOAL = 4; + + // Law 9.3: lack of progress while bringing the ball into play + KICK_TIMEOUT = 5; + + // Law ?: There is no progress in game for (10|15)? seconds + NO_PROGRESS_IN_GAME = 6; + + // Law 12: Pushing / Substantial Contact + BOT_COLLISION = 7; + + // Law 12.2: Defender is completely inside penalty area + MULTIPLE_DEFENDER = 8; + + // Law 12: Defender is partially inside penalty area + MULTIPLE_DEFENDER_PARTIALLY = 9; + + // Law 12.3: Attacker in defense area + ATTACKER_IN_DEFENSE_AREA = 10; + + // Law 12: Icing (kicking over midline and opponent goal line) + ICING = 11; + + // Law 12: Ball speed + BALL_SPEED = 12; + + // Law 12: Robot speed during STOP + ROBOT_STOP_SPEED = 13; + + // Law 12: Maximum dribbling distance + BALL_DRIBBLING = 14; + + // Law 12: Touching the opponent goalkeeper + ATTACKER_TOUCH_KEEPER = 15; + + // Law 12: Double touch + DOUBLE_TOUCH = 16; + + // Law 13-17: Attacker not too close to the opponent's penalty area when ball enters play + ATTACKER_TO_DEFENCE_AREA = 17; + + // Law 13-17: Keeping the correct distance to the ball during opponents freekicks + DEFENDER_TO_KICK_POINT_DISTANCE = 18; + + // Law 12: A robot holds the ball deliberately + BALL_HOLDING = 19; + + // Law 12: The ball entered the goal directly after an indirect kick was performed + INDIRECT_GOAL = 20; + + // Law 9.2: Ball placement + BALL_PLACEMENT_FAILED = 21; + + // Law 10: A goal is only scored if the ball has not exceeded a robot height (150mm) between the last + // kick of an attacker and the time the ball crossed the goal line. + CHIP_ON_GOAL = 22; + } + + // the game event type that happened + required GameEventType gameEventType = 1; + + // a team + enum Team { + TEAM_UNKNOWN = 0; + TEAM_YELLOW = 1; + TEAM_BLUE = 2; + } + + // information about an originator + message Originator { + required Team team = 1; + optional uint32 botId = 2; + } + + // the team and optionally a designated robot that is the originator of the game event + optional Originator originator = 2; + + // a message describing further details of this game event + optional string message = 3; +} \ No newline at end of file diff --git a/referee_comm/include/proto/ssl_game_event_2019.pb.go b/referee_comm/include/proto/ssl_game_event_2019.pb.go new file mode 100644 index 00000000..69a83169 --- /dev/null +++ b/referee_comm/include/proto/ssl_game_event_2019.pb.go @@ -0,0 +1,3165 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_game_event_2019.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type GameEventType int32 + +const ( + GameEventType_UNKNOWN_GAME_EVENT_TYPE GameEventType = 0 + GameEventType_PREPARED GameEventType = 1 + GameEventType_NO_PROGRESS_IN_GAME GameEventType = 2 + GameEventType_PLACEMENT_FAILED GameEventType = 3 + GameEventType_PLACEMENT_SUCCEEDED GameEventType = 5 + GameEventType_BOT_SUBSTITUTION GameEventType = 37 + GameEventType_TOO_MANY_ROBOTS GameEventType = 38 + GameEventType_BALL_LEFT_FIELD_TOUCH_LINE GameEventType = 6 + GameEventType_BALL_LEFT_FIELD_GOAL_LINE GameEventType = 7 + GameEventType_POSSIBLE_GOAL GameEventType = 39 + GameEventType_GOAL GameEventType = 8 + GameEventType_INDIRECT_GOAL GameEventType = 9 + GameEventType_CHIPPED_GOAL GameEventType = 10 + GameEventType_AIMLESS_KICK GameEventType = 11 + GameEventType_KICK_TIMEOUT GameEventType = 12 + GameEventType_KEEPER_HELD_BALL GameEventType = 13 + GameEventType_ATTACKER_DOUBLE_TOUCHED_BALL GameEventType = 14 + GameEventType_ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA GameEventType = 15 + GameEventType_ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA GameEventType = 16 + GameEventType_ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA_SKIPPED GameEventType = 40 + GameEventType_BOT_DRIBBLED_BALL_TOO_FAR GameEventType = 17 + GameEventType_BOT_KICKED_BALL_TOO_FAST GameEventType = 18 + GameEventType_ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA GameEventType = 19 + GameEventType_BOT_INTERFERED_PLACEMENT GameEventType = 20 + GameEventType_BOT_CRASH_DRAWN GameEventType = 21 + GameEventType_BOT_CRASH_UNIQUE GameEventType = 22 + GameEventType_BOT_CRASH_UNIQUE_SKIPPED GameEventType = 23 + GameEventType_BOT_PUSHED_BOT GameEventType = 24 + GameEventType_BOT_PUSHED_BOT_SKIPPED GameEventType = 25 + GameEventType_BOT_HELD_BALL_DELIBERATELY GameEventType = 26 + GameEventType_BOT_TIPPED_OVER GameEventType = 27 + GameEventType_BOT_TOO_FAST_IN_STOP GameEventType = 28 + GameEventType_DEFENDER_TOO_CLOSE_TO_KICK_POINT GameEventType = 29 + GameEventType_DEFENDER_IN_DEFENSE_AREA_PARTIALLY GameEventType = 30 + GameEventType_DEFENDER_IN_DEFENSE_AREA GameEventType = 31 + GameEventType_MULTIPLE_CARDS GameEventType = 32 + GameEventType_MULTIPLE_PLACEMENT_FAILURES GameEventType = 33 + GameEventType_MULTIPLE_FOULS GameEventType = 34 + GameEventType_UNSPORTING_BEHAVIOR_MINOR GameEventType = 35 + GameEventType_UNSPORTING_BEHAVIOR_MAJOR GameEventType = 36 +) + +var GameEventType_name = map[int32]string{ + 0: "UNKNOWN_GAME_EVENT_TYPE", + 1: "PREPARED", + 2: "NO_PROGRESS_IN_GAME", + 3: "PLACEMENT_FAILED", + 5: "PLACEMENT_SUCCEEDED", + 37: "BOT_SUBSTITUTION", + 38: "TOO_MANY_ROBOTS", + 6: "BALL_LEFT_FIELD_TOUCH_LINE", + 7: "BALL_LEFT_FIELD_GOAL_LINE", + 39: "POSSIBLE_GOAL", + 8: "GOAL", + 9: "INDIRECT_GOAL", + 10: "CHIPPED_GOAL", + 11: "AIMLESS_KICK", + 12: "KICK_TIMEOUT", + 13: "KEEPER_HELD_BALL", + 14: "ATTACKER_DOUBLE_TOUCHED_BALL", + 15: "ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA", + 16: "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA", + 40: "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA_SKIPPED", + 17: "BOT_DRIBBLED_BALL_TOO_FAR", + 18: "BOT_KICKED_BALL_TOO_FAST", + 19: "ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA", + 20: "BOT_INTERFERED_PLACEMENT", + 21: "BOT_CRASH_DRAWN", + 22: "BOT_CRASH_UNIQUE", + 23: "BOT_CRASH_UNIQUE_SKIPPED", + 24: "BOT_PUSHED_BOT", + 25: "BOT_PUSHED_BOT_SKIPPED", + 26: "BOT_HELD_BALL_DELIBERATELY", + 27: "BOT_TIPPED_OVER", + 28: "BOT_TOO_FAST_IN_STOP", + 29: "DEFENDER_TOO_CLOSE_TO_KICK_POINT", + 30: "DEFENDER_IN_DEFENSE_AREA_PARTIALLY", + 31: "DEFENDER_IN_DEFENSE_AREA", + 32: "MULTIPLE_CARDS", + 33: "MULTIPLE_PLACEMENT_FAILURES", + 34: "MULTIPLE_FOULS", + 35: "UNSPORTING_BEHAVIOR_MINOR", + 36: "UNSPORTING_BEHAVIOR_MAJOR", +} + +var GameEventType_value = map[string]int32{ + "UNKNOWN_GAME_EVENT_TYPE": 0, + "PREPARED": 1, + "NO_PROGRESS_IN_GAME": 2, + "PLACEMENT_FAILED": 3, + "PLACEMENT_SUCCEEDED": 5, + "BOT_SUBSTITUTION": 37, + "TOO_MANY_ROBOTS": 38, + "BALL_LEFT_FIELD_TOUCH_LINE": 6, + "BALL_LEFT_FIELD_GOAL_LINE": 7, + "POSSIBLE_GOAL": 39, + "GOAL": 8, + "INDIRECT_GOAL": 9, + "CHIPPED_GOAL": 10, + "AIMLESS_KICK": 11, + "KICK_TIMEOUT": 12, + "KEEPER_HELD_BALL": 13, + "ATTACKER_DOUBLE_TOUCHED_BALL": 14, + "ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA": 15, + "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA": 16, + "ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA_SKIPPED": 40, + "BOT_DRIBBLED_BALL_TOO_FAR": 17, + "BOT_KICKED_BALL_TOO_FAST": 18, + "ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA": 19, + "BOT_INTERFERED_PLACEMENT": 20, + "BOT_CRASH_DRAWN": 21, + "BOT_CRASH_UNIQUE": 22, + "BOT_CRASH_UNIQUE_SKIPPED": 23, + "BOT_PUSHED_BOT": 24, + "BOT_PUSHED_BOT_SKIPPED": 25, + "BOT_HELD_BALL_DELIBERATELY": 26, + "BOT_TIPPED_OVER": 27, + "BOT_TOO_FAST_IN_STOP": 28, + "DEFENDER_TOO_CLOSE_TO_KICK_POINT": 29, + "DEFENDER_IN_DEFENSE_AREA_PARTIALLY": 30, + "DEFENDER_IN_DEFENSE_AREA": 31, + "MULTIPLE_CARDS": 32, + "MULTIPLE_PLACEMENT_FAILURES": 33, + "MULTIPLE_FOULS": 34, + "UNSPORTING_BEHAVIOR_MINOR": 35, + "UNSPORTING_BEHAVIOR_MAJOR": 36, +} + +func (x GameEventType) Enum() *GameEventType { + p := new(GameEventType) + *p = x + return p +} + +func (x GameEventType) String() string { + return proto.EnumName(GameEventType_name, int32(x)) +} + +func (x *GameEventType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GameEventType_value, data, "GameEventType") + if err != nil { + return err + } + *x = GameEventType(value) + return nil +} + +func (GameEventType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0} +} + +// GameEvent contains exactly one game event +// Each game event has optional and required fields. The required fields are mandatory to process the event. +// Some optional fields are only used for visualization, others are required to determine the ball placement position. +// If fields are missing that are required for the ball placement position, no ball placement command will be issued. +// Fields are marked optional to make testing and extending of the protocol easier. +// An autoRef should ideally set all fields, except if there are good reasons to not do so. +type GameEvent struct { + Type *GameEventType `protobuf:"varint,40,req,name=type,enum=GameEventType" json:"type,omitempty"` + // the origin of this game event + // empty, if it originates from game controller + // autoRef name(s), if it originates from one or more autoRefs + Origin []string `protobuf:"bytes,41,rep,name=origin" json:"origin,omitempty"` + // the event that occurred + // + // Types that are valid to be assigned to Event: + // *GameEvent_Prepared_ + // *GameEvent_NoProgressInGame_ + // *GameEvent_PlacementFailed_ + // *GameEvent_PlacementSucceeded_ + // *GameEvent_BotSubstitution_ + // *GameEvent_TooManyRobots_ + // *GameEvent_BallLeftFieldTouchLine + // *GameEvent_BallLeftFieldGoalLine + // *GameEvent_PossibleGoal + // *GameEvent_Goal_ + // *GameEvent_IndirectGoal_ + // *GameEvent_ChippedGoal_ + // *GameEvent_AimlessKick_ + // *GameEvent_KickTimeout_ + // *GameEvent_KeeperHeldBall_ + // *GameEvent_AttackerDoubleTouchedBall_ + // *GameEvent_AttackerTouchedBallInDefenseArea_ + // *GameEvent_AttackerTouchedOpponentInDefenseArea_ + // *GameEvent_AttackerTouchedOpponentInDefenseAreaSkipped + // *GameEvent_BotDribbledBallTooFar_ + // *GameEvent_BotKickedBallTooFast_ + // *GameEvent_AttackerTooCloseToDefenseArea_ + // *GameEvent_BotInterferedPlacement_ + // *GameEvent_BotCrashDrawn_ + // *GameEvent_BotCrashUnique_ + // *GameEvent_BotCrashUniqueSkipped + // *GameEvent_BotPushedBot_ + // *GameEvent_BotPushedBotSkipped + // *GameEvent_BotHeldBallDeliberately_ + // *GameEvent_BotTippedOver_ + // *GameEvent_BotTooFastInStop_ + // *GameEvent_DefenderTooCloseToKickPoint_ + // *GameEvent_DefenderInDefenseAreaPartially_ + // *GameEvent_DefenderInDefenseArea_ + // *GameEvent_MultipleCards_ + // *GameEvent_MultiplePlacementFailures_ + // *GameEvent_MultipleFouls_ + // *GameEvent_UnsportingBehaviorMinor_ + // *GameEvent_UnsportingBehaviorMajor_ + Event isGameEvent_Event `protobuf_oneof:"event"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent) Reset() { *m = GameEvent{} } +func (m *GameEvent) String() string { return proto.CompactTextString(m) } +func (*GameEvent) ProtoMessage() {} +func (*GameEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0} +} + +func (m *GameEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent.Unmarshal(m, b) +} +func (m *GameEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent.Marshal(b, m, deterministic) +} +func (m *GameEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent.Merge(m, src) +} +func (m *GameEvent) XXX_Size() int { + return xxx_messageInfo_GameEvent.Size(m) +} +func (m *GameEvent) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent proto.InternalMessageInfo + +func (m *GameEvent) GetType() GameEventType { + if m != nil && m.Type != nil { + return *m.Type + } + return GameEventType_UNKNOWN_GAME_EVENT_TYPE +} + +func (m *GameEvent) GetOrigin() []string { + if m != nil { + return m.Origin + } + return nil +} + +type isGameEvent_Event interface { + isGameEvent_Event() +} + +type GameEvent_Prepared_ struct { + Prepared *GameEvent_Prepared `protobuf:"bytes,1,opt,name=prepared,oneof"` +} + +type GameEvent_NoProgressInGame_ struct { + NoProgressInGame *GameEvent_NoProgressInGame `protobuf:"bytes,2,opt,name=no_progress_in_game,json=noProgressInGame,oneof"` +} + +type GameEvent_PlacementFailed_ struct { + PlacementFailed *GameEvent_PlacementFailed `protobuf:"bytes,3,opt,name=placement_failed,json=placementFailed,oneof"` +} + +type GameEvent_PlacementSucceeded_ struct { + PlacementSucceeded *GameEvent_PlacementSucceeded `protobuf:"bytes,5,opt,name=placement_succeeded,json=placementSucceeded,oneof"` +} + +type GameEvent_BotSubstitution_ struct { + BotSubstitution *GameEvent_BotSubstitution `protobuf:"bytes,37,opt,name=bot_substitution,json=botSubstitution,oneof"` +} + +type GameEvent_TooManyRobots_ struct { + TooManyRobots *GameEvent_TooManyRobots `protobuf:"bytes,38,opt,name=too_many_robots,json=tooManyRobots,oneof"` +} + +type GameEvent_BallLeftFieldTouchLine struct { + BallLeftFieldTouchLine *GameEvent_BallLeftField `protobuf:"bytes,6,opt,name=ball_left_field_touch_line,json=ballLeftFieldTouchLine,oneof"` +} + +type GameEvent_BallLeftFieldGoalLine struct { + BallLeftFieldGoalLine *GameEvent_BallLeftField `protobuf:"bytes,7,opt,name=ball_left_field_goal_line,json=ballLeftFieldGoalLine,oneof"` +} + +type GameEvent_PossibleGoal struct { + PossibleGoal *GameEvent_Goal `protobuf:"bytes,39,opt,name=possible_goal,json=possibleGoal,oneof"` +} + +type GameEvent_Goal_ struct { + Goal *GameEvent_Goal `protobuf:"bytes,8,opt,name=goal,oneof"` +} + +type GameEvent_IndirectGoal_ struct { + IndirectGoal *GameEvent_IndirectGoal `protobuf:"bytes,9,opt,name=indirect_goal,json=indirectGoal,oneof"` +} + +type GameEvent_ChippedGoal_ struct { + ChippedGoal *GameEvent_ChippedGoal `protobuf:"bytes,10,opt,name=chipped_goal,json=chippedGoal,oneof"` +} + +type GameEvent_AimlessKick_ struct { + AimlessKick *GameEvent_AimlessKick `protobuf:"bytes,11,opt,name=aimless_kick,json=aimlessKick,oneof"` +} + +type GameEvent_KickTimeout_ struct { + KickTimeout *GameEvent_KickTimeout `protobuf:"bytes,12,opt,name=kick_timeout,json=kickTimeout,oneof"` +} + +type GameEvent_KeeperHeldBall_ struct { + KeeperHeldBall *GameEvent_KeeperHeldBall `protobuf:"bytes,13,opt,name=keeper_held_ball,json=keeperHeldBall,oneof"` +} + +type GameEvent_AttackerDoubleTouchedBall_ struct { + AttackerDoubleTouchedBall *GameEvent_AttackerDoubleTouchedBall `protobuf:"bytes,14,opt,name=attacker_double_touched_ball,json=attackerDoubleTouchedBall,oneof"` +} + +type GameEvent_AttackerTouchedBallInDefenseArea_ struct { + AttackerTouchedBallInDefenseArea *GameEvent_AttackerTouchedBallInDefenseArea `protobuf:"bytes,15,opt,name=attacker_touched_ball_in_defense_area,json=attackerTouchedBallInDefenseArea,oneof"` +} + +type GameEvent_AttackerTouchedOpponentInDefenseArea_ struct { + AttackerTouchedOpponentInDefenseArea *GameEvent_AttackerTouchedOpponentInDefenseArea `protobuf:"bytes,16,opt,name=attacker_touched_opponent_in_defense_area,json=attackerTouchedOpponentInDefenseArea,oneof"` +} + +type GameEvent_AttackerTouchedOpponentInDefenseAreaSkipped struct { + AttackerTouchedOpponentInDefenseAreaSkipped *GameEvent_AttackerTouchedOpponentInDefenseArea `protobuf:"bytes,42,opt,name=attacker_touched_opponent_in_defense_area_skipped,json=attackerTouchedOpponentInDefenseAreaSkipped,oneof"` +} + +type GameEvent_BotDribbledBallTooFar_ struct { + BotDribbledBallTooFar *GameEvent_BotDribbledBallTooFar `protobuf:"bytes,17,opt,name=bot_dribbled_ball_too_far,json=botDribbledBallTooFar,oneof"` +} + +type GameEvent_BotKickedBallTooFast_ struct { + BotKickedBallTooFast *GameEvent_BotKickedBallTooFast `protobuf:"bytes,18,opt,name=bot_kicked_ball_too_fast,json=botKickedBallTooFast,oneof"` +} + +type GameEvent_AttackerTooCloseToDefenseArea_ struct { + AttackerTooCloseToDefenseArea *GameEvent_AttackerTooCloseToDefenseArea `protobuf:"bytes,19,opt,name=attacker_too_close_to_defense_area,json=attackerTooCloseToDefenseArea,oneof"` +} + +type GameEvent_BotInterferedPlacement_ struct { + BotInterferedPlacement *GameEvent_BotInterferedPlacement `protobuf:"bytes,20,opt,name=bot_interfered_placement,json=botInterferedPlacement,oneof"` +} + +type GameEvent_BotCrashDrawn_ struct { + BotCrashDrawn *GameEvent_BotCrashDrawn `protobuf:"bytes,21,opt,name=bot_crash_drawn,json=botCrashDrawn,oneof"` +} + +type GameEvent_BotCrashUnique_ struct { + BotCrashUnique *GameEvent_BotCrashUnique `protobuf:"bytes,22,opt,name=bot_crash_unique,json=botCrashUnique,oneof"` +} + +type GameEvent_BotCrashUniqueSkipped struct { + BotCrashUniqueSkipped *GameEvent_BotCrashUnique `protobuf:"bytes,23,opt,name=bot_crash_unique_skipped,json=botCrashUniqueSkipped,oneof"` +} + +type GameEvent_BotPushedBot_ struct { + BotPushedBot *GameEvent_BotPushedBot `protobuf:"bytes,24,opt,name=bot_pushed_bot,json=botPushedBot,oneof"` +} + +type GameEvent_BotPushedBotSkipped struct { + BotPushedBotSkipped *GameEvent_BotPushedBot `protobuf:"bytes,25,opt,name=bot_pushed_bot_skipped,json=botPushedBotSkipped,oneof"` +} + +type GameEvent_BotHeldBallDeliberately_ struct { + BotHeldBallDeliberately *GameEvent_BotHeldBallDeliberately `protobuf:"bytes,26,opt,name=bot_held_ball_deliberately,json=botHeldBallDeliberately,oneof"` +} + +type GameEvent_BotTippedOver_ struct { + BotTippedOver *GameEvent_BotTippedOver `protobuf:"bytes,27,opt,name=bot_tipped_over,json=botTippedOver,oneof"` +} + +type GameEvent_BotTooFastInStop_ struct { + BotTooFastInStop *GameEvent_BotTooFastInStop `protobuf:"bytes,28,opt,name=bot_too_fast_in_stop,json=botTooFastInStop,oneof"` +} + +type GameEvent_DefenderTooCloseToKickPoint_ struct { + DefenderTooCloseToKickPoint *GameEvent_DefenderTooCloseToKickPoint `protobuf:"bytes,29,opt,name=defender_too_close_to_kick_point,json=defenderTooCloseToKickPoint,oneof"` +} + +type GameEvent_DefenderInDefenseAreaPartially_ struct { + DefenderInDefenseAreaPartially *GameEvent_DefenderInDefenseAreaPartially `protobuf:"bytes,30,opt,name=defender_in_defense_area_partially,json=defenderInDefenseAreaPartially,oneof"` +} + +type GameEvent_DefenderInDefenseArea_ struct { + DefenderInDefenseArea *GameEvent_DefenderInDefenseArea `protobuf:"bytes,31,opt,name=defender_in_defense_area,json=defenderInDefenseArea,oneof"` +} + +type GameEvent_MultipleCards_ struct { + MultipleCards *GameEvent_MultipleCards `protobuf:"bytes,32,opt,name=multiple_cards,json=multipleCards,oneof"` +} + +type GameEvent_MultiplePlacementFailures_ struct { + MultiplePlacementFailures *GameEvent_MultiplePlacementFailures `protobuf:"bytes,33,opt,name=multiple_placement_failures,json=multiplePlacementFailures,oneof"` +} + +type GameEvent_MultipleFouls_ struct { + MultipleFouls *GameEvent_MultipleFouls `protobuf:"bytes,34,opt,name=multiple_fouls,json=multipleFouls,oneof"` +} + +type GameEvent_UnsportingBehaviorMinor_ struct { + UnsportingBehaviorMinor *GameEvent_UnsportingBehaviorMinor `protobuf:"bytes,35,opt,name=unsporting_behavior_minor,json=unsportingBehaviorMinor,oneof"` +} + +type GameEvent_UnsportingBehaviorMajor_ struct { + UnsportingBehaviorMajor *GameEvent_UnsportingBehaviorMajor `protobuf:"bytes,36,opt,name=unsporting_behavior_major,json=unsportingBehaviorMajor,oneof"` +} + +func (*GameEvent_Prepared_) isGameEvent_Event() {} + +func (*GameEvent_NoProgressInGame_) isGameEvent_Event() {} + +func (*GameEvent_PlacementFailed_) isGameEvent_Event() {} + +func (*GameEvent_PlacementSucceeded_) isGameEvent_Event() {} + +func (*GameEvent_BotSubstitution_) isGameEvent_Event() {} + +func (*GameEvent_TooManyRobots_) isGameEvent_Event() {} + +func (*GameEvent_BallLeftFieldTouchLine) isGameEvent_Event() {} + +func (*GameEvent_BallLeftFieldGoalLine) isGameEvent_Event() {} + +func (*GameEvent_PossibleGoal) isGameEvent_Event() {} + +func (*GameEvent_Goal_) isGameEvent_Event() {} + +func (*GameEvent_IndirectGoal_) isGameEvent_Event() {} + +func (*GameEvent_ChippedGoal_) isGameEvent_Event() {} + +func (*GameEvent_AimlessKick_) isGameEvent_Event() {} + +func (*GameEvent_KickTimeout_) isGameEvent_Event() {} + +func (*GameEvent_KeeperHeldBall_) isGameEvent_Event() {} + +func (*GameEvent_AttackerDoubleTouchedBall_) isGameEvent_Event() {} + +func (*GameEvent_AttackerTouchedBallInDefenseArea_) isGameEvent_Event() {} + +func (*GameEvent_AttackerTouchedOpponentInDefenseArea_) isGameEvent_Event() {} + +func (*GameEvent_AttackerTouchedOpponentInDefenseAreaSkipped) isGameEvent_Event() {} + +func (*GameEvent_BotDribbledBallTooFar_) isGameEvent_Event() {} + +func (*GameEvent_BotKickedBallTooFast_) isGameEvent_Event() {} + +func (*GameEvent_AttackerTooCloseToDefenseArea_) isGameEvent_Event() {} + +func (*GameEvent_BotInterferedPlacement_) isGameEvent_Event() {} + +func (*GameEvent_BotCrashDrawn_) isGameEvent_Event() {} + +func (*GameEvent_BotCrashUnique_) isGameEvent_Event() {} + +func (*GameEvent_BotCrashUniqueSkipped) isGameEvent_Event() {} + +func (*GameEvent_BotPushedBot_) isGameEvent_Event() {} + +func (*GameEvent_BotPushedBotSkipped) isGameEvent_Event() {} + +func (*GameEvent_BotHeldBallDeliberately_) isGameEvent_Event() {} + +func (*GameEvent_BotTippedOver_) isGameEvent_Event() {} + +func (*GameEvent_BotTooFastInStop_) isGameEvent_Event() {} + +func (*GameEvent_DefenderTooCloseToKickPoint_) isGameEvent_Event() {} + +func (*GameEvent_DefenderInDefenseAreaPartially_) isGameEvent_Event() {} + +func (*GameEvent_DefenderInDefenseArea_) isGameEvent_Event() {} + +func (*GameEvent_MultipleCards_) isGameEvent_Event() {} + +func (*GameEvent_MultiplePlacementFailures_) isGameEvent_Event() {} + +func (*GameEvent_MultipleFouls_) isGameEvent_Event() {} + +func (*GameEvent_UnsportingBehaviorMinor_) isGameEvent_Event() {} + +func (*GameEvent_UnsportingBehaviorMajor_) isGameEvent_Event() {} + +func (m *GameEvent) GetEvent() isGameEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (m *GameEvent) GetPrepared() *GameEvent_Prepared { + if x, ok := m.GetEvent().(*GameEvent_Prepared_); ok { + return x.Prepared + } + return nil +} + +func (m *GameEvent) GetNoProgressInGame() *GameEvent_NoProgressInGame { + if x, ok := m.GetEvent().(*GameEvent_NoProgressInGame_); ok { + return x.NoProgressInGame + } + return nil +} + +func (m *GameEvent) GetPlacementFailed() *GameEvent_PlacementFailed { + if x, ok := m.GetEvent().(*GameEvent_PlacementFailed_); ok { + return x.PlacementFailed + } + return nil +} + +func (m *GameEvent) GetPlacementSucceeded() *GameEvent_PlacementSucceeded { + if x, ok := m.GetEvent().(*GameEvent_PlacementSucceeded_); ok { + return x.PlacementSucceeded + } + return nil +} + +func (m *GameEvent) GetBotSubstitution() *GameEvent_BotSubstitution { + if x, ok := m.GetEvent().(*GameEvent_BotSubstitution_); ok { + return x.BotSubstitution + } + return nil +} + +func (m *GameEvent) GetTooManyRobots() *GameEvent_TooManyRobots { + if x, ok := m.GetEvent().(*GameEvent_TooManyRobots_); ok { + return x.TooManyRobots + } + return nil +} + +func (m *GameEvent) GetBallLeftFieldTouchLine() *GameEvent_BallLeftField { + if x, ok := m.GetEvent().(*GameEvent_BallLeftFieldTouchLine); ok { + return x.BallLeftFieldTouchLine + } + return nil +} + +func (m *GameEvent) GetBallLeftFieldGoalLine() *GameEvent_BallLeftField { + if x, ok := m.GetEvent().(*GameEvent_BallLeftFieldGoalLine); ok { + return x.BallLeftFieldGoalLine + } + return nil +} + +func (m *GameEvent) GetPossibleGoal() *GameEvent_Goal { + if x, ok := m.GetEvent().(*GameEvent_PossibleGoal); ok { + return x.PossibleGoal + } + return nil +} + +func (m *GameEvent) GetGoal() *GameEvent_Goal { + if x, ok := m.GetEvent().(*GameEvent_Goal_); ok { + return x.Goal + } + return nil +} + +func (m *GameEvent) GetIndirectGoal() *GameEvent_IndirectGoal { + if x, ok := m.GetEvent().(*GameEvent_IndirectGoal_); ok { + return x.IndirectGoal + } + return nil +} + +func (m *GameEvent) GetChippedGoal() *GameEvent_ChippedGoal { + if x, ok := m.GetEvent().(*GameEvent_ChippedGoal_); ok { + return x.ChippedGoal + } + return nil +} + +func (m *GameEvent) GetAimlessKick() *GameEvent_AimlessKick { + if x, ok := m.GetEvent().(*GameEvent_AimlessKick_); ok { + return x.AimlessKick + } + return nil +} + +func (m *GameEvent) GetKickTimeout() *GameEvent_KickTimeout { + if x, ok := m.GetEvent().(*GameEvent_KickTimeout_); ok { + return x.KickTimeout + } + return nil +} + +func (m *GameEvent) GetKeeperHeldBall() *GameEvent_KeeperHeldBall { + if x, ok := m.GetEvent().(*GameEvent_KeeperHeldBall_); ok { + return x.KeeperHeldBall + } + return nil +} + +func (m *GameEvent) GetAttackerDoubleTouchedBall() *GameEvent_AttackerDoubleTouchedBall { + if x, ok := m.GetEvent().(*GameEvent_AttackerDoubleTouchedBall_); ok { + return x.AttackerDoubleTouchedBall + } + return nil +} + +func (m *GameEvent) GetAttackerTouchedBallInDefenseArea() *GameEvent_AttackerTouchedBallInDefenseArea { + if x, ok := m.GetEvent().(*GameEvent_AttackerTouchedBallInDefenseArea_); ok { + return x.AttackerTouchedBallInDefenseArea + } + return nil +} + +func (m *GameEvent) GetAttackerTouchedOpponentInDefenseArea() *GameEvent_AttackerTouchedOpponentInDefenseArea { + if x, ok := m.GetEvent().(*GameEvent_AttackerTouchedOpponentInDefenseArea_); ok { + return x.AttackerTouchedOpponentInDefenseArea + } + return nil +} + +func (m *GameEvent) GetAttackerTouchedOpponentInDefenseAreaSkipped() *GameEvent_AttackerTouchedOpponentInDefenseArea { + if x, ok := m.GetEvent().(*GameEvent_AttackerTouchedOpponentInDefenseAreaSkipped); ok { + return x.AttackerTouchedOpponentInDefenseAreaSkipped + } + return nil +} + +func (m *GameEvent) GetBotDribbledBallTooFar() *GameEvent_BotDribbledBallTooFar { + if x, ok := m.GetEvent().(*GameEvent_BotDribbledBallTooFar_); ok { + return x.BotDribbledBallTooFar + } + return nil +} + +func (m *GameEvent) GetBotKickedBallTooFast() *GameEvent_BotKickedBallTooFast { + if x, ok := m.GetEvent().(*GameEvent_BotKickedBallTooFast_); ok { + return x.BotKickedBallTooFast + } + return nil +} + +func (m *GameEvent) GetAttackerTooCloseToDefenseArea() *GameEvent_AttackerTooCloseToDefenseArea { + if x, ok := m.GetEvent().(*GameEvent_AttackerTooCloseToDefenseArea_); ok { + return x.AttackerTooCloseToDefenseArea + } + return nil +} + +func (m *GameEvent) GetBotInterferedPlacement() *GameEvent_BotInterferedPlacement { + if x, ok := m.GetEvent().(*GameEvent_BotInterferedPlacement_); ok { + return x.BotInterferedPlacement + } + return nil +} + +func (m *GameEvent) GetBotCrashDrawn() *GameEvent_BotCrashDrawn { + if x, ok := m.GetEvent().(*GameEvent_BotCrashDrawn_); ok { + return x.BotCrashDrawn + } + return nil +} + +func (m *GameEvent) GetBotCrashUnique() *GameEvent_BotCrashUnique { + if x, ok := m.GetEvent().(*GameEvent_BotCrashUnique_); ok { + return x.BotCrashUnique + } + return nil +} + +func (m *GameEvent) GetBotCrashUniqueSkipped() *GameEvent_BotCrashUnique { + if x, ok := m.GetEvent().(*GameEvent_BotCrashUniqueSkipped); ok { + return x.BotCrashUniqueSkipped + } + return nil +} + +func (m *GameEvent) GetBotPushedBot() *GameEvent_BotPushedBot { + if x, ok := m.GetEvent().(*GameEvent_BotPushedBot_); ok { + return x.BotPushedBot + } + return nil +} + +func (m *GameEvent) GetBotPushedBotSkipped() *GameEvent_BotPushedBot { + if x, ok := m.GetEvent().(*GameEvent_BotPushedBotSkipped); ok { + return x.BotPushedBotSkipped + } + return nil +} + +func (m *GameEvent) GetBotHeldBallDeliberately() *GameEvent_BotHeldBallDeliberately { + if x, ok := m.GetEvent().(*GameEvent_BotHeldBallDeliberately_); ok { + return x.BotHeldBallDeliberately + } + return nil +} + +func (m *GameEvent) GetBotTippedOver() *GameEvent_BotTippedOver { + if x, ok := m.GetEvent().(*GameEvent_BotTippedOver_); ok { + return x.BotTippedOver + } + return nil +} + +func (m *GameEvent) GetBotTooFastInStop() *GameEvent_BotTooFastInStop { + if x, ok := m.GetEvent().(*GameEvent_BotTooFastInStop_); ok { + return x.BotTooFastInStop + } + return nil +} + +func (m *GameEvent) GetDefenderTooCloseToKickPoint() *GameEvent_DefenderTooCloseToKickPoint { + if x, ok := m.GetEvent().(*GameEvent_DefenderTooCloseToKickPoint_); ok { + return x.DefenderTooCloseToKickPoint + } + return nil +} + +func (m *GameEvent) GetDefenderInDefenseAreaPartially() *GameEvent_DefenderInDefenseAreaPartially { + if x, ok := m.GetEvent().(*GameEvent_DefenderInDefenseAreaPartially_); ok { + return x.DefenderInDefenseAreaPartially + } + return nil +} + +func (m *GameEvent) GetDefenderInDefenseArea() *GameEvent_DefenderInDefenseArea { + if x, ok := m.GetEvent().(*GameEvent_DefenderInDefenseArea_); ok { + return x.DefenderInDefenseArea + } + return nil +} + +func (m *GameEvent) GetMultipleCards() *GameEvent_MultipleCards { + if x, ok := m.GetEvent().(*GameEvent_MultipleCards_); ok { + return x.MultipleCards + } + return nil +} + +func (m *GameEvent) GetMultiplePlacementFailures() *GameEvent_MultiplePlacementFailures { + if x, ok := m.GetEvent().(*GameEvent_MultiplePlacementFailures_); ok { + return x.MultiplePlacementFailures + } + return nil +} + +func (m *GameEvent) GetMultipleFouls() *GameEvent_MultipleFouls { + if x, ok := m.GetEvent().(*GameEvent_MultipleFouls_); ok { + return x.MultipleFouls + } + return nil +} + +func (m *GameEvent) GetUnsportingBehaviorMinor() *GameEvent_UnsportingBehaviorMinor { + if x, ok := m.GetEvent().(*GameEvent_UnsportingBehaviorMinor_); ok { + return x.UnsportingBehaviorMinor + } + return nil +} + +func (m *GameEvent) GetUnsportingBehaviorMajor() *GameEvent_UnsportingBehaviorMajor { + if x, ok := m.GetEvent().(*GameEvent_UnsportingBehaviorMajor_); ok { + return x.UnsportingBehaviorMajor + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GameEvent) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GameEvent_Prepared_)(nil), + (*GameEvent_NoProgressInGame_)(nil), + (*GameEvent_PlacementFailed_)(nil), + (*GameEvent_PlacementSucceeded_)(nil), + (*GameEvent_BotSubstitution_)(nil), + (*GameEvent_TooManyRobots_)(nil), + (*GameEvent_BallLeftFieldTouchLine)(nil), + (*GameEvent_BallLeftFieldGoalLine)(nil), + (*GameEvent_PossibleGoal)(nil), + (*GameEvent_Goal_)(nil), + (*GameEvent_IndirectGoal_)(nil), + (*GameEvent_ChippedGoal_)(nil), + (*GameEvent_AimlessKick_)(nil), + (*GameEvent_KickTimeout_)(nil), + (*GameEvent_KeeperHeldBall_)(nil), + (*GameEvent_AttackerDoubleTouchedBall_)(nil), + (*GameEvent_AttackerTouchedBallInDefenseArea_)(nil), + (*GameEvent_AttackerTouchedOpponentInDefenseArea_)(nil), + (*GameEvent_AttackerTouchedOpponentInDefenseAreaSkipped)(nil), + (*GameEvent_BotDribbledBallTooFar_)(nil), + (*GameEvent_BotKickedBallTooFast_)(nil), + (*GameEvent_AttackerTooCloseToDefenseArea_)(nil), + (*GameEvent_BotInterferedPlacement_)(nil), + (*GameEvent_BotCrashDrawn_)(nil), + (*GameEvent_BotCrashUnique_)(nil), + (*GameEvent_BotCrashUniqueSkipped)(nil), + (*GameEvent_BotPushedBot_)(nil), + (*GameEvent_BotPushedBotSkipped)(nil), + (*GameEvent_BotHeldBallDeliberately_)(nil), + (*GameEvent_BotTippedOver_)(nil), + (*GameEvent_BotTooFastInStop_)(nil), + (*GameEvent_DefenderTooCloseToKickPoint_)(nil), + (*GameEvent_DefenderInDefenseAreaPartially_)(nil), + (*GameEvent_DefenderInDefenseArea_)(nil), + (*GameEvent_MultipleCards_)(nil), + (*GameEvent_MultiplePlacementFailures_)(nil), + (*GameEvent_MultipleFouls_)(nil), + (*GameEvent_UnsportingBehaviorMinor_)(nil), + (*GameEvent_UnsportingBehaviorMajor_)(nil), + } +} + +// the ball left the field normally +type GameEvent_BallLeftField struct { + // the team that last touched the ball + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that last touched the ball + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location where the ball left the field + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BallLeftField) Reset() { *m = GameEvent_BallLeftField{} } +func (m *GameEvent_BallLeftField) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BallLeftField) ProtoMessage() {} +func (*GameEvent_BallLeftField) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 0} +} + +func (m *GameEvent_BallLeftField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BallLeftField.Unmarshal(m, b) +} +func (m *GameEvent_BallLeftField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BallLeftField.Marshal(b, m, deterministic) +} +func (m *GameEvent_BallLeftField) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BallLeftField.Merge(m, src) +} +func (m *GameEvent_BallLeftField) XXX_Size() int { + return xxx_messageInfo_GameEvent_BallLeftField.Size(m) +} +func (m *GameEvent_BallLeftField) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BallLeftField.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BallLeftField proto.InternalMessageInfo + +func (m *GameEvent_BallLeftField) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BallLeftField) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BallLeftField) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// the ball left the field via goal line and a team committed an aimless kick +type GameEvent_AimlessKick struct { + // the team that last touched the ball + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that last touched the ball + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location where the ball left the field + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the location where the ball was last touched + KickLocation *Location `protobuf:"bytes,4,opt,name=kick_location,json=kickLocation" json:"kick_location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_AimlessKick) Reset() { *m = GameEvent_AimlessKick{} } +func (m *GameEvent_AimlessKick) String() string { return proto.CompactTextString(m) } +func (*GameEvent_AimlessKick) ProtoMessage() {} +func (*GameEvent_AimlessKick) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 1} +} + +func (m *GameEvent_AimlessKick) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_AimlessKick.Unmarshal(m, b) +} +func (m *GameEvent_AimlessKick) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_AimlessKick.Marshal(b, m, deterministic) +} +func (m *GameEvent_AimlessKick) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_AimlessKick.Merge(m, src) +} +func (m *GameEvent_AimlessKick) XXX_Size() int { + return xxx_messageInfo_GameEvent_AimlessKick.Size(m) +} +func (m *GameEvent_AimlessKick) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_AimlessKick.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_AimlessKick proto.InternalMessageInfo + +func (m *GameEvent_AimlessKick) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_AimlessKick) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_AimlessKick) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_AimlessKick) GetKickLocation() *Location { + if m != nil { + return m.KickLocation + } + return nil +} + +// a team shot a goal +type GameEvent_Goal struct { + // the team that scored the goal + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the team that shot the goal (different from by_team for own goals) + KickingTeam *Team `protobuf:"varint,6,opt,name=kicking_team,json=kickingTeam,enum=Team" json:"kicking_team,omitempty"` + // the bot that shot the goal + KickingBot *uint32 `protobuf:"varint,2,opt,name=kicking_bot,json=kickingBot" json:"kicking_bot,omitempty"` + // the location where the ball entered the goal + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the location where the ball was kicked + KickLocation *Location `protobuf:"bytes,4,opt,name=kick_location,json=kickLocation" json:"kick_location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_Goal) Reset() { *m = GameEvent_Goal{} } +func (m *GameEvent_Goal) String() string { return proto.CompactTextString(m) } +func (*GameEvent_Goal) ProtoMessage() {} +func (*GameEvent_Goal) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 2} +} + +func (m *GameEvent_Goal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_Goal.Unmarshal(m, b) +} +func (m *GameEvent_Goal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_Goal.Marshal(b, m, deterministic) +} +func (m *GameEvent_Goal) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_Goal.Merge(m, src) +} +func (m *GameEvent_Goal) XXX_Size() int { + return xxx_messageInfo_GameEvent_Goal.Size(m) +} +func (m *GameEvent_Goal) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_Goal.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_Goal proto.InternalMessageInfo + +func (m *GameEvent_Goal) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_Goal) GetKickingTeam() Team { + if m != nil && m.KickingTeam != nil { + return *m.KickingTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_Goal) GetKickingBot() uint32 { + if m != nil && m.KickingBot != nil { + return *m.KickingBot + } + return 0 +} + +func (m *GameEvent_Goal) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_Goal) GetKickLocation() *Location { + if m != nil { + return m.KickLocation + } + return nil +} + +// the ball entered the goal directly during an indirect free kick +type GameEvent_IndirectGoal struct { + // the team that tried to shoot the goal + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that kicked the ball - at least the team must be set + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location where the ball entered the goal + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the location where the ball was kicked + KickLocation *Location `protobuf:"bytes,4,opt,name=kick_location,json=kickLocation" json:"kick_location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_IndirectGoal) Reset() { *m = GameEvent_IndirectGoal{} } +func (m *GameEvent_IndirectGoal) String() string { return proto.CompactTextString(m) } +func (*GameEvent_IndirectGoal) ProtoMessage() {} +func (*GameEvent_IndirectGoal) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 3} +} + +func (m *GameEvent_IndirectGoal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_IndirectGoal.Unmarshal(m, b) +} +func (m *GameEvent_IndirectGoal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_IndirectGoal.Marshal(b, m, deterministic) +} +func (m *GameEvent_IndirectGoal) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_IndirectGoal.Merge(m, src) +} +func (m *GameEvent_IndirectGoal) XXX_Size() int { + return xxx_messageInfo_GameEvent_IndirectGoal.Size(m) +} +func (m *GameEvent_IndirectGoal) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_IndirectGoal.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_IndirectGoal proto.InternalMessageInfo + +func (m *GameEvent_IndirectGoal) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_IndirectGoal) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_IndirectGoal) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_IndirectGoal) GetKickLocation() *Location { + if m != nil { + return m.KickLocation + } + return nil +} + +// the ball entered the goal, but was initially chipped +type GameEvent_ChippedGoal struct { + // the team that tried to shoot the goal + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that kicked the ball + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location where the ball entered the goal + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the location where the ball was kicked + KickLocation *Location `protobuf:"bytes,4,opt,name=kick_location,json=kickLocation" json:"kick_location,omitempty"` + // the maximum height [m] of the ball, before it entered the goal and since the last kick + MaxBallHeight *float32 `protobuf:"fixed32,5,opt,name=max_ball_height,json=maxBallHeight" json:"max_ball_height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_ChippedGoal) Reset() { *m = GameEvent_ChippedGoal{} } +func (m *GameEvent_ChippedGoal) String() string { return proto.CompactTextString(m) } +func (*GameEvent_ChippedGoal) ProtoMessage() {} +func (*GameEvent_ChippedGoal) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 4} +} + +func (m *GameEvent_ChippedGoal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_ChippedGoal.Unmarshal(m, b) +} +func (m *GameEvent_ChippedGoal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_ChippedGoal.Marshal(b, m, deterministic) +} +func (m *GameEvent_ChippedGoal) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_ChippedGoal.Merge(m, src) +} +func (m *GameEvent_ChippedGoal) XXX_Size() int { + return xxx_messageInfo_GameEvent_ChippedGoal.Size(m) +} +func (m *GameEvent_ChippedGoal) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_ChippedGoal.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_ChippedGoal proto.InternalMessageInfo + +func (m *GameEvent_ChippedGoal) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_ChippedGoal) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_ChippedGoal) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_ChippedGoal) GetKickLocation() *Location { + if m != nil { + return m.KickLocation + } + return nil +} + +func (m *GameEvent_ChippedGoal) GetMaxBallHeight() float32 { + if m != nil && m.MaxBallHeight != nil { + return *m.MaxBallHeight + } + return 0 +} + +// a bot moved too fast while the game was stopped +type GameEvent_BotTooFastInStop struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that was too fast + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the bot speed [m/s] + Speed *float32 `protobuf:"fixed32,4,opt,name=speed" json:"speed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotTooFastInStop) Reset() { *m = GameEvent_BotTooFastInStop{} } +func (m *GameEvent_BotTooFastInStop) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotTooFastInStop) ProtoMessage() {} +func (*GameEvent_BotTooFastInStop) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 5} +} + +func (m *GameEvent_BotTooFastInStop) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotTooFastInStop.Unmarshal(m, b) +} +func (m *GameEvent_BotTooFastInStop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotTooFastInStop.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotTooFastInStop) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotTooFastInStop.Merge(m, src) +} +func (m *GameEvent_BotTooFastInStop) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotTooFastInStop.Size(m) +} +func (m *GameEvent_BotTooFastInStop) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotTooFastInStop.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotTooFastInStop proto.InternalMessageInfo + +func (m *GameEvent_BotTooFastInStop) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotTooFastInStop) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotTooFastInStop) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotTooFastInStop) GetSpeed() float32 { + if m != nil && m.Speed != nil { + return *m.Speed + } + return 0 +} + +// a bot of the defending team got too close to the kick point during a free kick +type GameEvent_DefenderTooCloseToKickPoint struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that violates the distance to the kick point + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the distance [m] from bot to the kick point (including the minimum radius) + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_DefenderTooCloseToKickPoint) Reset() { *m = GameEvent_DefenderTooCloseToKickPoint{} } +func (m *GameEvent_DefenderTooCloseToKickPoint) String() string { return proto.CompactTextString(m) } +func (*GameEvent_DefenderTooCloseToKickPoint) ProtoMessage() {} +func (*GameEvent_DefenderTooCloseToKickPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 6} +} + +func (m *GameEvent_DefenderTooCloseToKickPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint.Unmarshal(m, b) +} +func (m *GameEvent_DefenderTooCloseToKickPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint.Marshal(b, m, deterministic) +} +func (m *GameEvent_DefenderTooCloseToKickPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint.Merge(m, src) +} +func (m *GameEvent_DefenderTooCloseToKickPoint) XXX_Size() int { + return xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint.Size(m) +} +func (m *GameEvent_DefenderTooCloseToKickPoint) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_DefenderTooCloseToKickPoint proto.InternalMessageInfo + +func (m *GameEvent_DefenderTooCloseToKickPoint) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_DefenderTooCloseToKickPoint) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_DefenderTooCloseToKickPoint) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_DefenderTooCloseToKickPoint) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// two robots crashed into each other with similar speeds +type GameEvent_BotCrashDrawn struct { + // the bot of the yellow team + BotYellow *uint32 `protobuf:"varint,1,opt,name=bot_yellow,json=botYellow" json:"bot_yellow,omitempty"` + // the bot of the blue team + BotBlue *uint32 `protobuf:"varint,2,opt,name=bot_blue,json=botBlue" json:"bot_blue,omitempty"` + // the location of the crash (center between both bots) + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the calculated crash speed [m/s] of the two bots + CrashSpeed *float32 `protobuf:"fixed32,4,opt,name=crash_speed,json=crashSpeed" json:"crash_speed,omitempty"` + // the difference [m/s] of the velocity of the two bots + SpeedDiff *float32 `protobuf:"fixed32,5,opt,name=speed_diff,json=speedDiff" json:"speed_diff,omitempty"` + // the angle [rad] in the range [0, π] of the bot velocity vectors + // an angle of 0 rad ( 0°) means, the bots barely touched each other + // an angle of π rad (180°) means, the bots crashed frontal into each other + CrashAngle *float32 `protobuf:"fixed32,6,opt,name=crash_angle,json=crashAngle" json:"crash_angle,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotCrashDrawn) Reset() { *m = GameEvent_BotCrashDrawn{} } +func (m *GameEvent_BotCrashDrawn) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotCrashDrawn) ProtoMessage() {} +func (*GameEvent_BotCrashDrawn) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 7} +} + +func (m *GameEvent_BotCrashDrawn) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotCrashDrawn.Unmarshal(m, b) +} +func (m *GameEvent_BotCrashDrawn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotCrashDrawn.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotCrashDrawn) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotCrashDrawn.Merge(m, src) +} +func (m *GameEvent_BotCrashDrawn) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotCrashDrawn.Size(m) +} +func (m *GameEvent_BotCrashDrawn) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotCrashDrawn.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotCrashDrawn proto.InternalMessageInfo + +func (m *GameEvent_BotCrashDrawn) GetBotYellow() uint32 { + if m != nil && m.BotYellow != nil { + return *m.BotYellow + } + return 0 +} + +func (m *GameEvent_BotCrashDrawn) GetBotBlue() uint32 { + if m != nil && m.BotBlue != nil { + return *m.BotBlue + } + return 0 +} + +func (m *GameEvent_BotCrashDrawn) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotCrashDrawn) GetCrashSpeed() float32 { + if m != nil && m.CrashSpeed != nil { + return *m.CrashSpeed + } + return 0 +} + +func (m *GameEvent_BotCrashDrawn) GetSpeedDiff() float32 { + if m != nil && m.SpeedDiff != nil { + return *m.SpeedDiff + } + return 0 +} + +func (m *GameEvent_BotCrashDrawn) GetCrashAngle() float32 { + if m != nil && m.CrashAngle != nil { + return *m.CrashAngle + } + return 0 +} + +// two robots crashed into each other and one team was found guilty to due significant speed difference +type GameEvent_BotCrashUnique struct { + // the team that caused the crash + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that caused the crash + Violator *uint32 `protobuf:"varint,2,opt,name=violator" json:"violator,omitempty"` + // the bot of the opposite team that was involved in the crash + Victim *uint32 `protobuf:"varint,3,opt,name=victim" json:"victim,omitempty"` + // the location of the crash (center between both bots) + Location *Location `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"` + // the calculated crash speed vector [m/s] of the two bots + CrashSpeed *float32 `protobuf:"fixed32,5,opt,name=crash_speed,json=crashSpeed" json:"crash_speed,omitempty"` + // the difference [m/s] of the velocity of the two bots + SpeedDiff *float32 `protobuf:"fixed32,6,opt,name=speed_diff,json=speedDiff" json:"speed_diff,omitempty"` + // the angle [rad] in the range [0, π] of the bot velocity vectors + // an angle of 0 rad ( 0°) means, the bots barely touched each other + // an angle of π rad (180°) means, the bots crashed frontal into each other + CrashAngle *float32 `protobuf:"fixed32,7,opt,name=crash_angle,json=crashAngle" json:"crash_angle,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotCrashUnique) Reset() { *m = GameEvent_BotCrashUnique{} } +func (m *GameEvent_BotCrashUnique) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotCrashUnique) ProtoMessage() {} +func (*GameEvent_BotCrashUnique) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 8} +} + +func (m *GameEvent_BotCrashUnique) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotCrashUnique.Unmarshal(m, b) +} +func (m *GameEvent_BotCrashUnique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotCrashUnique.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotCrashUnique) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotCrashUnique.Merge(m, src) +} +func (m *GameEvent_BotCrashUnique) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotCrashUnique.Size(m) +} +func (m *GameEvent_BotCrashUnique) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotCrashUnique.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotCrashUnique proto.InternalMessageInfo + +func (m *GameEvent_BotCrashUnique) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotCrashUnique) GetViolator() uint32 { + if m != nil && m.Violator != nil { + return *m.Violator + } + return 0 +} + +func (m *GameEvent_BotCrashUnique) GetVictim() uint32 { + if m != nil && m.Victim != nil { + return *m.Victim + } + return 0 +} + +func (m *GameEvent_BotCrashUnique) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotCrashUnique) GetCrashSpeed() float32 { + if m != nil && m.CrashSpeed != nil { + return *m.CrashSpeed + } + return 0 +} + +func (m *GameEvent_BotCrashUnique) GetSpeedDiff() float32 { + if m != nil && m.SpeedDiff != nil { + return *m.SpeedDiff + } + return 0 +} + +func (m *GameEvent_BotCrashUnique) GetCrashAngle() float32 { + if m != nil && m.CrashAngle != nil { + return *m.CrashAngle + } + return 0 +} + +// a bot pushed another bot over a significant distance +type GameEvent_BotPushedBot struct { + // the team that pushed the other team + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that pushed the other bot + Violator *uint32 `protobuf:"varint,2,opt,name=violator" json:"violator,omitempty"` + // the bot of the opposite team that was pushed + Victim *uint32 `protobuf:"varint,3,opt,name=victim" json:"victim,omitempty"` + // the location of the push (center between both bots) + Location *Location `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"` + // the pushed distance [m] + PushedDistance *float32 `protobuf:"fixed32,5,opt,name=pushed_distance,json=pushedDistance" json:"pushed_distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotPushedBot) Reset() { *m = GameEvent_BotPushedBot{} } +func (m *GameEvent_BotPushedBot) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotPushedBot) ProtoMessage() {} +func (*GameEvent_BotPushedBot) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 9} +} + +func (m *GameEvent_BotPushedBot) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotPushedBot.Unmarshal(m, b) +} +func (m *GameEvent_BotPushedBot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotPushedBot.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotPushedBot) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotPushedBot.Merge(m, src) +} +func (m *GameEvent_BotPushedBot) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotPushedBot.Size(m) +} +func (m *GameEvent_BotPushedBot) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotPushedBot.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotPushedBot proto.InternalMessageInfo + +func (m *GameEvent_BotPushedBot) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotPushedBot) GetViolator() uint32 { + if m != nil && m.Violator != nil { + return *m.Violator + } + return 0 +} + +func (m *GameEvent_BotPushedBot) GetVictim() uint32 { + if m != nil && m.Victim != nil { + return *m.Victim + } + return 0 +} + +func (m *GameEvent_BotPushedBot) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotPushedBot) GetPushedDistance() float32 { + if m != nil && m.PushedDistance != nil { + return *m.PushedDistance + } + return 0 +} + +// a bot tipped over +type GameEvent_BotTippedOver struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that tipped over + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotTippedOver) Reset() { *m = GameEvent_BotTippedOver{} } +func (m *GameEvent_BotTippedOver) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotTippedOver) ProtoMessage() {} +func (*GameEvent_BotTippedOver) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 10} +} + +func (m *GameEvent_BotTippedOver) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotTippedOver.Unmarshal(m, b) +} +func (m *GameEvent_BotTippedOver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotTippedOver.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotTippedOver) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotTippedOver.Merge(m, src) +} +func (m *GameEvent_BotTippedOver) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotTippedOver.Size(m) +} +func (m *GameEvent_BotTippedOver) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotTippedOver.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotTippedOver proto.InternalMessageInfo + +func (m *GameEvent_BotTippedOver) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotTippedOver) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotTippedOver) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// a defender other than the keeper was fully located inside its own defense and touched the ball +type GameEvent_DefenderInDefenseArea struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that is inside the penalty area + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the distance [m] from bot case to the nearest point outside the defense area + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_DefenderInDefenseArea) Reset() { *m = GameEvent_DefenderInDefenseArea{} } +func (m *GameEvent_DefenderInDefenseArea) String() string { return proto.CompactTextString(m) } +func (*GameEvent_DefenderInDefenseArea) ProtoMessage() {} +func (*GameEvent_DefenderInDefenseArea) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 11} +} + +func (m *GameEvent_DefenderInDefenseArea) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_DefenderInDefenseArea.Unmarshal(m, b) +} +func (m *GameEvent_DefenderInDefenseArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_DefenderInDefenseArea.Marshal(b, m, deterministic) +} +func (m *GameEvent_DefenderInDefenseArea) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_DefenderInDefenseArea.Merge(m, src) +} +func (m *GameEvent_DefenderInDefenseArea) XXX_Size() int { + return xxx_messageInfo_GameEvent_DefenderInDefenseArea.Size(m) +} +func (m *GameEvent_DefenderInDefenseArea) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_DefenderInDefenseArea.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_DefenderInDefenseArea proto.InternalMessageInfo + +func (m *GameEvent_DefenderInDefenseArea) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_DefenderInDefenseArea) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_DefenderInDefenseArea) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_DefenderInDefenseArea) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// a defender other than the keeper was partially located inside its own defense area and touched the ball +type GameEvent_DefenderInDefenseAreaPartially struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that is partially inside the penalty area + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the distance [m] that the bot is inside the penalty area + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_DefenderInDefenseAreaPartially) Reset() { + *m = GameEvent_DefenderInDefenseAreaPartially{} +} +func (m *GameEvent_DefenderInDefenseAreaPartially) String() string { return proto.CompactTextString(m) } +func (*GameEvent_DefenderInDefenseAreaPartially) ProtoMessage() {} +func (*GameEvent_DefenderInDefenseAreaPartially) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 12} +} + +func (m *GameEvent_DefenderInDefenseAreaPartially) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially.Unmarshal(m, b) +} +func (m *GameEvent_DefenderInDefenseAreaPartially) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially.Marshal(b, m, deterministic) +} +func (m *GameEvent_DefenderInDefenseAreaPartially) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially.Merge(m, src) +} +func (m *GameEvent_DefenderInDefenseAreaPartially) XXX_Size() int { + return xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially.Size(m) +} +func (m *GameEvent_DefenderInDefenseAreaPartially) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_DefenderInDefenseAreaPartially proto.InternalMessageInfo + +func (m *GameEvent_DefenderInDefenseAreaPartially) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_DefenderInDefenseAreaPartially) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_DefenderInDefenseAreaPartially) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_DefenderInDefenseAreaPartially) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// an attacker touched the ball inside the opponent defense area +type GameEvent_AttackerTouchedBallInDefenseArea struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that is inside the penalty area + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the distance [m] that the bot is inside the penalty area + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) Reset() { + *m = GameEvent_AttackerTouchedBallInDefenseArea{} +} +func (m *GameEvent_AttackerTouchedBallInDefenseArea) String() string { + return proto.CompactTextString(m) +} +func (*GameEvent_AttackerTouchedBallInDefenseArea) ProtoMessage() {} +func (*GameEvent_AttackerTouchedBallInDefenseArea) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 13} +} + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea.Unmarshal(m, b) +} +func (m *GameEvent_AttackerTouchedBallInDefenseArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea.Marshal(b, m, deterministic) +} +func (m *GameEvent_AttackerTouchedBallInDefenseArea) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea.Merge(m, src) +} +func (m *GameEvent_AttackerTouchedBallInDefenseArea) XXX_Size() int { + return xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea.Size(m) +} +func (m *GameEvent_AttackerTouchedBallInDefenseArea) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_AttackerTouchedBallInDefenseArea proto.InternalMessageInfo + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_AttackerTouchedBallInDefenseArea) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// a bot kicked the ball too fast +type GameEvent_BotKickedBallTooFast struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that kicked too fast + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the ball at the time of the highest speed + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the absolute initial ball speed (kick speed) [m/s] + InitialBallSpeed *float32 `protobuf:"fixed32,4,opt,name=initial_ball_speed,json=initialBallSpeed" json:"initial_ball_speed,omitempty"` + // was the ball chipped? + Chipped *bool `protobuf:"varint,5,opt,name=chipped" json:"chipped,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotKickedBallTooFast) Reset() { *m = GameEvent_BotKickedBallTooFast{} } +func (m *GameEvent_BotKickedBallTooFast) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotKickedBallTooFast) ProtoMessage() {} +func (*GameEvent_BotKickedBallTooFast) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 14} +} + +func (m *GameEvent_BotKickedBallTooFast) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotKickedBallTooFast.Unmarshal(m, b) +} +func (m *GameEvent_BotKickedBallTooFast) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotKickedBallTooFast.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotKickedBallTooFast) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotKickedBallTooFast.Merge(m, src) +} +func (m *GameEvent_BotKickedBallTooFast) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotKickedBallTooFast.Size(m) +} +func (m *GameEvent_BotKickedBallTooFast) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotKickedBallTooFast.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotKickedBallTooFast proto.InternalMessageInfo + +func (m *GameEvent_BotKickedBallTooFast) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotKickedBallTooFast) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotKickedBallTooFast) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotKickedBallTooFast) GetInitialBallSpeed() float32 { + if m != nil && m.InitialBallSpeed != nil { + return *m.InitialBallSpeed + } + return 0 +} + +func (m *GameEvent_BotKickedBallTooFast) GetChipped() bool { + if m != nil && m.Chipped != nil { + return *m.Chipped + } + return false +} + +// a bot dribbled to ball too far +type GameEvent_BotDribbledBallTooFar struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that dribbled too far + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location where the dribbling started + Start *Location `protobuf:"bytes,3,opt,name=start" json:"start,omitempty"` + // the location where the maximum dribbling distance was reached + End *Location `protobuf:"bytes,4,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotDribbledBallTooFar) Reset() { *m = GameEvent_BotDribbledBallTooFar{} } +func (m *GameEvent_BotDribbledBallTooFar) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotDribbledBallTooFar) ProtoMessage() {} +func (*GameEvent_BotDribbledBallTooFar) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 15} +} + +func (m *GameEvent_BotDribbledBallTooFar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotDribbledBallTooFar.Unmarshal(m, b) +} +func (m *GameEvent_BotDribbledBallTooFar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotDribbledBallTooFar.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotDribbledBallTooFar) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotDribbledBallTooFar.Merge(m, src) +} +func (m *GameEvent_BotDribbledBallTooFar) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotDribbledBallTooFar.Size(m) +} +func (m *GameEvent_BotDribbledBallTooFar) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotDribbledBallTooFar.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotDribbledBallTooFar proto.InternalMessageInfo + +func (m *GameEvent_BotDribbledBallTooFar) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotDribbledBallTooFar) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotDribbledBallTooFar) GetStart() *Location { + if m != nil { + return m.Start + } + return nil +} + +func (m *GameEvent_BotDribbledBallTooFar) GetEnd() *Location { + if m != nil { + return m.End + } + return nil +} + +// an attacker touched the opponent robot inside defense area +type GameEvent_AttackerTouchedOpponentInDefenseArea struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that touched the opponent robot + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the bot of the opposite team that was touched + Victim *uint32 `protobuf:"varint,4,opt,name=victim" json:"victim,omitempty"` + // the location of the contact point between both bots + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) Reset() { + *m = GameEvent_AttackerTouchedOpponentInDefenseArea{} +} +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) String() string { + return proto.CompactTextString(m) +} +func (*GameEvent_AttackerTouchedOpponentInDefenseArea) ProtoMessage() {} +func (*GameEvent_AttackerTouchedOpponentInDefenseArea) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 16} +} + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea.Unmarshal(m, b) +} +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea.Marshal(b, m, deterministic) +} +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea.Merge(m, src) +} +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) XXX_Size() int { + return xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea.Size(m) +} +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_AttackerTouchedOpponentInDefenseArea proto.InternalMessageInfo + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) GetVictim() uint32 { + if m != nil && m.Victim != nil { + return *m.Victim + } + return 0 +} + +func (m *GameEvent_AttackerTouchedOpponentInDefenseArea) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// an attacker touched the ball multiple times when it was not allowed to +type GameEvent_AttackerDoubleTouchedBall struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that touched the ball twice + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the ball when it was first touched + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_AttackerDoubleTouchedBall) Reset() { *m = GameEvent_AttackerDoubleTouchedBall{} } +func (m *GameEvent_AttackerDoubleTouchedBall) String() string { return proto.CompactTextString(m) } +func (*GameEvent_AttackerDoubleTouchedBall) ProtoMessage() {} +func (*GameEvent_AttackerDoubleTouchedBall) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 17} +} + +func (m *GameEvent_AttackerDoubleTouchedBall) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall.Unmarshal(m, b) +} +func (m *GameEvent_AttackerDoubleTouchedBall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall.Marshal(b, m, deterministic) +} +func (m *GameEvent_AttackerDoubleTouchedBall) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall.Merge(m, src) +} +func (m *GameEvent_AttackerDoubleTouchedBall) XXX_Size() int { + return xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall.Size(m) +} +func (m *GameEvent_AttackerDoubleTouchedBall) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_AttackerDoubleTouchedBall proto.InternalMessageInfo + +func (m *GameEvent_AttackerDoubleTouchedBall) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_AttackerDoubleTouchedBall) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_AttackerDoubleTouchedBall) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// an attacker was located too near to the opponent defense area when ball entered play +type GameEvent_AttackerTooCloseToDefenseArea struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that is too close to the defense area + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the distance [m] of the bot to the penalty area + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_AttackerTooCloseToDefenseArea) Reset() { + *m = GameEvent_AttackerTooCloseToDefenseArea{} +} +func (m *GameEvent_AttackerTooCloseToDefenseArea) String() string { return proto.CompactTextString(m) } +func (*GameEvent_AttackerTooCloseToDefenseArea) ProtoMessage() {} +func (*GameEvent_AttackerTooCloseToDefenseArea) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 18} +} + +func (m *GameEvent_AttackerTooCloseToDefenseArea) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea.Unmarshal(m, b) +} +func (m *GameEvent_AttackerTooCloseToDefenseArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea.Marshal(b, m, deterministic) +} +func (m *GameEvent_AttackerTooCloseToDefenseArea) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea.Merge(m, src) +} +func (m *GameEvent_AttackerTooCloseToDefenseArea) XXX_Size() int { + return xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea.Size(m) +} +func (m *GameEvent_AttackerTooCloseToDefenseArea) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_AttackerTooCloseToDefenseArea proto.InternalMessageInfo + +func (m *GameEvent_AttackerTooCloseToDefenseArea) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_AttackerTooCloseToDefenseArea) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_AttackerTooCloseToDefenseArea) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_AttackerTooCloseToDefenseArea) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// a bot held the ball for too long +type GameEvent_BotHeldBallDeliberately struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that holds the ball + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the ball + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + // the duration [s] that the bot hold the ball + Duration *float32 `protobuf:"fixed32,4,opt,name=duration" json:"duration,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotHeldBallDeliberately) Reset() { *m = GameEvent_BotHeldBallDeliberately{} } +func (m *GameEvent_BotHeldBallDeliberately) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotHeldBallDeliberately) ProtoMessage() {} +func (*GameEvent_BotHeldBallDeliberately) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 19} +} + +func (m *GameEvent_BotHeldBallDeliberately) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotHeldBallDeliberately.Unmarshal(m, b) +} +func (m *GameEvent_BotHeldBallDeliberately) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotHeldBallDeliberately.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotHeldBallDeliberately) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotHeldBallDeliberately.Merge(m, src) +} +func (m *GameEvent_BotHeldBallDeliberately) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotHeldBallDeliberately.Size(m) +} +func (m *GameEvent_BotHeldBallDeliberately) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotHeldBallDeliberately.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotHeldBallDeliberately proto.InternalMessageInfo + +func (m *GameEvent_BotHeldBallDeliberately) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotHeldBallDeliberately) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotHeldBallDeliberately) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_BotHeldBallDeliberately) GetDuration() float32 { + if m != nil && m.Duration != nil { + return *m.Duration + } + return 0 +} + +// a bot interfered the ball placement of the other team +type GameEvent_BotInterferedPlacement struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the bot that interfered the placement + ByBot *uint32 `protobuf:"varint,2,opt,name=by_bot,json=byBot" json:"by_bot,omitempty"` + // the location of the bot + Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotInterferedPlacement) Reset() { *m = GameEvent_BotInterferedPlacement{} } +func (m *GameEvent_BotInterferedPlacement) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotInterferedPlacement) ProtoMessage() {} +func (*GameEvent_BotInterferedPlacement) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 20} +} + +func (m *GameEvent_BotInterferedPlacement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotInterferedPlacement.Unmarshal(m, b) +} +func (m *GameEvent_BotInterferedPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotInterferedPlacement.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotInterferedPlacement) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotInterferedPlacement.Merge(m, src) +} +func (m *GameEvent_BotInterferedPlacement) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotInterferedPlacement.Size(m) +} +func (m *GameEvent_BotInterferedPlacement) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotInterferedPlacement.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotInterferedPlacement proto.InternalMessageInfo + +func (m *GameEvent_BotInterferedPlacement) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_BotInterferedPlacement) GetByBot() uint32 { + if m != nil && m.ByBot != nil { + return *m.ByBot + } + return 0 +} + +func (m *GameEvent_BotInterferedPlacement) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// a team collected multiple cards (yellow and red), which results in a penalty kick +type GameEvent_MultipleCards struct { + // the team that received multiple yellow cards + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_MultipleCards) Reset() { *m = GameEvent_MultipleCards{} } +func (m *GameEvent_MultipleCards) String() string { return proto.CompactTextString(m) } +func (*GameEvent_MultipleCards) ProtoMessage() {} +func (*GameEvent_MultipleCards) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 21} +} + +func (m *GameEvent_MultipleCards) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_MultipleCards.Unmarshal(m, b) +} +func (m *GameEvent_MultipleCards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_MultipleCards.Marshal(b, m, deterministic) +} +func (m *GameEvent_MultipleCards) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_MultipleCards.Merge(m, src) +} +func (m *GameEvent_MultipleCards) XXX_Size() int { + return xxx_messageInfo_GameEvent_MultipleCards.Size(m) +} +func (m *GameEvent_MultipleCards) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_MultipleCards.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_MultipleCards proto.InternalMessageInfo + +func (m *GameEvent_MultipleCards) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +// a team collected multiple fouls, which results in a yellow card +type GameEvent_MultipleFouls struct { + // the team that collected multiple fouls + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_MultipleFouls) Reset() { *m = GameEvent_MultipleFouls{} } +func (m *GameEvent_MultipleFouls) String() string { return proto.CompactTextString(m) } +func (*GameEvent_MultipleFouls) ProtoMessage() {} +func (*GameEvent_MultipleFouls) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 22} +} + +func (m *GameEvent_MultipleFouls) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_MultipleFouls.Unmarshal(m, b) +} +func (m *GameEvent_MultipleFouls) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_MultipleFouls.Marshal(b, m, deterministic) +} +func (m *GameEvent_MultipleFouls) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_MultipleFouls.Merge(m, src) +} +func (m *GameEvent_MultipleFouls) XXX_Size() int { + return xxx_messageInfo_GameEvent_MultipleFouls.Size(m) +} +func (m *GameEvent_MultipleFouls) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_MultipleFouls.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_MultipleFouls proto.InternalMessageInfo + +func (m *GameEvent_MultipleFouls) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +// a team failed to place the ball multiple times in a row +type GameEvent_MultiplePlacementFailures struct { + // the team that failed multiple times + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_MultiplePlacementFailures) Reset() { *m = GameEvent_MultiplePlacementFailures{} } +func (m *GameEvent_MultiplePlacementFailures) String() string { return proto.CompactTextString(m) } +func (*GameEvent_MultiplePlacementFailures) ProtoMessage() {} +func (*GameEvent_MultiplePlacementFailures) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 23} +} + +func (m *GameEvent_MultiplePlacementFailures) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_MultiplePlacementFailures.Unmarshal(m, b) +} +func (m *GameEvent_MultiplePlacementFailures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_MultiplePlacementFailures.Marshal(b, m, deterministic) +} +func (m *GameEvent_MultiplePlacementFailures) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_MultiplePlacementFailures.Merge(m, src) +} +func (m *GameEvent_MultiplePlacementFailures) XXX_Size() int { + return xxx_messageInfo_GameEvent_MultiplePlacementFailures.Size(m) +} +func (m *GameEvent_MultiplePlacementFailures) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_MultiplePlacementFailures.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_MultiplePlacementFailures proto.InternalMessageInfo + +func (m *GameEvent_MultiplePlacementFailures) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +// timeout waiting for the attacking team to perform the free kick +type GameEvent_KickTimeout struct { + // the team that that should have kicked + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the location of the ball + Location *Location `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"` + // the time [s] that was waited + Time *float32 `protobuf:"fixed32,3,opt,name=time" json:"time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_KickTimeout) Reset() { *m = GameEvent_KickTimeout{} } +func (m *GameEvent_KickTimeout) String() string { return proto.CompactTextString(m) } +func (*GameEvent_KickTimeout) ProtoMessage() {} +func (*GameEvent_KickTimeout) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 24} +} + +func (m *GameEvent_KickTimeout) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_KickTimeout.Unmarshal(m, b) +} +func (m *GameEvent_KickTimeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_KickTimeout.Marshal(b, m, deterministic) +} +func (m *GameEvent_KickTimeout) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_KickTimeout.Merge(m, src) +} +func (m *GameEvent_KickTimeout) XXX_Size() int { + return xxx_messageInfo_GameEvent_KickTimeout.Size(m) +} +func (m *GameEvent_KickTimeout) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_KickTimeout.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_KickTimeout proto.InternalMessageInfo + +func (m *GameEvent_KickTimeout) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_KickTimeout) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_KickTimeout) GetTime() float32 { + if m != nil && m.Time != nil { + return *m.Time + } + return 0 +} + +// game was stuck +type GameEvent_NoProgressInGame struct { + // the location of the ball + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + // the time [s] that was waited + Time *float32 `protobuf:"fixed32,2,opt,name=time" json:"time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_NoProgressInGame) Reset() { *m = GameEvent_NoProgressInGame{} } +func (m *GameEvent_NoProgressInGame) String() string { return proto.CompactTextString(m) } +func (*GameEvent_NoProgressInGame) ProtoMessage() {} +func (*GameEvent_NoProgressInGame) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 25} +} + +func (m *GameEvent_NoProgressInGame) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_NoProgressInGame.Unmarshal(m, b) +} +func (m *GameEvent_NoProgressInGame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_NoProgressInGame.Marshal(b, m, deterministic) +} +func (m *GameEvent_NoProgressInGame) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_NoProgressInGame.Merge(m, src) +} +func (m *GameEvent_NoProgressInGame) XXX_Size() int { + return xxx_messageInfo_GameEvent_NoProgressInGame.Size(m) +} +func (m *GameEvent_NoProgressInGame) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_NoProgressInGame.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_NoProgressInGame proto.InternalMessageInfo + +func (m *GameEvent_NoProgressInGame) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_NoProgressInGame) GetTime() float32 { + if m != nil && m.Time != nil { + return *m.Time + } + return 0 +} + +// ball placement failed +type GameEvent_PlacementFailed struct { + // the team that failed + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the remaining distance [m] from ball to placement position + RemainingDistance *float32 `protobuf:"fixed32,2,opt,name=remaining_distance,json=remainingDistance" json:"remaining_distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_PlacementFailed) Reset() { *m = GameEvent_PlacementFailed{} } +func (m *GameEvent_PlacementFailed) String() string { return proto.CompactTextString(m) } +func (*GameEvent_PlacementFailed) ProtoMessage() {} +func (*GameEvent_PlacementFailed) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 26} +} + +func (m *GameEvent_PlacementFailed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_PlacementFailed.Unmarshal(m, b) +} +func (m *GameEvent_PlacementFailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_PlacementFailed.Marshal(b, m, deterministic) +} +func (m *GameEvent_PlacementFailed) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_PlacementFailed.Merge(m, src) +} +func (m *GameEvent_PlacementFailed) XXX_Size() int { + return xxx_messageInfo_GameEvent_PlacementFailed.Size(m) +} +func (m *GameEvent_PlacementFailed) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_PlacementFailed.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_PlacementFailed proto.InternalMessageInfo + +func (m *GameEvent_PlacementFailed) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_PlacementFailed) GetRemainingDistance() float32 { + if m != nil && m.RemainingDistance != nil { + return *m.RemainingDistance + } + return 0 +} + +// a team was found guilty for minor unsporting behavior +type GameEvent_UnsportingBehaviorMinor struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // an explanation of the situation and decision + Reason *string `protobuf:"bytes,2,req,name=reason" json:"reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_UnsportingBehaviorMinor) Reset() { *m = GameEvent_UnsportingBehaviorMinor{} } +func (m *GameEvent_UnsportingBehaviorMinor) String() string { return proto.CompactTextString(m) } +func (*GameEvent_UnsportingBehaviorMinor) ProtoMessage() {} +func (*GameEvent_UnsportingBehaviorMinor) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 27} +} + +func (m *GameEvent_UnsportingBehaviorMinor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMinor.Unmarshal(m, b) +} +func (m *GameEvent_UnsportingBehaviorMinor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMinor.Marshal(b, m, deterministic) +} +func (m *GameEvent_UnsportingBehaviorMinor) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_UnsportingBehaviorMinor.Merge(m, src) +} +func (m *GameEvent_UnsportingBehaviorMinor) XXX_Size() int { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMinor.Size(m) +} +func (m *GameEvent_UnsportingBehaviorMinor) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_UnsportingBehaviorMinor.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_UnsportingBehaviorMinor proto.InternalMessageInfo + +func (m *GameEvent_UnsportingBehaviorMinor) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_UnsportingBehaviorMinor) GetReason() string { + if m != nil && m.Reason != nil { + return *m.Reason + } + return "" +} + +// a team was found guilty for major unsporting behavior +type GameEvent_UnsportingBehaviorMajor struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // an explanation of the situation and decision + Reason *string `protobuf:"bytes,2,req,name=reason" json:"reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_UnsportingBehaviorMajor) Reset() { *m = GameEvent_UnsportingBehaviorMajor{} } +func (m *GameEvent_UnsportingBehaviorMajor) String() string { return proto.CompactTextString(m) } +func (*GameEvent_UnsportingBehaviorMajor) ProtoMessage() {} +func (*GameEvent_UnsportingBehaviorMajor) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 28} +} + +func (m *GameEvent_UnsportingBehaviorMajor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMajor.Unmarshal(m, b) +} +func (m *GameEvent_UnsportingBehaviorMajor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMajor.Marshal(b, m, deterministic) +} +func (m *GameEvent_UnsportingBehaviorMajor) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_UnsportingBehaviorMajor.Merge(m, src) +} +func (m *GameEvent_UnsportingBehaviorMajor) XXX_Size() int { + return xxx_messageInfo_GameEvent_UnsportingBehaviorMajor.Size(m) +} +func (m *GameEvent_UnsportingBehaviorMajor) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_UnsportingBehaviorMajor.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_UnsportingBehaviorMajor proto.InternalMessageInfo + +func (m *GameEvent_UnsportingBehaviorMajor) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_UnsportingBehaviorMajor) GetReason() string { + if m != nil && m.Reason != nil { + return *m.Reason + } + return "" +} + +// a keeper held the ball in its defense area for too long +type GameEvent_KeeperHeldBall struct { + // the team that found guilty + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the location of the ball + Location *Location `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"` + // the duration [s] that the keeper hold the ball + Duration *float32 `protobuf:"fixed32,3,opt,name=duration" json:"duration,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_KeeperHeldBall) Reset() { *m = GameEvent_KeeperHeldBall{} } +func (m *GameEvent_KeeperHeldBall) String() string { return proto.CompactTextString(m) } +func (*GameEvent_KeeperHeldBall) ProtoMessage() {} +func (*GameEvent_KeeperHeldBall) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 29} +} + +func (m *GameEvent_KeeperHeldBall) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_KeeperHeldBall.Unmarshal(m, b) +} +func (m *GameEvent_KeeperHeldBall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_KeeperHeldBall.Marshal(b, m, deterministic) +} +func (m *GameEvent_KeeperHeldBall) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_KeeperHeldBall.Merge(m, src) +} +func (m *GameEvent_KeeperHeldBall) XXX_Size() int { + return xxx_messageInfo_GameEvent_KeeperHeldBall.Size(m) +} +func (m *GameEvent_KeeperHeldBall) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_KeeperHeldBall.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_KeeperHeldBall proto.InternalMessageInfo + +func (m *GameEvent_KeeperHeldBall) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_KeeperHeldBall) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GameEvent_KeeperHeldBall) GetDuration() float32 { + if m != nil && m.Duration != nil { + return *m.Duration + } + return 0 +} + +// a team successfully placed the ball +type GameEvent_PlacementSucceeded struct { + // the team that did the placement + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + // the time [s] taken for placing the ball + TimeTaken *float32 `protobuf:"fixed32,2,opt,name=time_taken,json=timeTaken" json:"time_taken,omitempty"` + // the distance [m] between placement location and actual ball position + Precision *float32 `protobuf:"fixed32,3,opt,name=precision" json:"precision,omitempty"` + // the distance [m] between the initial ball location and the placement position + Distance *float32 `protobuf:"fixed32,4,opt,name=distance" json:"distance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_PlacementSucceeded) Reset() { *m = GameEvent_PlacementSucceeded{} } +func (m *GameEvent_PlacementSucceeded) String() string { return proto.CompactTextString(m) } +func (*GameEvent_PlacementSucceeded) ProtoMessage() {} +func (*GameEvent_PlacementSucceeded) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 30} +} + +func (m *GameEvent_PlacementSucceeded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_PlacementSucceeded.Unmarshal(m, b) +} +func (m *GameEvent_PlacementSucceeded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_PlacementSucceeded.Marshal(b, m, deterministic) +} +func (m *GameEvent_PlacementSucceeded) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_PlacementSucceeded.Merge(m, src) +} +func (m *GameEvent_PlacementSucceeded) XXX_Size() int { + return xxx_messageInfo_GameEvent_PlacementSucceeded.Size(m) +} +func (m *GameEvent_PlacementSucceeded) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_PlacementSucceeded.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_PlacementSucceeded proto.InternalMessageInfo + +func (m *GameEvent_PlacementSucceeded) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func (m *GameEvent_PlacementSucceeded) GetTimeTaken() float32 { + if m != nil && m.TimeTaken != nil { + return *m.TimeTaken + } + return 0 +} + +func (m *GameEvent_PlacementSucceeded) GetPrecision() float32 { + if m != nil && m.Precision != nil { + return *m.Precision + } + return 0 +} + +func (m *GameEvent_PlacementSucceeded) GetDistance() float32 { + if m != nil && m.Distance != nil { + return *m.Distance + } + return 0 +} + +// both teams are prepared - all conditions are met to continue (with kickoff or penalty kick) +type GameEvent_Prepared struct { + // the time [s] taken for preparing + TimeTaken *float32 `protobuf:"fixed32,1,opt,name=time_taken,json=timeTaken" json:"time_taken,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_Prepared) Reset() { *m = GameEvent_Prepared{} } +func (m *GameEvent_Prepared) String() string { return proto.CompactTextString(m) } +func (*GameEvent_Prepared) ProtoMessage() {} +func (*GameEvent_Prepared) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 31} +} + +func (m *GameEvent_Prepared) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_Prepared.Unmarshal(m, b) +} +func (m *GameEvent_Prepared) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_Prepared.Marshal(b, m, deterministic) +} +func (m *GameEvent_Prepared) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_Prepared.Merge(m, src) +} +func (m *GameEvent_Prepared) XXX_Size() int { + return xxx_messageInfo_GameEvent_Prepared.Size(m) +} +func (m *GameEvent_Prepared) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_Prepared.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_Prepared proto.InternalMessageInfo + +func (m *GameEvent_Prepared) GetTimeTaken() float32 { + if m != nil && m.TimeTaken != nil { + return *m.TimeTaken + } + return 0 +} + +// bots are being substituted by at least one team +type GameEvent_BotSubstitution struct { + // the team that substitutes robots + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_BotSubstitution) Reset() { *m = GameEvent_BotSubstitution{} } +func (m *GameEvent_BotSubstitution) String() string { return proto.CompactTextString(m) } +func (*GameEvent_BotSubstitution) ProtoMessage() {} +func (*GameEvent_BotSubstitution) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 32} +} + +func (m *GameEvent_BotSubstitution) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_BotSubstitution.Unmarshal(m, b) +} +func (m *GameEvent_BotSubstitution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_BotSubstitution.Marshal(b, m, deterministic) +} +func (m *GameEvent_BotSubstitution) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_BotSubstitution.Merge(m, src) +} +func (m *GameEvent_BotSubstitution) XXX_Size() int { + return xxx_messageInfo_GameEvent_BotSubstitution.Size(m) +} +func (m *GameEvent_BotSubstitution) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_BotSubstitution.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_BotSubstitution proto.InternalMessageInfo + +func (m *GameEvent_BotSubstitution) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +// a team has too many robots on the field +type GameEvent_TooManyRobots struct { + // the team that has too many robots + ByTeam *Team `protobuf:"varint,1,req,name=by_team,json=byTeam,enum=Team" json:"by_team,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GameEvent_TooManyRobots) Reset() { *m = GameEvent_TooManyRobots{} } +func (m *GameEvent_TooManyRobots) String() string { return proto.CompactTextString(m) } +func (*GameEvent_TooManyRobots) ProtoMessage() {} +func (*GameEvent_TooManyRobots) Descriptor() ([]byte, []int) { + return fileDescriptor_ca1dc6d9da8fefa7, []int{0, 33} +} + +func (m *GameEvent_TooManyRobots) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GameEvent_TooManyRobots.Unmarshal(m, b) +} +func (m *GameEvent_TooManyRobots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GameEvent_TooManyRobots.Marshal(b, m, deterministic) +} +func (m *GameEvent_TooManyRobots) XXX_Merge(src proto.Message) { + xxx_messageInfo_GameEvent_TooManyRobots.Merge(m, src) +} +func (m *GameEvent_TooManyRobots) XXX_Size() int { + return xxx_messageInfo_GameEvent_TooManyRobots.Size(m) +} +func (m *GameEvent_TooManyRobots) XXX_DiscardUnknown() { + xxx_messageInfo_GameEvent_TooManyRobots.DiscardUnknown(m) +} + +var xxx_messageInfo_GameEvent_TooManyRobots proto.InternalMessageInfo + +func (m *GameEvent_TooManyRobots) GetByTeam() Team { + if m != nil && m.ByTeam != nil { + return *m.ByTeam + } + return Team_UNKNOWN +} + +func init() { + proto.RegisterEnum("GameEventType", GameEventType_name, GameEventType_value) + proto.RegisterType((*GameEvent)(nil), "GameEvent") + proto.RegisterType((*GameEvent_BallLeftField)(nil), "GameEvent.BallLeftField") + proto.RegisterType((*GameEvent_AimlessKick)(nil), "GameEvent.AimlessKick") + proto.RegisterType((*GameEvent_Goal)(nil), "GameEvent.Goal") + proto.RegisterType((*GameEvent_IndirectGoal)(nil), "GameEvent.IndirectGoal") + proto.RegisterType((*GameEvent_ChippedGoal)(nil), "GameEvent.ChippedGoal") + proto.RegisterType((*GameEvent_BotTooFastInStop)(nil), "GameEvent.BotTooFastInStop") + proto.RegisterType((*GameEvent_DefenderTooCloseToKickPoint)(nil), "GameEvent.DefenderTooCloseToKickPoint") + proto.RegisterType((*GameEvent_BotCrashDrawn)(nil), "GameEvent.BotCrashDrawn") + proto.RegisterType((*GameEvent_BotCrashUnique)(nil), "GameEvent.BotCrashUnique") + proto.RegisterType((*GameEvent_BotPushedBot)(nil), "GameEvent.BotPushedBot") + proto.RegisterType((*GameEvent_BotTippedOver)(nil), "GameEvent.BotTippedOver") + proto.RegisterType((*GameEvent_DefenderInDefenseArea)(nil), "GameEvent.DefenderInDefenseArea") + proto.RegisterType((*GameEvent_DefenderInDefenseAreaPartially)(nil), "GameEvent.DefenderInDefenseAreaPartially") + proto.RegisterType((*GameEvent_AttackerTouchedBallInDefenseArea)(nil), "GameEvent.AttackerTouchedBallInDefenseArea") + proto.RegisterType((*GameEvent_BotKickedBallTooFast)(nil), "GameEvent.BotKickedBallTooFast") + proto.RegisterType((*GameEvent_BotDribbledBallTooFar)(nil), "GameEvent.BotDribbledBallTooFar") + proto.RegisterType((*GameEvent_AttackerTouchedOpponentInDefenseArea)(nil), "GameEvent.AttackerTouchedOpponentInDefenseArea") + proto.RegisterType((*GameEvent_AttackerDoubleTouchedBall)(nil), "GameEvent.AttackerDoubleTouchedBall") + proto.RegisterType((*GameEvent_AttackerTooCloseToDefenseArea)(nil), "GameEvent.AttackerTooCloseToDefenseArea") + proto.RegisterType((*GameEvent_BotHeldBallDeliberately)(nil), "GameEvent.BotHeldBallDeliberately") + proto.RegisterType((*GameEvent_BotInterferedPlacement)(nil), "GameEvent.BotInterferedPlacement") + proto.RegisterType((*GameEvent_MultipleCards)(nil), "GameEvent.MultipleCards") + proto.RegisterType((*GameEvent_MultipleFouls)(nil), "GameEvent.MultipleFouls") + proto.RegisterType((*GameEvent_MultiplePlacementFailures)(nil), "GameEvent.MultiplePlacementFailures") + proto.RegisterType((*GameEvent_KickTimeout)(nil), "GameEvent.KickTimeout") + proto.RegisterType((*GameEvent_NoProgressInGame)(nil), "GameEvent.NoProgressInGame") + proto.RegisterType((*GameEvent_PlacementFailed)(nil), "GameEvent.PlacementFailed") + proto.RegisterType((*GameEvent_UnsportingBehaviorMinor)(nil), "GameEvent.UnsportingBehaviorMinor") + proto.RegisterType((*GameEvent_UnsportingBehaviorMajor)(nil), "GameEvent.UnsportingBehaviorMajor") + proto.RegisterType((*GameEvent_KeeperHeldBall)(nil), "GameEvent.KeeperHeldBall") + proto.RegisterType((*GameEvent_PlacementSucceeded)(nil), "GameEvent.PlacementSucceeded") + proto.RegisterType((*GameEvent_Prepared)(nil), "GameEvent.Prepared") + proto.RegisterType((*GameEvent_BotSubstitution)(nil), "GameEvent.BotSubstitution") + proto.RegisterType((*GameEvent_TooManyRobots)(nil), "GameEvent.TooManyRobots") +} + +func init() { proto.RegisterFile("ssl_game_event_2019.proto", fileDescriptor_ca1dc6d9da8fefa7) } + +var fileDescriptor_ca1dc6d9da8fefa7 = []byte{ + // 2582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x73, 0xe3, 0xc6, + 0xf1, 0x27, 0xb5, 0x92, 0x56, 0x6a, 0x89, 0x12, 0x76, 0xf4, 0x82, 0xa8, 0xd5, 0x4a, 0x96, 0x77, + 0xd7, 0x5a, 0xfb, 0xef, 0xf5, 0x7f, 0x5d, 0x95, 0x54, 0xa5, 0x9c, 0x4a, 0x0a, 0x24, 0x21, 0x11, + 0x11, 0x45, 0xd0, 0x20, 0xb8, 0xae, 0xad, 0x24, 0x35, 0x06, 0xc9, 0xa1, 0x84, 0x08, 0xc4, 0x30, + 0x00, 0x28, 0x5b, 0x97, 0x1c, 0x73, 0x48, 0x25, 0x87, 0x54, 0x0e, 0x29, 0x27, 0xfe, 0x14, 0x39, + 0xe7, 0x96, 0x4b, 0xae, 0x39, 0xe6, 0x9c, 0x6b, 0x3e, 0x44, 0xaa, 0x07, 0x20, 0x08, 0xf0, 0x21,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xd3, 0x7a, 0x82, 0x09, 0xb1, + 0xe5, 0x8c, 0xb1, 0x3a, 0xc0, 0x61, 0x9b, 0x3c, 0x83, 0x79, 0x01, 0x5f, 0x9a, 0x06, 0x17, 0x6a, + 0xf2, 0x23, 0xc8, 0xd9, 0x6e, 0xdb, 0xf6, 0x58, 0x2b, 0x08, 0xe9, 0x97, 0x05, 0x7e, 0x27, 0x81, + 0xd7, 0x22, 0xfd, 0xc0, 0x8d, 0x9d, 0x68, 0x93, 0xcf, 0x60, 0xb5, 0x75, 0x69, 0xf7, 0x7a, 0x2c, + 0x4c, 0x56, 0x06, 0x61, 0xbe, 0x9d, 0x30, 0x2f, 0x86, 0xea, 0xc8, 0x7a, 0xa5, 0x35, 0x6c, 0xa2, + 0xb1, 0x65, 0x77, 0x1d, 0x9c, 0xfb, 0x57, 0x76, 0xeb, 0x4a, 0x5e, 0x19, 0x33, 0x56, 0x42, 0xf5, + 0x99, 0xdd, 0xba, 0x42, 0x63, 0x6b, 0xd8, 0x44, 0x63, 0x34, 0xa2, 0x81, 0xdd, 0x65, 0xbc, 0x1f, + 0xc8, 0xab, 0x63, 0xc6, 0x08, 0x33, 0x43, 0x2d, 0x1a, 0x5f, 0x0d, 0x9b, 0x44, 0x05, 0xe9, 0x8a, + 0xb1, 0x1e, 0xf3, 0xe8, 0x25, 0x8e, 0x13, 0x76, 0xbd, 0x9c, 0x13, 0x04, 0xbb, 0x49, 0x02, 0x01, + 0x29, 0x33, 0xa7, 0x8d, 0x83, 0x55, 0xce, 0x18, 0x6b, 0x57, 0x29, 0x09, 0xb9, 0x80, 0xc7, 0x56, + 0x10, 0x58, 0xad, 0x2b, 0xe6, 0xd1, 0x36, 0xef, 0xe3, 0x18, 0x89, 0xa9, 0xc4, 0x22, 0xca, 0x35, + 0x41, 0xf9, 0x34, 0x99, 0x50, 0x04, 0x2f, 0x09, 0xb4, 0x19, 0x82, 0x23, 0xf6, 0x5d, 0x6b, 0x9a, + 0x92, 0xfc, 0x0a, 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x25, 0x69, 0x01, 0xe1, 0x05, 0x1d, 0x45, 0x85, 0xba, 0xa9, 0x99, 0x0d, 0x53, 0xd3, + 0xab, 0xd2, 0x33, 0xb2, 0x01, 0xeb, 0xa6, 0xae, 0xd3, 0x73, 0xa5, 0xfa, 0x86, 0x1a, 0x7a, 0x41, + 0x37, 0xeb, 0xd2, 0x73, 0xf2, 0x04, 0xf2, 0x05, 0xa5, 0x52, 0xa1, 0x15, 0xf5, 0xc4, 0xa4, 0x27, + 0x9a, 0x5a, 0x29, 0x51, 0x53, 0x6f, 0x14, 0xcb, 0xb4, 0xa2, 0x55, 0x55, 0x69, 0x91, 0xec, 0xc3, + 0xee, 0xa8, 0xfe, 0x54, 0x57, 0x2a, 0xa1, 0xfa, 0x21, 0x79, 0x04, 0xb9, 0x9a, 0x5e, 0xaf, 0x6b, + 0x85, 0x8a, 0x2a, 0xe4, 0xd2, 0x07, 0x64, 0x09, 0xe6, 0xc5, 0xbf, 0x25, 0x54, 0x6a, 0xd5, 0x92, + 0x66, 0xa8, 0x45, 0x33, 0x54, 0x2e, 0x13, 0x09, 0x56, 0x8b, 0x65, 0xad, 0x56, 0x53, 0x43, 0x1a, + 0x09, 0x50, 0xa2, 0x68, 0xe7, 0x15, 0xcc, 0xf7, 0x4c, 0x2b, 0x9e, 0x49, 0x2b, 0x28, 0xc1, 0x7f, + 0xd4, 0xd4, 0xce, 0x55, 0xbd, 0x61, 0x4a, 0xab, 0x98, 0xcf, 0x99, 0xaa, 0xd6, 0x54, 0x83, 0x96, + 0x31, 0x00, 0x0c, 0x48, 0xca, 0x91, 0x43, 0x78, 0xac, 0x98, 0xa6, 0x52, 0x3c, 0x53, 0x0d, 0x5a, + 0xd2, 0x1b, 0x18, 0x82, 0x08, 0x5d, 0x8d, 0x10, 0x6b, 0xe4, 0x05, 0x3c, 0x8b, 0x11, 0x49, 0x15, + 0xf6, 0x6c, 0x49, 0x3d, 0x51, 0xab, 0x75, 0x95, 0x2a, 0x86, 0xaa, 0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28, 0xf2, 0x2e, 0x8d, 0xf6, 0x86, 0x98, 0x3b, 0x35, 0x5d, 0xab, 0x9a, 0xd2, 0x3e, + 0xf6, 0x59, 0x8c, 0x1a, 0x1d, 0x96, 0x9a, 0x62, 0x98, 0x9a, 0x52, 0xa9, 0xbc, 0x91, 0x9e, 0x60, + 0xaa, 0xd3, 0x70, 0xd2, 0x01, 0xa6, 0x7a, 0xde, 0xa8, 0x98, 0x5a, 0xad, 0xa2, 0xd2, 0xa2, 0x62, + 0x94, 0xea, 0xd2, 0x21, 0x39, 0x80, 0xbd, 0x58, 0x96, 0x5e, 0x9b, 0x0d, 0x43, 0xad, 0x4b, 0xef, + 0xa5, 0x8c, 0x4e, 0xf4, 0x46, 0xa5, 0x2e, 0x1d, 0xe1, 0xf8, 0x37, 0xaa, 0xf5, 0x9a, 0x6e, 0x98, + 0x5a, 0xf5, 0x94, 0x16, 0xd4, 0xb2, 0xf2, 0x5a, 0xd3, 0x0d, 0x7a, 0xae, 0x55, 0x75, 0x43, 0x7a, + 0x7f, 0xaa, 0x5a, 0xf9, 0x89, 0x6e, 0x48, 0x4f, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x53, 0x65, + 0xac, 0xca, 0xff, 0x22, 0x00, 0x00, +} diff --git a/referee_comm/include/proto/ssl_game_event_2019.proto b/referee_comm/include/proto/ssl_game_event_2019.proto new file mode 100644 index 00000000..fc74c9dd --- /dev/null +++ b/referee_comm/include/proto/ssl_game_event_2019.proto @@ -0,0 +1,457 @@ +syntax = "proto2"; + +import "ssl_game_controller_common.proto"; + +// GameEvent contains exactly one game event +// Each game event has optional and required fields. The required fields are mandatory to process the event. +// Some optional fields are only used for visualization, others are required to determine the ball placement position. +// If fields are missing that are required for the ball placement position, no ball placement command will be issued. +// Fields are marked optional to make testing and extending of the protocol easier. +// An autoRef should ideally set all fields, except if there are good reasons to not do so. +message GameEvent { + + required GameEventType type = 40; + + // the origin of this game event + // empty, if it originates from game controller + // autoRef name(s), if it originates from one or more autoRefs + repeated string origin = 41; + + // the event that occurred + oneof event { + + // Match proceeding events + + Prepared prepared = 1; + NoProgressInGame no_progress_in_game = 2; + PlacementFailed placement_failed = 3; + PlacementSucceeded placement_succeeded = 5; + BotSubstitution bot_substitution = 37; + TooManyRobots too_many_robots = 38; + + // Ball out of field events + + BallLeftField ball_left_field_touch_line = 6; + BallLeftField ball_left_field_goal_line = 7; + Goal possible_goal = 39; + Goal goal = 8; + IndirectGoal indirect_goal = 9; + ChippedGoal chipped_goal = 10; + + // Minor offense events + + AimlessKick aimless_kick = 11; + KickTimeout kick_timeout = 12; + KeeperHeldBall keeper_held_ball = 13; + AttackerDoubleTouchedBall attacker_double_touched_ball = 14; + AttackerTouchedBallInDefenseArea attacker_touched_ball_in_defense_area = 15; + AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area = 16; + AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area_skipped = 42; + BotDribbledBallTooFar bot_dribbled_ball_too_far = 17; + BotKickedBallTooFast bot_kicked_ball_too_fast = 18; + + // Foul events + + AttackerTooCloseToDefenseArea attacker_too_close_to_defense_area = 19; + BotInterferedPlacement bot_interfered_placement = 20; + BotCrashDrawn bot_crash_drawn = 21; + BotCrashUnique bot_crash_unique = 22; + BotCrashUnique bot_crash_unique_skipped = 23; + BotPushedBot bot_pushed_bot = 24; + BotPushedBot bot_pushed_bot_skipped = 25; + BotHeldBallDeliberately bot_held_ball_deliberately = 26; + BotTippedOver bot_tipped_over = 27; + BotTooFastInStop bot_too_fast_in_stop = 28; + DefenderTooCloseToKickPoint defender_too_close_to_kick_point = 29; + DefenderInDefenseAreaPartially defender_in_defense_area_partially = 30; + DefenderInDefenseArea defender_in_defense_area = 31; + + // Repeated events + + MultipleCards multiple_cards = 32; + MultiplePlacementFailures multiple_placement_failures = 33; + MultipleFouls multiple_fouls = 34; + + // Unsporting behavior events + + UnsportingBehaviorMinor unsporting_behavior_minor = 35; + UnsportingBehaviorMajor unsporting_behavior_major = 36; + } + + // the ball left the field normally + message BallLeftField { + // the team that last touched the ball + required Team by_team = 1; + // the bot that last touched the ball + optional uint32 by_bot = 2; + // the location where the ball left the field + optional Location location = 3; + } + // the ball left the field via goal line and a team committed an aimless kick + message AimlessKick { + // the team that last touched the ball + required Team by_team = 1; + // the bot that last touched the ball + optional uint32 by_bot = 2; + // the location where the ball left the field + optional Location location = 3; + // the location where the ball was last touched + optional Location kick_location = 4; + } + // a team shot a goal + message Goal { + // the team that scored the goal + required Team by_team = 1; + // the team that shot the goal (different from by_team for own goals) + optional Team kicking_team = 6; + // the bot that shot the goal + optional uint32 kicking_bot = 2; + // the location where the ball entered the goal + optional Location location = 3; + // the location where the ball was kicked + optional Location kick_location = 4; + } + // the ball entered the goal directly during an indirect free kick + message IndirectGoal { + // the team that tried to shoot the goal + required Team by_team = 1; + // the bot that kicked the ball - at least the team must be set + optional uint32 by_bot = 2; + // the location where the ball entered the goal + optional Location location = 3; + // the location where the ball was kicked + optional Location kick_location = 4; + } + // the ball entered the goal, but was initially chipped + message ChippedGoal { + // the team that tried to shoot the goal + required Team by_team = 1; + // the bot that kicked the ball + optional uint32 by_bot = 2; + // the location where the ball entered the goal + optional Location location = 3; + // the location where the ball was kicked + optional Location kick_location = 4; + // the maximum height [m] of the ball, before it entered the goal and since the last kick + optional float max_ball_height = 5; + } + // a bot moved too fast while the game was stopped + message BotTooFastInStop { + // the team that found guilty + required Team by_team = 1; + // the bot that was too fast + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the bot speed [m/s] + optional float speed = 4; + } + // a bot of the defending team got too close to the kick point during a free kick + message DefenderTooCloseToKickPoint { + // the team that found guilty + required Team by_team = 1; + // the bot that violates the distance to the kick point + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the distance [m] from bot to the kick point (including the minimum radius) + optional float distance = 4; + } + // two robots crashed into each other with similar speeds + message BotCrashDrawn { + // the bot of the yellow team + optional uint32 bot_yellow = 1; + // the bot of the blue team + optional uint32 bot_blue = 2; + // the location of the crash (center between both bots) + optional Location location = 3; + // the calculated crash speed [m/s] of the two bots + optional float crash_speed = 4; + // the difference [m/s] of the velocity of the two bots + optional float speed_diff = 5; + // the angle [rad] in the range [0, π] of the bot velocity vectors + // an angle of 0 rad ( 0°) means, the bots barely touched each other + // an angle of π rad (180°) means, the bots crashed frontal into each other + optional float crash_angle = 6; + } + // two robots crashed into each other and one team was found guilty to due significant speed difference + message BotCrashUnique { + // the team that caused the crash + required Team by_team = 1; + // the bot that caused the crash + optional uint32 violator = 2; + // the bot of the opposite team that was involved in the crash + optional uint32 victim = 3; + // the location of the crash (center between both bots) + optional Location location = 4; + // the calculated crash speed vector [m/s] of the two bots + optional float crash_speed = 5; + // the difference [m/s] of the velocity of the two bots + optional float speed_diff = 6; + // the angle [rad] in the range [0, π] of the bot velocity vectors + // an angle of 0 rad ( 0°) means, the bots barely touched each other + // an angle of π rad (180°) means, the bots crashed frontal into each other + optional float crash_angle = 7; + } + // a bot pushed another bot over a significant distance + message BotPushedBot { + // the team that pushed the other team + required Team by_team = 1; + // the bot that pushed the other bot + optional uint32 violator = 2; + // the bot of the opposite team that was pushed + optional uint32 victim = 3; + // the location of the push (center between both bots) + optional Location location = 4; + // the pushed distance [m] + optional float pushed_distance = 5; + } + // a bot tipped over + message BotTippedOver { + // the team that found guilty + required Team by_team = 1; + // the bot that tipped over + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + } + // a defender other than the keeper was fully located inside its own defense and touched the ball + message DefenderInDefenseArea { + // the team that found guilty + required Team by_team = 1; + // the bot that is inside the penalty area + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the distance [m] from bot case to the nearest point outside the defense area + optional float distance = 4; + } + // a defender other than the keeper was partially located inside its own defense area and touched the ball + message DefenderInDefenseAreaPartially { + // the team that found guilty + required Team by_team = 1; + // the bot that is partially inside the penalty area + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the distance [m] that the bot is inside the penalty area + optional float distance = 4; + } + // an attacker touched the ball inside the opponent defense area + message AttackerTouchedBallInDefenseArea { + // the team that found guilty + required Team by_team = 1; + // the bot that is inside the penalty area + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the distance [m] that the bot is inside the penalty area + optional float distance = 4; + } + // a bot kicked the ball too fast + message BotKickedBallTooFast { + // the team that found guilty + required Team by_team = 1; + // the bot that kicked too fast + optional uint32 by_bot = 2; + // the location of the ball at the time of the highest speed + optional Location location = 3; + // the absolute initial ball speed (kick speed) [m/s] + optional float initial_ball_speed = 4; + // was the ball chipped? + optional bool chipped = 5; + } + // a bot dribbled to ball too far + message BotDribbledBallTooFar { + // the team that found guilty + required Team by_team = 1; + // the bot that dribbled too far + optional uint32 by_bot = 2; + // the location where the dribbling started + optional Location start = 3; + // the location where the maximum dribbling distance was reached + optional Location end = 4; + } + // an attacker touched the opponent robot inside defense area + message AttackerTouchedOpponentInDefenseArea { + // the team that found guilty + required Team by_team = 1; + // the bot that touched the opponent robot + optional uint32 by_bot = 2; + // the bot of the opposite team that was touched + optional uint32 victim = 4; + // the location of the contact point between both bots + optional Location location = 3; + } + // an attacker touched the ball multiple times when it was not allowed to + message AttackerDoubleTouchedBall { + // the team that found guilty + required Team by_team = 1; + // the bot that touched the ball twice + optional uint32 by_bot = 2; + // the location of the ball when it was first touched + optional Location location = 3; + } + // an attacker was located too near to the opponent defense area when ball entered play + message AttackerTooCloseToDefenseArea { + // the team that found guilty + required Team by_team = 1; + // the bot that is too close to the defense area + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + // the distance [m] of the bot to the penalty area + optional float distance = 4; + } + // a bot held the ball for too long + message BotHeldBallDeliberately { + // the team that found guilty + required Team by_team = 1; + // the bot that holds the ball + optional uint32 by_bot = 2; + // the location of the ball + optional Location location = 3; + // the duration [s] that the bot hold the ball + optional float duration = 4; + } + // a bot interfered the ball placement of the other team + message BotInterferedPlacement { + // the team that found guilty + required Team by_team = 1; + // the bot that interfered the placement + optional uint32 by_bot = 2; + // the location of the bot + optional Location location = 3; + } + // a team collected multiple cards (yellow and red), which results in a penalty kick + message MultipleCards { + // the team that received multiple yellow cards + required Team by_team = 1; + } + // a team collected multiple fouls, which results in a yellow card + message MultipleFouls { + // the team that collected multiple fouls + required Team by_team = 1; + } + // a team failed to place the ball multiple times in a row + message MultiplePlacementFailures { + // the team that failed multiple times + required Team by_team = 1; + } + // timeout waiting for the attacking team to perform the free kick + message KickTimeout { + // the team that that should have kicked + required Team by_team = 1; + // the location of the ball + optional Location location = 2; + // the time [s] that was waited + optional float time = 3; + } + // game was stuck + message NoProgressInGame { + // the location of the ball + optional Location location = 1; + // the time [s] that was waited + optional float time = 2; + } + // ball placement failed + message PlacementFailed { + // the team that failed + required Team by_team = 1; + // the remaining distance [m] from ball to placement position + optional float remaining_distance = 2; + } + // a team was found guilty for minor unsporting behavior + message UnsportingBehaviorMinor { + // the team that found guilty + required Team by_team = 1; + // an explanation of the situation and decision + required string reason = 2; + } + // a team was found guilty for major unsporting behavior + message UnsportingBehaviorMajor { + // the team that found guilty + required Team by_team = 1; + // an explanation of the situation and decision + required string reason = 2; + } + // a keeper held the ball in its defense area for too long + message KeeperHeldBall { + // the team that found guilty + required Team by_team = 1; + // the location of the ball + optional Location location = 2; + // the duration [s] that the keeper hold the ball + optional float duration = 3; + } + // a team successfully placed the ball + message PlacementSucceeded { + // the team that did the placement + required Team by_team = 1; + // the time [s] taken for placing the ball + optional float time_taken = 2; + // the distance [m] between placement location and actual ball position + optional float precision = 3; + // the distance [m] between the initial ball location and the placement position + optional float distance = 4; + } + // both teams are prepared - all conditions are met to continue (with kickoff or penalty kick) + message Prepared { + // the time [s] taken for preparing + optional float time_taken = 1; + } + // bots are being substituted by at least one team + message BotSubstitution { + // the team that substitutes robots + required Team by_team = 1; + } + // a team has too many robots on the field + message TooManyRobots { + // the team that has too many robots + required Team by_team = 1; + } +} + +enum GameEventType { + UNKNOWN_GAME_EVENT_TYPE = 0; + + PREPARED = 1; + NO_PROGRESS_IN_GAME = 2; + PLACEMENT_FAILED = 3; + PLACEMENT_SUCCEEDED = 5; + BOT_SUBSTITUTION = 37; + TOO_MANY_ROBOTS = 38; + BALL_LEFT_FIELD_TOUCH_LINE = 6; + BALL_LEFT_FIELD_GOAL_LINE = 7; + POSSIBLE_GOAL = 39; + GOAL = 8; + INDIRECT_GOAL = 9; + CHIPPED_GOAL = 10; + AIMLESS_KICK = 11; + KICK_TIMEOUT = 12; + KEEPER_HELD_BALL = 13; + ATTACKER_DOUBLE_TOUCHED_BALL = 14; + ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA = 15; + ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA = 16; + ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA_SKIPPED = 40; + BOT_DRIBBLED_BALL_TOO_FAR = 17; + BOT_KICKED_BALL_TOO_FAST = 18; + ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA = 19; + BOT_INTERFERED_PLACEMENT = 20; + BOT_CRASH_DRAWN = 21; + BOT_CRASH_UNIQUE = 22; + BOT_CRASH_UNIQUE_SKIPPED = 23; + BOT_PUSHED_BOT = 24; + BOT_PUSHED_BOT_SKIPPED = 25; + BOT_HELD_BALL_DELIBERATELY = 26; + BOT_TIPPED_OVER = 27; + BOT_TOO_FAST_IN_STOP = 28; + DEFENDER_TOO_CLOSE_TO_KICK_POINT = 29; + DEFENDER_IN_DEFENSE_AREA_PARTIALLY = 30; + DEFENDER_IN_DEFENSE_AREA = 31; + MULTIPLE_CARDS = 32; + MULTIPLE_PLACEMENT_FAILURES = 33; + MULTIPLE_FOULS = 34; + UNSPORTING_BEHAVIOR_MINOR = 35; + UNSPORTING_BEHAVIOR_MAJOR = 36; +} diff --git a/referee_comm/include/proto/ssl_referee.pb.go b/referee_comm/include/proto/ssl_referee.pb.go new file mode 100644 index 00000000..5dcbfe8c --- /dev/null +++ b/referee_comm/include/proto/ssl_referee.pb.go @@ -0,0 +1,767 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: ssl_referee.proto + +package refproto + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// These are the "coarse" stages of the game. +type Referee_Stage int32 + +const ( + // The first half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + Referee_NORMAL_FIRST_HALF_PRE Referee_Stage = 0 + // The first half of the normal game, before half time. + Referee_NORMAL_FIRST_HALF Referee_Stage = 1 + // Half time between first and second halves. + Referee_NORMAL_HALF_TIME Referee_Stage = 2 + // The second half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + Referee_NORMAL_SECOND_HALF_PRE Referee_Stage = 3 + // The second half of the normal game, after half time. + Referee_NORMAL_SECOND_HALF Referee_Stage = 4 + // The break before extra time. + Referee_EXTRA_TIME_BREAK Referee_Stage = 5 + // The first half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + Referee_EXTRA_FIRST_HALF_PRE Referee_Stage = 6 + // The first half of extra time. + Referee_EXTRA_FIRST_HALF Referee_Stage = 7 + // Half time between first and second extra halves. + Referee_EXTRA_HALF_TIME Referee_Stage = 8 + // The second half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + Referee_EXTRA_SECOND_HALF_PRE Referee_Stage = 9 + // The second half of extra time. + Referee_EXTRA_SECOND_HALF Referee_Stage = 10 + // The break before penalty shootout. + Referee_PENALTY_SHOOTOUT_BREAK Referee_Stage = 11 + // The penalty shootout. + Referee_PENALTY_SHOOTOUT Referee_Stage = 12 + // The game is over. + Referee_POST_GAME Referee_Stage = 13 +) + +var Referee_Stage_name = map[int32]string{ + 0: "NORMAL_FIRST_HALF_PRE", + 1: "NORMAL_FIRST_HALF", + 2: "NORMAL_HALF_TIME", + 3: "NORMAL_SECOND_HALF_PRE", + 4: "NORMAL_SECOND_HALF", + 5: "EXTRA_TIME_BREAK", + 6: "EXTRA_FIRST_HALF_PRE", + 7: "EXTRA_FIRST_HALF", + 8: "EXTRA_HALF_TIME", + 9: "EXTRA_SECOND_HALF_PRE", + 10: "EXTRA_SECOND_HALF", + 11: "PENALTY_SHOOTOUT_BREAK", + 12: "PENALTY_SHOOTOUT", + 13: "POST_GAME", +} + +var Referee_Stage_value = map[string]int32{ + "NORMAL_FIRST_HALF_PRE": 0, + "NORMAL_FIRST_HALF": 1, + "NORMAL_HALF_TIME": 2, + "NORMAL_SECOND_HALF_PRE": 3, + "NORMAL_SECOND_HALF": 4, + "EXTRA_TIME_BREAK": 5, + "EXTRA_FIRST_HALF_PRE": 6, + "EXTRA_FIRST_HALF": 7, + "EXTRA_HALF_TIME": 8, + "EXTRA_SECOND_HALF_PRE": 9, + "EXTRA_SECOND_HALF": 10, + "PENALTY_SHOOTOUT_BREAK": 11, + "PENALTY_SHOOTOUT": 12, + "POST_GAME": 13, +} + +func (x Referee_Stage) Enum() *Referee_Stage { + p := new(Referee_Stage) + *p = x + return p +} + +func (x Referee_Stage) String() string { + return proto.EnumName(Referee_Stage_name, int32(x)) +} + +func (x *Referee_Stage) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Referee_Stage_value, data, "Referee_Stage") + if err != nil { + return err + } + *x = Referee_Stage(value) + return nil +} + +func (Referee_Stage) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{0, 0} +} + +// These are the "fine" states of play on the field. +type Referee_Command int32 + +const ( + // All robots should completely stop moving. + Referee_HALT Referee_Command = 0 + // Robots must keep 50 cm from the ball. + Referee_STOP Referee_Command = 1 + // A prepared kickoff or penalty may now be taken. + Referee_NORMAL_START Referee_Command = 2 + // The ball is dropped and free for either team. + Referee_FORCE_START Referee_Command = 3 + // The yellow team may move into kickoff position. + Referee_PREPARE_KICKOFF_YELLOW Referee_Command = 4 + // The blue team may move into kickoff position. + Referee_PREPARE_KICKOFF_BLUE Referee_Command = 5 + // The yellow team may move into penalty position. + Referee_PREPARE_PENALTY_YELLOW Referee_Command = 6 + // The blue team may move into penalty position. + Referee_PREPARE_PENALTY_BLUE Referee_Command = 7 + // The yellow team may take a direct free kick. + Referee_DIRECT_FREE_YELLOW Referee_Command = 8 + // The blue team may take a direct free kick. + Referee_DIRECT_FREE_BLUE Referee_Command = 9 + // The yellow team may take an indirect free kick. + Referee_INDIRECT_FREE_YELLOW Referee_Command = 10 + // The blue team may take an indirect free kick. + Referee_INDIRECT_FREE_BLUE Referee_Command = 11 + // The yellow team is currently in a timeout. + Referee_TIMEOUT_YELLOW Referee_Command = 12 + // The blue team is currently in a timeout. + Referee_TIMEOUT_BLUE Referee_Command = 13 + // The yellow team just scored a goal. + // For information only. + // For rules compliance, teams must treat as STOP. + // Deprecated: Use the score field from the team infos instead. That way, you can also detect revoked goals. + Referee_GOAL_YELLOW Referee_Command = 14 // Deprecated: Do not use. + // The blue team just scored a goal. See also GOAL_YELLOW. + Referee_GOAL_BLUE Referee_Command = 15 // Deprecated: Do not use. + // Equivalent to STOP, but the yellow team must pick up the ball and + // drop it in the Designated Position. + Referee_BALL_PLACEMENT_YELLOW Referee_Command = 16 + // Equivalent to STOP, but the blue team must pick up the ball and drop + // it in the Designated Position. + Referee_BALL_PLACEMENT_BLUE Referee_Command = 17 +) + +var Referee_Command_name = map[int32]string{ + 0: "HALT", + 1: "STOP", + 2: "NORMAL_START", + 3: "FORCE_START", + 4: "PREPARE_KICKOFF_YELLOW", + 5: "PREPARE_KICKOFF_BLUE", + 6: "PREPARE_PENALTY_YELLOW", + 7: "PREPARE_PENALTY_BLUE", + 8: "DIRECT_FREE_YELLOW", + 9: "DIRECT_FREE_BLUE", + 10: "INDIRECT_FREE_YELLOW", + 11: "INDIRECT_FREE_BLUE", + 12: "TIMEOUT_YELLOW", + 13: "TIMEOUT_BLUE", + 14: "GOAL_YELLOW", + 15: "GOAL_BLUE", + 16: "BALL_PLACEMENT_YELLOW", + 17: "BALL_PLACEMENT_BLUE", +} + +var Referee_Command_value = map[string]int32{ + "HALT": 0, + "STOP": 1, + "NORMAL_START": 2, + "FORCE_START": 3, + "PREPARE_KICKOFF_YELLOW": 4, + "PREPARE_KICKOFF_BLUE": 5, + "PREPARE_PENALTY_YELLOW": 6, + "PREPARE_PENALTY_BLUE": 7, + "DIRECT_FREE_YELLOW": 8, + "DIRECT_FREE_BLUE": 9, + "INDIRECT_FREE_YELLOW": 10, + "INDIRECT_FREE_BLUE": 11, + "TIMEOUT_YELLOW": 12, + "TIMEOUT_BLUE": 13, + "GOAL_YELLOW": 14, + "GOAL_BLUE": 15, + "BALL_PLACEMENT_YELLOW": 16, + "BALL_PLACEMENT_BLUE": 17, +} + +func (x Referee_Command) Enum() *Referee_Command { + p := new(Referee_Command) + *p = x + return p +} + +func (x Referee_Command) String() string { + return proto.EnumName(Referee_Command_name, int32(x)) +} + +func (x *Referee_Command) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Referee_Command_value, data, "Referee_Command") + if err != nil { + return err + } + *x = Referee_Command(value) + return nil +} + +func (Referee_Command) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{0, 1} +} + +// Each UDP packet contains one of these messages. +type Referee struct { + // The UNIX timestamp when the packet was sent, in microseconds. + // Divide by 1,000,000 to get a time_t. + PacketTimestamp *uint64 `protobuf:"varint,1,req,name=packet_timestamp,json=packetTimestamp" json:"packet_timestamp,omitempty"` + Stage *Referee_Stage `protobuf:"varint,2,req,name=stage,enum=Referee_Stage" json:"stage,omitempty"` + // The number of microseconds left in the stage. + // The following stages have this value; the rest do not: + // NORMAL_FIRST_HALF + // NORMAL_HALF_TIME + // NORMAL_SECOND_HALF + // EXTRA_TIME_BREAK + // EXTRA_FIRST_HALF + // EXTRA_HALF_TIME + // EXTRA_SECOND_HALF + // PENALTY_SHOOTOUT_BREAK + // + // If the stage runs over its specified time, this value + // becomes negative. + StageTimeLeft *int32 `protobuf:"zigzag32,3,opt,name=stage_time_left,json=stageTimeLeft" json:"stage_time_left,omitempty"` + Command *Referee_Command `protobuf:"varint,4,req,name=command,enum=Referee_Command" json:"command,omitempty"` + // The number of commands issued since startup (mod 2^32). + CommandCounter *uint32 `protobuf:"varint,5,req,name=command_counter,json=commandCounter" json:"command_counter,omitempty"` + // The UNIX timestamp when the command was issued, in microseconds. + // This value changes only when a new command is issued, not on each packet. + CommandTimestamp *uint64 `protobuf:"varint,6,req,name=command_timestamp,json=commandTimestamp" json:"command_timestamp,omitempty"` + // Information about the two teams. + Yellow *Referee_TeamInfo `protobuf:"bytes,7,req,name=yellow" json:"yellow,omitempty"` + Blue *Referee_TeamInfo `protobuf:"bytes,8,req,name=blue" json:"blue,omitempty"` + DesignatedPosition *Referee_Point `protobuf:"bytes,9,opt,name=designated_position,json=designatedPosition" json:"designated_position,omitempty"` + // Information about the direction of play. + // True, if the blue team will have it's goal on the positive x-axis of the ssl-vision coordinate system. + // Obviously, the yellow team will play on the opposite half. + BlueTeamOnPositiveHalf *bool `protobuf:"varint,10,opt,name=blue_team_on_positive_half,json=blueTeamOnPositiveHalf" json:"blue_team_on_positive_half,omitempty"` + // The game event that caused the referee command. + // deprecated in favor of game_events. + GameEvent *Game_Event `protobuf:"bytes,11,opt,name=game_event,json=gameEvent" json:"game_event,omitempty"` // Deprecated: Do not use. + // The command that will be issued after the current stoppage and ball placement to continue the game. + NextCommand *Referee_Command `protobuf:"varint,12,opt,name=next_command,json=nextCommand,enum=Referee_Command" json:"next_command,omitempty"` + // All game events that were detected since the last RUNNING state. + // Will be cleared as soon as the game is continued. + GameEvents []*GameEvent `protobuf:"bytes,13,rep,name=game_events,json=gameEvents" json:"game_events,omitempty"` + // All non-finished proposed game events that may be processed next. + ProposedGameEvents []*ProposedGameEvent `protobuf:"bytes,14,rep,name=proposed_game_events,json=proposedGameEvents" json:"proposed_game_events,omitempty"` + // The time in microseconds that is remaining until the current action times out + // The time will not be reset. It can get negative. + // An autoRef would raise an appropriate event, if the time gets negative. + // Possible actions where this time is relevant: + // * free kicks + // * kickoff, penalty kick, force start + // * ball placement + CurrentActionTimeRemaining *int32 `protobuf:"varint,15,opt,name=current_action_time_remaining,json=currentActionTimeRemaining" json:"current_action_time_remaining,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Referee) Reset() { *m = Referee{} } +func (m *Referee) String() string { return proto.CompactTextString(m) } +func (*Referee) ProtoMessage() {} +func (*Referee) Descriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{0} +} + +func (m *Referee) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Referee.Unmarshal(m, b) +} +func (m *Referee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Referee.Marshal(b, m, deterministic) +} +func (m *Referee) XXX_Merge(src proto.Message) { + xxx_messageInfo_Referee.Merge(m, src) +} +func (m *Referee) XXX_Size() int { + return xxx_messageInfo_Referee.Size(m) +} +func (m *Referee) XXX_DiscardUnknown() { + xxx_messageInfo_Referee.DiscardUnknown(m) +} + +var xxx_messageInfo_Referee proto.InternalMessageInfo + +func (m *Referee) GetPacketTimestamp() uint64 { + if m != nil && m.PacketTimestamp != nil { + return *m.PacketTimestamp + } + return 0 +} + +func (m *Referee) GetStage() Referee_Stage { + if m != nil && m.Stage != nil { + return *m.Stage + } + return Referee_NORMAL_FIRST_HALF_PRE +} + +func (m *Referee) GetStageTimeLeft() int32 { + if m != nil && m.StageTimeLeft != nil { + return *m.StageTimeLeft + } + return 0 +} + +func (m *Referee) GetCommand() Referee_Command { + if m != nil && m.Command != nil { + return *m.Command + } + return Referee_HALT +} + +func (m *Referee) GetCommandCounter() uint32 { + if m != nil && m.CommandCounter != nil { + return *m.CommandCounter + } + return 0 +} + +func (m *Referee) GetCommandTimestamp() uint64 { + if m != nil && m.CommandTimestamp != nil { + return *m.CommandTimestamp + } + return 0 +} + +func (m *Referee) GetYellow() *Referee_TeamInfo { + if m != nil { + return m.Yellow + } + return nil +} + +func (m *Referee) GetBlue() *Referee_TeamInfo { + if m != nil { + return m.Blue + } + return nil +} + +func (m *Referee) GetDesignatedPosition() *Referee_Point { + if m != nil { + return m.DesignatedPosition + } + return nil +} + +func (m *Referee) GetBlueTeamOnPositiveHalf() bool { + if m != nil && m.BlueTeamOnPositiveHalf != nil { + return *m.BlueTeamOnPositiveHalf + } + return false +} + +// Deprecated: Do not use. +func (m *Referee) GetGameEvent() *Game_Event { + if m != nil { + return m.GameEvent + } + return nil +} + +func (m *Referee) GetNextCommand() Referee_Command { + if m != nil && m.NextCommand != nil { + return *m.NextCommand + } + return Referee_HALT +} + +func (m *Referee) GetGameEvents() []*GameEvent { + if m != nil { + return m.GameEvents + } + return nil +} + +func (m *Referee) GetProposedGameEvents() []*ProposedGameEvent { + if m != nil { + return m.ProposedGameEvents + } + return nil +} + +func (m *Referee) GetCurrentActionTimeRemaining() int32 { + if m != nil && m.CurrentActionTimeRemaining != nil { + return *m.CurrentActionTimeRemaining + } + return 0 +} + +// Information about a single team. +type Referee_TeamInfo struct { + // The team's name (empty string if operator has not typed anything). + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + // The number of goals scored by the team during normal play and overtime. + Score *uint32 `protobuf:"varint,2,req,name=score" json:"score,omitempty"` + // The number of red cards issued to the team since the beginning of the game. + RedCards *uint32 `protobuf:"varint,3,req,name=red_cards,json=redCards" json:"red_cards,omitempty"` + // The amount of time (in microseconds) left on each yellow card issued to the team. + // If no yellow cards are issued, this array has no elements. + // Otherwise, times are ordered from smallest to largest. + YellowCardTimes []uint32 `protobuf:"varint,4,rep,packed,name=yellow_card_times,json=yellowCardTimes" json:"yellow_card_times,omitempty"` + // The total number of yellow cards ever issued to the team. + YellowCards *uint32 `protobuf:"varint,5,req,name=yellow_cards,json=yellowCards" json:"yellow_cards,omitempty"` + // The number of timeouts this team can still call. + // If in a timeout right now, that timeout is excluded. + Timeouts *uint32 `protobuf:"varint,6,req,name=timeouts" json:"timeouts,omitempty"` + // The number of microseconds of timeout this team can use. + TimeoutTime *uint32 `protobuf:"varint,7,req,name=timeout_time,json=timeoutTime" json:"timeout_time,omitempty"` + // The pattern number of this team's goalkeeper. + Goalkeeper *uint32 `protobuf:"varint,8,req,name=goalkeeper" json:"goalkeeper,omitempty"` + // The total number of countable fouls that act towards yellow cards + FoulCounter *uint32 `protobuf:"varint,9,opt,name=foul_counter,json=foulCounter" json:"foul_counter,omitempty"` + // The number of consecutive ball placement failures of this team + BallPlacementFailures *uint32 `protobuf:"varint,10,opt,name=ball_placement_failures,json=ballPlacementFailures" json:"ball_placement_failures,omitempty"` + // Indicate if the team is able and allowed to place the ball + CanPlaceBall *bool `protobuf:"varint,12,opt,name=can_place_ball,json=canPlaceBall" json:"can_place_ball,omitempty"` + // The maximum number of bots allowed on the field based on division and cards + MaxAllowedBots *uint32 `protobuf:"varint,13,opt,name=max_allowed_bots,json=maxAllowedBots" json:"max_allowed_bots,omitempty"` + // The team has submitted an intent to substitute one or more robots at the next chance + BotSubstitutionIntent *bool `protobuf:"varint,14,opt,name=bot_substitution_intent,json=botSubstitutionIntent" json:"bot_substitution_intent,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Referee_TeamInfo) Reset() { *m = Referee_TeamInfo{} } +func (m *Referee_TeamInfo) String() string { return proto.CompactTextString(m) } +func (*Referee_TeamInfo) ProtoMessage() {} +func (*Referee_TeamInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{0, 0} +} + +func (m *Referee_TeamInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Referee_TeamInfo.Unmarshal(m, b) +} +func (m *Referee_TeamInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Referee_TeamInfo.Marshal(b, m, deterministic) +} +func (m *Referee_TeamInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Referee_TeamInfo.Merge(m, src) +} +func (m *Referee_TeamInfo) XXX_Size() int { + return xxx_messageInfo_Referee_TeamInfo.Size(m) +} +func (m *Referee_TeamInfo) XXX_DiscardUnknown() { + xxx_messageInfo_Referee_TeamInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_Referee_TeamInfo proto.InternalMessageInfo + +func (m *Referee_TeamInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Referee_TeamInfo) GetScore() uint32 { + if m != nil && m.Score != nil { + return *m.Score + } + return 0 +} + +func (m *Referee_TeamInfo) GetRedCards() uint32 { + if m != nil && m.RedCards != nil { + return *m.RedCards + } + return 0 +} + +func (m *Referee_TeamInfo) GetYellowCardTimes() []uint32 { + if m != nil { + return m.YellowCardTimes + } + return nil +} + +func (m *Referee_TeamInfo) GetYellowCards() uint32 { + if m != nil && m.YellowCards != nil { + return *m.YellowCards + } + return 0 +} + +func (m *Referee_TeamInfo) GetTimeouts() uint32 { + if m != nil && m.Timeouts != nil { + return *m.Timeouts + } + return 0 +} + +func (m *Referee_TeamInfo) GetTimeoutTime() uint32 { + if m != nil && m.TimeoutTime != nil { + return *m.TimeoutTime + } + return 0 +} + +func (m *Referee_TeamInfo) GetGoalkeeper() uint32 { + if m != nil && m.Goalkeeper != nil { + return *m.Goalkeeper + } + return 0 +} + +func (m *Referee_TeamInfo) GetFoulCounter() uint32 { + if m != nil && m.FoulCounter != nil { + return *m.FoulCounter + } + return 0 +} + +func (m *Referee_TeamInfo) GetBallPlacementFailures() uint32 { + if m != nil && m.BallPlacementFailures != nil { + return *m.BallPlacementFailures + } + return 0 +} + +func (m *Referee_TeamInfo) GetCanPlaceBall() bool { + if m != nil && m.CanPlaceBall != nil { + return *m.CanPlaceBall + } + return false +} + +func (m *Referee_TeamInfo) GetMaxAllowedBots() uint32 { + if m != nil && m.MaxAllowedBots != nil { + return *m.MaxAllowedBots + } + return 0 +} + +func (m *Referee_TeamInfo) GetBotSubstitutionIntent() bool { + if m != nil && m.BotSubstitutionIntent != nil { + return *m.BotSubstitutionIntent + } + return false +} + +// The coordinates of the Designated Position. These are measured in +// millimetres and correspond to SSL-Vision coordinates. These fields are +// always either both present (in the case of a ball placement command) or +// both absent (in the case of any other command). +type Referee_Point struct { + X *float32 `protobuf:"fixed32,1,req,name=x" json:"x,omitempty"` + Y *float32 `protobuf:"fixed32,2,req,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Referee_Point) Reset() { *m = Referee_Point{} } +func (m *Referee_Point) String() string { return proto.CompactTextString(m) } +func (*Referee_Point) ProtoMessage() {} +func (*Referee_Point) Descriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{0, 1} +} + +func (m *Referee_Point) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Referee_Point.Unmarshal(m, b) +} +func (m *Referee_Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Referee_Point.Marshal(b, m, deterministic) +} +func (m *Referee_Point) XXX_Merge(src proto.Message) { + xxx_messageInfo_Referee_Point.Merge(m, src) +} +func (m *Referee_Point) XXX_Size() int { + return xxx_messageInfo_Referee_Point.Size(m) +} +func (m *Referee_Point) XXX_DiscardUnknown() { + xxx_messageInfo_Referee_Point.DiscardUnknown(m) +} + +var xxx_messageInfo_Referee_Point proto.InternalMessageInfo + +func (m *Referee_Point) GetX() float32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *Referee_Point) GetY() float32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type ProposedGameEvent struct { + // The UNIX timestamp when the game event proposal will time out, in microseconds. + ValidUntil *uint64 `protobuf:"varint,1,req,name=valid_until,json=validUntil" json:"valid_until,omitempty"` + // The identifier of the proposer. + ProposerId *string `protobuf:"bytes,2,req,name=proposer_id,json=proposerId" json:"proposer_id,omitempty"` + // The proposed game event. + GameEvent *GameEvent `protobuf:"bytes,3,req,name=game_event,json=gameEvent" json:"game_event,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProposedGameEvent) Reset() { *m = ProposedGameEvent{} } +func (m *ProposedGameEvent) String() string { return proto.CompactTextString(m) } +func (*ProposedGameEvent) ProtoMessage() {} +func (*ProposedGameEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f003bb08adc02ebb, []int{1} +} + +func (m *ProposedGameEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProposedGameEvent.Unmarshal(m, b) +} +func (m *ProposedGameEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProposedGameEvent.Marshal(b, m, deterministic) +} +func (m *ProposedGameEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposedGameEvent.Merge(m, src) +} +func (m *ProposedGameEvent) XXX_Size() int { + return xxx_messageInfo_ProposedGameEvent.Size(m) +} +func (m *ProposedGameEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ProposedGameEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposedGameEvent proto.InternalMessageInfo + +func (m *ProposedGameEvent) GetValidUntil() uint64 { + if m != nil && m.ValidUntil != nil { + return *m.ValidUntil + } + return 0 +} + +func (m *ProposedGameEvent) GetProposerId() string { + if m != nil && m.ProposerId != nil { + return *m.ProposerId + } + return "" +} + +func (m *ProposedGameEvent) GetGameEvent() *GameEvent { + if m != nil { + return m.GameEvent + } + return nil +} + +func init() { + proto.RegisterEnum("Referee_Stage", Referee_Stage_name, Referee_Stage_value) + proto.RegisterEnum("Referee_Command", Referee_Command_name, Referee_Command_value) + proto.RegisterType((*Referee)(nil), "Referee") + proto.RegisterType((*Referee_TeamInfo)(nil), "Referee.TeamInfo") + proto.RegisterType((*Referee_Point)(nil), "Referee.Point") + proto.RegisterType((*ProposedGameEvent)(nil), "ProposedGameEvent") +} + +func init() { proto.RegisterFile("ssl_referee.proto", fileDescriptor_f003bb08adc02ebb) } + +var fileDescriptor_f003bb08adc02ebb = []byte{ + // 1122 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0xae, 0x64, 0x3b, 0xb1, 0x8f, 0x2c, 0x5b, 0xde, 0x24, 0xad, 0x6a, 0x06, 0x30, 0xa1, 0x80, + 0x4b, 0x67, 0x3c, 0x10, 0x66, 0x98, 0x81, 0x1b, 0x46, 0x76, 0xe5, 0xc6, 0x53, 0x25, 0xf2, 0xac, + 0xd5, 0x81, 0x5e, 0xed, 0x6c, 0xec, 0x75, 0xd0, 0x54, 0x3f, 0x1e, 0x49, 0x2e, 0xe9, 0x1d, 0x4f, + 0xc0, 0xbb, 0xf1, 0x08, 0xdc, 0xf0, 0x1c, 0xcc, 0x1e, 0xad, 0x62, 0x27, 0x29, 0x77, 0xbb, 0xdf, + 0xf7, 0x9d, 0x6f, 0xcf, 0xd9, 0x73, 0xb4, 0x82, 0x5e, 0x9e, 0x47, 0x2c, 0x13, 0x6b, 0x91, 0x09, + 0x31, 0xda, 0x64, 0x69, 0x91, 0xf6, 0x8f, 0x25, 0x74, 0xcd, 0x63, 0xc1, 0xc4, 0x7b, 0x91, 0x14, + 0x0a, 0x7d, 0x7a, 0x17, 0x65, 0x67, 0xdf, 0x7d, 0xff, 0x53, 0x49, 0x9d, 0xfe, 0xd3, 0x85, 0x43, + 0x5a, 0x5a, 0x90, 0xe7, 0x60, 0x6d, 0xf8, 0xf2, 0x9d, 0x28, 0x58, 0x11, 0xc6, 0x22, 0x2f, 0x78, + 0xbc, 0xb1, 0xb5, 0x81, 0x3e, 0xac, 0xd3, 0x6e, 0x89, 0x07, 0x15, 0x4c, 0x9e, 0x41, 0x23, 0x2f, + 0xf8, 0xb5, 0xb0, 0xf5, 0x81, 0x3e, 0xec, 0x9c, 0x75, 0x46, 0xca, 0x63, 0xb4, 0x90, 0x28, 0x2d, + 0x49, 0xf2, 0x35, 0x74, 0x71, 0x81, 0x7e, 0x2c, 0x12, 0xeb, 0xc2, 0xae, 0x0d, 0xb4, 0x61, 0x8f, + 0x9a, 0x08, 0x4b, 0x3b, 0x4f, 0xac, 0x0b, 0xf2, 0x2d, 0x1c, 0x2e, 0xd3, 0x38, 0xe6, 0xc9, 0xca, + 0xae, 0xa3, 0x9f, 0x75, 0xeb, 0x37, 0x29, 0x71, 0x5a, 0x09, 0xc8, 0x37, 0xd0, 0x55, 0x4b, 0xb6, + 0x4c, 0xb7, 0x49, 0x21, 0x32, 0xbb, 0x31, 0xd0, 0x87, 0x26, 0xed, 0x28, 0x78, 0x52, 0xa2, 0xe4, + 0x05, 0xf4, 0x2a, 0xe1, 0xae, 0x9c, 0x03, 0x2c, 0xc7, 0x52, 0xc4, 0xae, 0x9e, 0xe7, 0x70, 0xf0, + 0x41, 0x44, 0x51, 0xfa, 0x87, 0x7d, 0x38, 0xd0, 0x87, 0xc6, 0x59, 0xef, 0x36, 0x81, 0x40, 0xf0, + 0x78, 0x96, 0xac, 0x53, 0xaa, 0x04, 0xe4, 0x2b, 0xa8, 0x5f, 0x45, 0x5b, 0x61, 0x37, 0xff, 0x4f, + 0x88, 0x34, 0xf9, 0x05, 0x8e, 0x56, 0x22, 0x0f, 0xaf, 0x13, 0x5e, 0x88, 0x15, 0xdb, 0xa4, 0x79, + 0x58, 0x84, 0x69, 0x62, 0xb7, 0x06, 0xda, 0xd0, 0xd8, 0xbb, 0xaf, 0x79, 0x1a, 0x26, 0x05, 0x25, + 0x3b, 0x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dd, 0xa3, 0x30, 0xae, 0x77, 0xfa, + 0xa7, 0x06, 0xbd, 0x07, 0xef, 0x2b, 0xf9, 0x1c, 0x8c, 0xf7, 0x3c, 0x0a, 0x57, 0x6c, 0x9b, 0x14, + 0x61, 0xa4, 0x7e, 0xf4, 0x80, 0xd0, 0x1b, 0x89, 0x48, 0x81, 0x7a, 0x82, 0x33, 0x16, 0xae, 0xf0, + 0x9b, 0x69, 0x51, 0xa8, 0xa0, 0xd9, 0x8a, 0x3c, 0xbf, 0xf3, 0x97, 0xa9, 0xe1, 0xff, 0x70, 0xff, + 0xfd, 0xdf, 0xfd, 0x60, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x8b, 0xd5, 0x4d, 0xab, 0x08, + 0x00, 0x00, +} From 5e6c61be830041bdd73302ec761d9ce4fbee90d5 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:06:07 +0530 Subject: [PATCH 17/18] Create netraw.cpp --- src/netraw.cpp | 204 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 src/netraw.cpp diff --git a/src/netraw.cpp b/src/netraw.cpp new file mode 100644 index 00000000..c1a7cd69 --- /dev/null +++ b/src/netraw.cpp @@ -0,0 +1,204 @@ +syntax = "proto2"; + +import "ssl_game_event.proto"; +import "ssl_game_event_2019.proto"; + +// Each UDP packet contains one of these messages. +message Referee { + // The UNIX timestamp when the packet was sent, in microseconds. + // Divide by 1,000,000 to get a time_t. + required uint64 packet_timestamp = 1; + + // These are the "coarse" stages of the game. + enum Stage { + // The first half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_FIRST_HALF_PRE = 0; + // The first half of the normal game, before half time. + NORMAL_FIRST_HALF = 1; + // Half time between first and second halves. + NORMAL_HALF_TIME = 2; + // The second half is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + NORMAL_SECOND_HALF_PRE = 3; + // The second half of the normal game, after half time. + NORMAL_SECOND_HALF = 4; + // The break before extra time. + EXTRA_TIME_BREAK = 5; + // The first half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_FIRST_HALF_PRE = 6; + // The first half of extra time. + EXTRA_FIRST_HALF = 7; + // Half time between first and second extra halves. + EXTRA_HALF_TIME = 8; + // The second half of extra time is about to start. + // A kickoff is called within this stage. + // This stage ends with the NORMAL_START. + EXTRA_SECOND_HALF_PRE = 9; + // The second half of extra time. + EXTRA_SECOND_HALF = 10; + // The break before penalty shootout. + PENALTY_SHOOTOUT_BREAK = 11; + // The penalty shootout. + PENALTY_SHOOTOUT = 12; + // The game is over. + POST_GAME = 13; + } + required Stage stage = 2; + + // The number of microseconds left in the stage. + // The following stages have this value; the rest do not: + // NORMAL_FIRST_HALF + // NORMAL_HALF_TIME + // NORMAL_SECOND_HALF + // EXTRA_TIME_BREAK + // EXTRA_FIRST_HALF + // EXTRA_HALF_TIME + // EXTRA_SECOND_HALF + // PENALTY_SHOOTOUT_BREAK + // + // If the stage runs over its specified time, this value + // becomes negative. + optional sint32 stage_time_left = 3; + + // These are the "fine" states of play on the field. + enum Command { + // All robots should completely stop moving. + HALT = 0; + // Robots must keep 50 cm from the ball. + STOP = 1; + // A prepared kickoff or penalty may now be taken. + NORMAL_START = 2; + // The ball is dropped and free for either team. + FORCE_START = 3; + // The yellow team may move into kickoff position. + PREPARE_KICKOFF_YELLOW = 4; + // The blue team may move into kickoff position. + PREPARE_KICKOFF_BLUE = 5; + // The yellow team may move into penalty position. + PREPARE_PENALTY_YELLOW = 6; + // The blue team may move into penalty position. + PREPARE_PENALTY_BLUE = 7; + // The yellow team may take a direct free kick. + DIRECT_FREE_YELLOW = 8; + // The blue team may take a direct free kick. + DIRECT_FREE_BLUE = 9; + // The yellow team may take an indirect free kick. + INDIRECT_FREE_YELLOW = 10; + // The blue team may take an indirect free kick. + INDIRECT_FREE_BLUE = 11; + // The yellow team is currently in a timeout. + TIMEOUT_YELLOW = 12; + // The blue team is currently in a timeout. + TIMEOUT_BLUE = 13; + // The yellow team just scored a goal. + // For information only. + // For rules compliance, teams must treat as STOP. + // Deprecated: Use the score field from the team infos instead. That way, you can also detect revoked goals. + GOAL_YELLOW = 14 [deprecated = true]; + // The blue team just scored a goal. See also GOAL_YELLOW. + GOAL_BLUE = 15 [deprecated = true]; + // Equivalent to STOP, but the yellow team must pick up the ball and + // drop it in the Designated Position. + BALL_PLACEMENT_YELLOW = 16; + // Equivalent to STOP, but the blue team must pick up the ball and drop + // it in the Designated Position. + BALL_PLACEMENT_BLUE = 17; + } + required Command command = 4; + + // The number of commands issued since startup (mod 2^32). + required uint32 command_counter = 5; + + // The UNIX timestamp when the command was issued, in microseconds. + // This value changes only when a new command is issued, not on each packet. + required uint64 command_timestamp = 6; + + // Information about a single team. + message TeamInfo { + // The team's name (empty string if operator has not typed anything). + required string name = 1; + // The number of goals scored by the team during normal play and overtime. + required uint32 score = 2; + // The number of red cards issued to the team since the beginning of the game. + required uint32 red_cards = 3; + // The amount of time (in microseconds) left on each yellow card issued to the team. + // If no yellow cards are issued, this array has no elements. + // Otherwise, times are ordered from smallest to largest. + repeated uint32 yellow_card_times = 4 [packed = true]; + // The total number of yellow cards ever issued to the team. + required uint32 yellow_cards = 5; + // The number of timeouts this team can still call. + // If in a timeout right now, that timeout is excluded. + required uint32 timeouts = 6; + // The number of microseconds of timeout this team can use. + required uint32 timeout_time = 7; + // The pattern number of this team's goalkeeper. + required uint32 goalkeeper = 8; + // The total number of countable fouls that act towards yellow cards + optional uint32 foul_counter = 9; + // The number of consecutive ball placement failures of this team + optional uint32 ball_placement_failures = 10; + // Indicate if the team is able and allowed to place the ball + optional bool can_place_ball = 12; + // The maximum number of bots allowed on the field based on division and cards + optional uint32 max_allowed_bots = 13; + // The team has submitted an intent to substitute one or more robots at the next chance + optional bool bot_substitution_intent = 14; + } + + // Information about the two teams. + required TeamInfo yellow = 7; + required TeamInfo blue = 8; + + // The coordinates of the Designated Position. These are measured in + // millimetres and correspond to SSL-Vision coordinates. These fields are + // always either both present (in the case of a ball placement command) or + // both absent (in the case of any other command). + message Point { + required float x = 1; + required float y = 2; + } + optional Point designated_position = 9; + + // Information about the direction of play. + // True, if the blue team will have it's goal on the positive x-axis of the ssl-vision coordinate system. + // Obviously, the yellow team will play on the opposite half. + optional bool blue_team_on_positive_half = 10; + + // The game event that caused the referee command. + // deprecated in favor of game_events. + optional Game_Event game_event = 11 [deprecated = true]; + + // The command that will be issued after the current stoppage and ball placement to continue the game. + optional Command next_command = 12; + + // All game events that were detected since the last RUNNING state. + // Will be cleared as soon as the game is continued. + repeated GameEvent game_events = 13; + + // All non-finished proposed game events that may be processed next. + repeated ProposedGameEvent proposed_game_events = 14; + + // The time in microseconds that is remaining until the current action times out + // The time will not be reset. It can get negative. + // An autoRef would raise an appropriate event, if the time gets negative. + // Possible actions where this time is relevant: + // * free kicks + // * kickoff, penalty kick, force start + // * ball placement + optional int32 current_action_time_remaining = 15; +} + +message ProposedGameEvent { + // The UNIX timestamp when the game event proposal will time out, in microseconds. + required uint64 valid_until = 1; + // The identifier of the proposer. + required string proposer_id = 2; + // The proposed game event. + required GameEvent game_event = 3; +} From e2cd1e0d4d6c6bd86bb2af73378fb1ba76756fb5 Mon Sep 17 00:00:00 2001 From: sahil132jindal <43885654+sahil132jindal@users.noreply.github.com> Date: Sat, 29 Feb 2020 21:06:30 +0530 Subject: [PATCH 18/18] Add files via upload --- src/referee_node.cpp | 121 +++++++++++++++++++++++++++++++++++++ src/robocup_ssl_client.cpp | 79 ++++++++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 src/referee_node.cpp create mode 100644 src/robocup_ssl_client.cpp diff --git a/src/referee_node.cpp b/src/referee_node.cpp new file mode 100644 index 00000000..1f4edfbe --- /dev/null +++ b/src/referee_node.cpp @@ -0,0 +1,121 @@ +#include "ros/ros.h" +#include "std_msgs/String.h" + +#include "robocup_ssl_client.h" +#include +#include +#include +#include + +#include "ssl_referee.pb.h" +#include +#include "timer.h" + + +using namespace std; + + +int main(int argc, char **argv) +{ + + cout<<"Intialised Node\n"; + ros::init(argc, argv, "ref_data"); + ros::NodeHandle n; + ros::Publisher chatter_pub = n.advertise("/ref_data", 10000); + // ros::Rate loop_rate(10); + + GOOGLE_PROTOBUF_VERIFY_VERSION; + int port = 10003; + RoboCupSSLClient client(port); + client.open(true); + printf("Connected to referee-box.\n"); + + Referee packet; + while(ros::ok()) { + if (client.receive(packet)) { + + krssg_ssl_msgs::Ref msg; + krssg_ssl_msgs::team_info yellow, blue; + krssg_ssl_msgs::point_2d designated_position; + krssg_ssl_msgs::game_event gameEvent; + + msg.packet_timestamp = packet.packet_timestamp(); + msg.stage = packet.stage(); + msg.stage_time_left = packet.stage_time_left(); + msg.command = packet.command(); + msg.command_counter = packet.command_counter(); + msg.command_timestamp= packet.stage(); + + yellow.name = packet.yellow().name(); + yellow.score = packet.yellow().score(); + yellow.red_cards = packet.yellow().red_cards(); + + int yellow_card_times_size = packet.yellow().yellow_card_times_size(); + for (int i = 0; i < yellow_card_times_size; ++i) + { + yellow.yellow_card_times.push_back(packet.yellow().yellow_card_times(i)); + } + + yellow.yellow_cards = packet.yellow().yellow_cards(); + yellow.timeouts = packet.yellow().timeouts(); + yellow.timeout_time = packet.yellow().timeout_time(); + yellow.goalie = packet.yellow().goalkeeper(); + + blue.name = packet.blue().name(); + blue.score = packet.blue().score(); + blue.red_cards = packet.blue().red_cards(); + yellow_card_times_size= packet.blue().yellow_card_times_size(); + + for (int i = 0; i < yellow_card_times_size; ++i) + { + blue.yellow_card_times.push_back(packet.blue().yellow_card_times(i)); + } + + blue.yellow_cards= packet.blue().yellow_cards(); + blue.timeouts = packet.blue().timeouts(); + blue.timeout_time= packet.blue().timeout_time(); + blue.goalie = packet.blue().goalkeeper(); + + msg.yellow = yellow; + msg.blue = blue; + + // if (packet.has_designated_position()) + // { + // designated_position.x = packet.designated_position().x(); + // designated_position.y = packet.designated_position().y(); + // msg.designated_position= designated_position; + // } + + // msg.blueTeamOnPositiveHalf = packet.blueTeamOnPositiveHalf(); + // if (packet.has_blueTeamOnPositiveHalf()) + // { + // } + // if (packet.has_gameEvent()) + // { + // gameEvent.gameEventType = packet.gameEvent().gameEventType(); + // krssg_ssl_msgs::Originator originator; + // if (packet.gameEvent().has_originator()) + // { + // originator.team = packet.gameEvent().originator().team(); + // if (packet.gameEvent().originator().has_botId()) + // { + // originator.botId = packet.gameEvent().originator().botId(); + // } + // gameEvent.originator = originator; + // } + // if (packet.gameEvent().has_message()) + // { + // gameEvent.message = packet.gameEvent().message(); + // } + // msg.gameEvent = gameEvent; + // } + + printf("sending packet...\n"); + chatter_pub.publish(msg); + } + ros::spinOnce(); + // loop_rate.sleep(); + } + + return 0; +} diff --git a/src/robocup_ssl_client.cpp b/src/robocup_ssl_client.cpp new file mode 100644 index 00000000..a7c065fc --- /dev/null +++ b/src/robocup_ssl_client.cpp @@ -0,0 +1,79 @@ +//======================================================================== +// This software is free: you can redistribute it and/or modify +// it under the terms of the GNU General Public License Version 3, +// as published by the Free Software Foundation. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// Version 3 in the file COPYING that came with this distribution. +// If not, see . +//======================================================================== +/*! + \file robocup_ssl_client.cpp + \brief C++ Implementation: robocup_ssl_client + \author Stefan Zickler, 2009 +*/ +//======================================================================== +#include "robocup_ssl_client.h" + +RoboCupSSLClient::RoboCupSSLClient(int port, + string net_address, + string net_interface) +{ + _port=port; + _net_address=net_address; + _net_interface=net_interface; + in_buffer=new char[65536]; +} + + +RoboCupSSLClient::~RoboCupSSLClient() +{ + delete[] in_buffer; +} + +void RoboCupSSLClient::close() { + mc.close(); +} + +bool RoboCupSSLClient::open(bool blocking) { + close(); + if(!mc.open(_port,true,true,blocking)) { + fprintf(stderr,"Unable to open UDP network port: %d\n",_port); + fflush(stderr); + return(false); + } + + Net::Address multiaddr,interface; + multiaddr.setHost(_net_address.c_str(),_port); + if(_net_interface.length() > 0){ + interface.setHost(_net_interface.c_str(),_port); + }else{ + interface.setAny(); + } + + if(!mc.addMulticast(multiaddr,interface)) { + fprintf(stderr,"Unable to setup UDP multicast\n"); + fflush(stderr); + return(false); + } + + return(true); +} + +bool RoboCupSSLClient::receive(Referee & packet) { + Net::Address src; + int r=0; + r = mc.recv(in_buffer,MaxDataGramSize,src); + if (r>0) { + fflush(stdout); + //decode packet: + return packet.ParseFromArray(in_buffer,r); + } + return false; +} +