【正文】
。envhome[1], , env)。 case PENALTY_KICK: break。5. 讓小車以最快的速度到達指定的點 switch (envgameState) { case 0: Position(amp。envhome[2], 60, env)。//讓小車1以最快的速度移動125為左右輪最大速度Velocity(amp。 case PLACE_KICK: break。 }} 簡單策略開發(fā)程序主要是在接口Strategy中按照當前的狀態(tài)處理比賽時的信息,通過分支選擇結(jié)構(gòu)來分別處理各種不同的狀況。 MoonFollowOpponent ( amp。envhome [3], amp。 //守門員守門 Goalie1 ( amp。envhome [1], amp。envopponent [3] )。 // 搶球 MoonAttack ( amp。 break。 case PENALTY_KICK: //發(fā)生罰球時的策略 switch (envwhosBall) { case ANYONES_BALL: MoonAttack ( amp。envhome [4], env )。 break。 break。 }} 各種定位球 各種定位球坐標確定方法載入兩個空策略,點擊Open Viewer菜單,打開RSViwer,選擇Ball,將球移動到待測試點后點擊Start進入比賽狀態(tài),點擊RSViwer中的Display可以看到球的坐標自由球 自由球球與機器人擺放原則1. 將場地分成四個區(qū)域,每個區(qū)域都有一個自由球罰球點,在哪個區(qū)域犯規(guī),就在那個區(qū)域罰自由球自由球的判斷(相距25厘米左右)結(jié)合以上三個條件起來就可以判斷是否在罰自由球。 Law 1 : The Field and the Ball (a) Playground dimensions A black (nonreflective) wooden rectangular playground 220cm X 180cm in size with 5cm high and thick white sidewalls will be used. The topsides of the sidewalls shall be black in color with the walls painted in white (side view). Solid 7cm X 7cm isosceles triangles shall be fixed at the four corners of the playground to avoid the ball getting cornered. The surface texture of the board will be that of a ping pong table. (b) Markings on the playground (Appendix 1) The field of play shall be marked as shown in Appendix 1. The center circle will have a radius of 25cm. The arc, which is part of the penalty area, will be 25cm along the goal line and 5cm perpendicular to it. The major lines/arcs (centerline, goal area borderlines and the center circle) will be white in color and 3mm in thick. The free ball (Law 13) robot positions (circles) shall be marked in gray color. (c) The goal The goal shall be 40cm wide. Posts and nets shall not be provided at the goal. (d) The goal line and goal area The goal line is the line just in front of the goal, which is 40cm long. The goal areas (The region A of Appendix 1) shall prise of the area contained by the rectangle (sized 50cm X 15cm in front of the goal). (e) The penalty area The penalty areas (The region B of Appendix 1) shall prise of areas contained by the rectangle (sized 80cm X 35cm in front of the goal) and the attached arc (25cm in parallel to the goal line and 5cm perpendicular to it). (f) The ball An orange golf ball shall be used as the ball, with diameter and 46g weight. (g) The filed location The field shall be indoors. (h) The lighting condition The lighting condition in the petition site shall be fixed around 1,000 Lux. Law 2 : The Players (a) The overall system A match shall be played by two teams, each consisting of five robots. One of the robots can be the goalkeeper (Law 2.(b).2). Three human team members, a manager, a coach and a trainer shall only be allowed on stage. (b) The robots 1. The topside of a robot must not be colored in orange. A color patch either blue or yellow, as assigned by the organizers, will identify the robots in a team. All the robots must have (at least) a X solid region of their team color patch, blue or yellow, visible on their top. A team39。 To enable infrared sensing a robot39。 The robots are allowed to equip with arms, legs, etc., but they must ply with the size restrictions (Law 2.(b).1) even after the appendages fully expanded. None of the robots, except the single designated goalkeeper, shall be allowed to catch or hold the ball such that more than 30% of the ball is out of view either from the top or from the sides (Appendix 2). 5.timeout39。 5 have been omitted due to their covering of the puter system information that can control the physical robots and the vision system that is used for the physical robots. Law 5 : Game Duration 1.s identification color (blue/yellow) or the ball. The team who receives the ball shall be allowed to opt for their carrier frequency band as well. 2. After the half time, the teams have to change their sides. Law 7 : Method of Scoring (a) The winner A goal shall be scored when the whole of the ball passes over the goal line. The winner of a game shall be decided on the basis of the number of goals scored. (b) The tiebreaker In the event of a tie after the second half, the winner will be decided by the sudden death scheme. The game will be continued after a 5 minutes break, for a maximum period of three minutes. The team managing to score the first goal will be declared as the winner. If the tie persists even after the extra 3 minutes game, the winner shall be decided through penaltykicks. Each team shall take three penaltykicks, which differs from Law 11 as only a kicker and a goalkeeper shall be allowed on the playground. The goalkeeper should be kept within its goal area and the positions of the kicker and of the ball shall be the same as per the Law 11. The goalkeeper catches the ball with its appendages (if any) in the goal area. 2. Colliding with a robot of the opposite team, either intentionally or otherwise: the referee will call such fouls that directly affect the play of the game or that appear to have potential to harm the opponent robot. When a defender robot intentionally pushes an opponent robot, a free kick will be given to the opposite team. It is permitted to push the ball and an opponent player backwards provided the pushing player is always in contact with the ball. 2. It is referred to as handling, as judged by the referee, when a robot other than the goalkeeper catches the ball. It is also considered as handling, if a robot firmly attaches itself to the ball such a way that no other robot is allowed to manipulate the ball. 6.s permission. 9. A goal is scored or a foul occurs. 4. Failure on the part of a goalkeeper to kick out the ball from its goal area within 10 seconds (Law .). 3.16