Petri Net based Role Arrangement Mechanism for the Soccer Robot System Ming-Yuan Shieh*, Ching-Chih Wen, Chung-Chieh Lien Department of Electrical Engineering Southern Taiwan University Tainan, Taiwan E-mail: myshieh@mail.stut.edu.tw Abstract: This paper proposes a Petri net based role arrangement mechanism for the soccer robot system. Soccer robot games consist of the challenges of path planning, obstacle avoidance, image processing, real-time control and decisionmaking strategy. As well known, effective strategies dominate a successful soccer game, moreover, the key point is based on real-time role and task arrangements. Since the Petri net algorithms benefit the real-time role switching and formation controls for facing dynamic and uncertain situations. In this paper, the Petri net based control scheme is designed to arrange robotic roles and to perform respective obstacle avoidance decision for real-time optimal controls. In which, the role arrangement supervisor is designed by Petri net and then it is used to modeling what a robot should do in an assigned role of attacking, defending and goalkeeping. Besides, the optimal path of robotic movements could be determined and modified by A* algorithm. The simulation and experimental results show that the proposed system has obtained satisfactory role arrangement efficiency. Keywords-role arrangement mechanism; robot soccer system; AndroSot; Petri net. I. INTRODUCTION Following rapid advances in human life, to develop suitable robots and related products becomes more essential and emerging. Generally speaking, humanoid/android robots are the most conspicuous of autonomous robots. Since android robots have similar features as human, they can be regarded as the most suitable to live with people in the human living environment. During these years, although there were many real android robots developed but most of them didn’t satisfy human’s expectations. For example, the robot “Asimo”[1], which is called as the most advanced humanoid robot nowadays, only can perform several simple preset operations, such as communication with humans by limited conversation and stiff emotional expression. Such robots, which always are designed in automatic for movements and semi-automatic for human-robot interaction, have their cute appearance, can follow, guide, perceive, recognize, avoid obstacles, and interact with people or environment. From many approaches [2-3], one can see to develop an appropriate humanoid robot system is really difficult. It is still as an open question based on the developed techniques for humanoid robot soccer games. Hence, in order to simplify the problems existed in a humanoid robot soccer game, the FIRA (Federation of International Robot-soccer Association) [4] promote the AndroSot game focusing on visual servo control strategies instead of all in one design for an android robot since 2007. The AndroSot game aims to let the contestants design their humanoid soccer robot system based on a global visual system, a decision-making PC, strategy programs, wireless communication system, and autonomous humanoid robots. These android robots execute the strategic commands received from the PC in which all strategies are concluded based on visual processing by using the real-time field sequence images captured by a global camera hanged on the top of the game field. In the AndroSot game, the images consisted of the ball, the robots and the field can be obtained from the top-view camera. By analyzing these images, the control system can identify the locations of robots and the ball, and the relative velocities of robots and ball. As well known, effective strategies dominate a successful soccer game, in which, the key point is the real-time role and task arrangements. Petri nets were invented in August 1939 by Carl Adam Petri for the purpose of describing chemical processes. It is a graphical tool for the description and analysis of concurrent processes which arise in systems with many distributed components. Since the Petri net algorithms benefit the realtime role switching and formation controls for facing dynamic and uncertain situations[5-7]. In this paper, the Petri net based control scheme is designed to arrange robotic roles and to perform respective obstacle avoidance decision for real-time optimal controls. Besides, how to determine the optimal path of robotic movements is also an important problem in robot soccer games. A* algorithm is a searching algorithm that is widely used in pathfinding because it’s fairly flexible and can be used in a wide range of contexts. It is an extension of Edsger Dijkstra's algorithm[8]. A* algorithm achieves better performance than Dijkstra's algorithm with respect to time by using heuristic estimation [9-10]. It’s like Greedy BestFirst-Search in that it can use a heuristic to guide itself. In common cases, it is as fast as Best-First-Search. For FIRA AndroSot game, since all computational and decision-making data in an computation system based on the image data captured from the camera hanged upper on the game field. It reveals good procedures of image processing will provide not only real-time but also accurate performance to the decision system of optimal motion controls for a real robot soccer game. In this paper, a real system implemented for 3-on-3 robot soccer games is proposed to verify its feasibility. responding to appropriate game actions such as tracking ball, kicking ball, moving for defense or attack. However, before the hold of a competition, the field image should be calibrated for exact controls. As shown in Fig. 3(a), there are a few black points spaced in equidistance as the datum points. To determine the interval between every two of these points on image plane, one can transfer it by a fixed formula to get a proper correction. Besides, since the illumination in the whole field is always not uniform (as shown in Fig. 3(b)), it will cause that a color has two distinct RGB values just because of different locations. As the situation is worse, the accuracy of image discrimination will be all gone. Immediate color discrimination is proposed by using a wider range of RGB definition of a color. It will reduce the errors on image processing. Figure. 1 The system configuration of an Andro-Sot game II. THE SYSTEM CONFIGURATION The Andro-Sot game in the FIRA RoboCup can be illustrated simply from Fig. 1. In such competition, each team could mount their camera on the top of the field; the image sequences will be sent to the host computer through transfer lines, then the PC will determine the control commands for android robot soccer players through careful strategies. These commands sent to the android robots in wireless communication results in a real-time android robotsoccer game. Thus, one can divide the Andro-Sot system by three parts at least such as the visual subsystem, the strategy making subsystem, and the motion control subsystem. The proposed data flowchart as shown in Fig. 2 can illustrate the signal processing existed in an android robot soccer game. While the game starts, the top view image sequences of the field captured by the global CCD camera firstly, then the objective features of the robots, the ball and the environmental objects such as the door will be determined after digital image processing procedures. These objective features will offer the strategy making subsystem decision making data for path planning, game strategy decision and movement control command determination. The android robots follow the commands received from Zigbee modules then execute determined movements for III. PETRI NET BASED ROBOT ROLE ARRANGEMENT MECHANISM The strategy of 3-on-3 robot soccer competition in this study was divided as two parts: the principal strategy and the immediate strategy. When the competition is taking place, the control system firstly concludes the principal strategy of every robot in accordance with what region the ball stays. Then, the immediate strategy based on Petri net provides the integrated control to every robot. Take consideration of robotic mobility, the role of each robot depends on the relationship between the ball, the robots and their locations in the field. The Petri net mechanism performs robotic roles arrangement to make the robots move in order and obey a clear but harmonious strategy. The supervisor presented in Fig. 2 receives the information of robots and ball after image analyses in PC, and decides the role for each robot. In other words, the supervisor does not fix attacking and defending robots, but their roles are decided and allocated according to the situation. With the role of a robot fixed as goalkeeper, the supervisor, according to the game situation, assigns of attacking or defending to each of the other two robots. To read the game situation, the supervisor continually receives feedback infoemation on the robots postures and ball position. Figure. 2 The flowchart of the signal processing in an android robot soccer game T5 : Robot2 is presently defending, but in a good position to attack, and it takes the attacking role. T6 : Robot2 is presently attacking, but in a good position to defend, and it takes the defending role. (a) Calibration of field image (a) initial status (1) (b) Partition for immediate color discrimination Figure. 3 The calibration and partition of the image screen The following places and transitions are defined for modeling the supervisor in Petri net: Structure: CS= ( P, T , I , O,W ) Places: P P1 , P2 , P3 ,..., Pm ,m=8. Transitions: T T1 , T2 , T3 ,..., Tn , n=6. (b) Transition firing and redistributions (1) Input function: I(T1)={P1}, I(T2)={P2}, I(T3)={P3}, I(T4)={P3 , P5}, I(T5)={P7, P8}, I(T6)={P2 , P6}. Output function: O(T1)={P2}, O(T2)={P1}, O(T3)={P8}, O(T4)={P4 , P6}, O(T5)={P6}, O(T6)={P5 , P7}. Weightings: W=1. The following places are defined to model the supervisor: P1 : Robot1 defending, Robot2 attacking, P2 : Robot1 attacking, Robot2 defending, P3 : Robot1 attacking, P4 : Robot1 defending, P5 : both Robot1 and Robot2 defending, P6 : Robot2 attacking, P7 : Robot2 defending, P8 : both Robot1 and Robot2 attacking. The transitions are defined as: T1 : Robot1 is in a good position to attack. T2 : Robot2 is in a good position to attack. T3 : Robot1 is presently defending, but in a good position to attack, and it takes the attacking role. T4 : Robot1 is presently attacking, but in a good position to defend, and it takes the defending role. (c) initial status (2) (d) Transition firing and redistributions (2) Figure. 4 Petri net models for the supervisor Figure. 5 An obstacle case (the robot intends to be moved from the purple point to the green one.) Figure. 7 The simulation of path planning by A* algorithms (a) a real-time topview image of field (b)the interface screen Figure. 8 The interface in the proposed system Figure. 6 The optimal path of successful obstacle avoidance by A*. The models of the Petri net supervisor can be illustrated by the graphs in Fig. 4(a) to Fig. 4(d). As shown in Fig. 4(a), assume that there are three tokens in P2, P3 and P7, that is, the robot 1 is attacking and robot 2 is defending at start moment. In the following instant, if transition T2 is fired, token in P2 moves to P1 as shown in Fig. 4(b). It means that the robot 2 becomes the attacker and the robot 1 becomes as the defender after this transition. For the status shown in Fig. 4(c), the initial tokens are occurred in P1, P4 and P6. It reveals that the robot 1 is defending and robot 2 is attacking at this moment. In the following instant, if transition T1 is fired, token in P2 moves to P2; and then transition T6 is also fired, token in P2, P6 moves to P5, P7 as shown in Fig. 4(d). It results in the robot 2 becomes as another defender because the robot 1 is still as the defender after these transitions. (a) a sequence of frames IV. PATH PLANNING BY A* AND EXPERIMENTAL RESULTS During the strategy making procedures, the decision making scheme always calculates the direction of the way only but ignores to whether there are the obstacles on the way. In such common situation as shown in Fig. 5, there is an obstacle (the red object) existed on the way between the departure and the destination. Here, the authors intend to execute path planning by adopting A* algorithm which is used for optimal shortest problem. Fig. 6 show the results of path planning by A* algorithm. Form the simulation results as shown in Fig. 7, one can see that the path is really the collision-free and optimal shortest one. (b) the topview screen Figure. 9 The experimental results in a real competition For real-time observation, the proposed system consists of an interface which is capable to monitor the real-time images of the field (Fig. 8(a)) and to display the estimated results after strategy making procedures (Fig. 8(b).) Fig. 9(a) and Fig. 9(b) show a sequence of frames that illustrate the movements in a real competition by the proposed system. It reveals that the Petri net really makes an appropriate role arrangement because the robot 2 has became an attacker even though it is farther from the ball than the robot 1. The experimental result in such case indicates that the mechanism really can arrange the robots and successfully make them reach the correct destinations. V. CONCLUSION In this paper, a Petri net based role arrangement mechanism for android robot soccer system is designed and implemented in actual FIRA AndroSot game. In which, the role arrangement supervisor is designed by Petri net and then it is used to modeling what a robot should do in an assigned role of attacking, defending and goalkeeping. Besides, the optimal path of robotic movements are determined and modified by A* algorithm. The simulation and experimental results show that the proposed system has obtained satisfactory role arrangement efficiency. ACKNOWLEDGMENT This work was supported by the National Science Council, Taiwan, under grant number NSC99-2221-E-218021. REFERENCES [1] Y. Sakagami, R. Watanabe, C. Aoyama, S. Matsunaga, N. Higaki, K. Fujimura, “The intelligent ASIMO: system overview and integration,” Proc. IEEE/RSJ International Conf. Intelligent Robots and System, Vol. 3, Sept. 2002, pp. 2478-2483, doi: 10.1109/IRDS.2002.1041641. [2] K. Noritake, S. Kato, T. Yamakita, H. Itoh, “A motion generation system for humanoid robots - Tai Chi motion,” Proc. IEEE Symp. Micromechatronics and Human Science, Oct. 2003, pp.265-269, doi: 10.1109/MHS.2003.1249946. [3] M. Bowling, M. Veloso, “Motion control in dynamic multi-robot environments,” Proc. IEEE Symp. Robotics and Automation, Nov. 1999, pp.168-173, doi: 10.1109/CIRA.1999.810044. [4] FIRA, http://www.fira.net/ [5] J.-H. Kim, H.-S. Shim, H.-S. Kim, M.-J. Jung, 1.-H. Choi, J.-O. Kim, “A Cooperative Multi-Agent System and Its Real Time Application to Robot Soccer,” Proc. IEEE International Conf. Robotics and Automation, Apr. 1997, vol. 1, pp.638-643, doi: 10.1109/ROBOT.1997.620108. [6] E. W. Dijkstra,. “A note on two problems in connexion with graphs,” Numerische Mathematik, vol. 1, no. 1, 1959, pp. 269–271, doi: 10.1007/BF01386390. [7] T. Murata, “Petri nets: Properties, analysis and applications,” Proceedings of the IEEE, vol. 77, no. 4, Apr. 1998, pp.541-580, doi: 10.1109/5.24143. [8] M.C. Zhou and D. T. Wang, “Design of Petri net objects and their application in command and control systems,” Proc. IEEE Int. Conf. System Man Cybern., vol. 4, Oct. 1995, pp. 3463-3468, doi: 10.1109/ICSMC.1995.538322. [9] I. Chabini and S. Lan, “Adaptations of the A* algorithm for the computation of fastest paths in deterministic discrete-time dynamic networks,” IEEE Trans. Intelligent Transportation Systems, vol. 3, no. 1, Mar. 2002, pp. 60-74, doi: 10.1109/6979.994796. [10] M. Fu and B. Xue, “A path planning algorithm based on dynamic networks and restricted searching area,” Proc. IEEE Int. Conf. on Automation and Logistics, Aug. 2007, pp. 1193-1198, doi: 10.1109/ICAL.2007.4338750.