def goal_angle_and_type(): #Goal types #0 unknown post #1 left post #2 right post #3 whole goal last_goal = vision.get_goal() goal = vision.Goal(last_goal.x,last_goal.y,last_goal.z,last_goal.t,robotid.get_team_number(),last_goal.goal_type) angles=goal.get_angle()[0] return angles,last_goal.goal_type
def __init__(self): #Initiates the constant variables self.wanted_head_position=[0,0] self.team_id=robotid.get_team_number()
def goal_angle(): last_goal = vision.get_goal() goal = vision.Goal(last_goal.x,last_goal.y,last_goal.z,last_goal.t,robotid.get_team_number(),last_goal.goal_type) angles=goal.get_angle() return angles
def entry(self): print ("checking which goal") self.wanted_head_position=[0,0] set_head_position(self.wanted_head_position) self.team_id=robotid.get_team_number() self.first_turn=True