Microsoft Word - brain_1_3.doc 57 Design and Implementation of an Autonomous Humanoid Robot Based on Fuzzy Rule-Based Motion Controller S. Hamidreza Mohades Kasaei Islamic Azad University – Khorasgan Branch, Young Researchers Club, Isfahan, Iran H.Kasaee@Khuisf.ac.ir S. Mohammadreza Mohades Kasaei Islamic Azad University – Khorasgan Branch, Young Researchers Club, Isfahan, Iran M.Kasaee@Khuisf.ac.ir S. Alireza Mohades Kasaei Islamic Azad University – Khorasgan Branch, Young Researchers Club, Isfahan, Iran Alireza.Kasaee@Gamil.com S. A. Monadjemi Islamic Azad University – Khorasgan Branch, Young Researchers Club, Isfahan, Iran monadjemi@eng.ui.ac.ir Mohsen Taheri Islamic Azad University – Khorasgan Branch, Young Researchers Club, Isfahan, Iran Css_Mt@Yahoo.com Abstract Research on humanoid robotics in Mechatronics and Automation Laboratory, Electrical and Computer Engineering, Islamic Azad University Khorasgan branch (Isfahan) of Iran was started at the beginning of this decade. Various research prototypes for humanoid robots have been designed and are going through evolution over these years. This paper describes the hardware and software design of the kid size humanoid robot systems of the PERSIA Team in 2009. The robot has 20 actuated degrees of freedom based on Hitec HSR898. In this paper we have tried to focus on areas such as mechanical structure, Image processing unit, robot controller, Robot AI and behavior learning. In 2009, our developments for the Kid size humanoid robot include: (1) the design and construction of our new humanoid robots (2) the design and construction of a new hardware and software controller to be used in our robots. The project is described in two main parts: Hardware and Software. The software is developed a robot application which consists walking controller, autonomous motion robot, self localization base on vision and Particle Filter, local AI, Trajectory Planning, Motion Controller and Network. The hardware consists of the mechanical structure and the driver circuit board. Each robot is able to walk, fast walk, pass, kick and dribble when it catches the ball. These humanoids have been successfully participating in various robotic soccer competitions. This project is still in progress and some new interesting methods are described in the current report. Keywords: Humanoid Robot, Image processing, Control systems, Machine vision. 1. Introduction The RoboCup scenario of soccer playing legged robots represents an extraordinary challenge for the design, control and stability of autonomous bipedal and quadrupedal robots. In a game, fast, goal oriented motions must be planned autonomously and implemented online while preserving the robot’s postural stability and adapting them in real-time to the quickly changing environment. In the humanoid league, many technology issues and scientific areas must be integrated to implement the humanoid robot, such as mechanics, electronics, control, computer science, and BRAIN. Broad Research in Artificial Intelligence and Neuroscience Volume 1, Issue 3, July 2010, ”Happy Summer 2010!”, ISSN 2067-3957 58 semiconductor. Besides, the research technologies of humanoid walking control, autonomous motion, vision and AI system, kicking and shooting ball will be applied [1-10]. The Humanoid League team of the PERSIA was founded in 2008. In 2008 we ranked 1st place Humanoid Kid Size Soccer Robot League in 1st national Khwarizmi Robotic Competitions the Khwarizmi Robotic is one of the, Iranian major Robotic event. In 2009 we achieved the 5th in the 3rd International Iran-Open Competitions in the 3-3 games out of 15 teams. The basis for our success was the robust and reliable hardware design, well-structured software architecture and efficient algorithms for sensor fusion and behavior generation. Our main research interest is both, the development of learning robots and the development of improved sensor fusion and sensor integration techniques. In order to let the robot can autonomous play a soccer game, three basic skills are designed and implemented on it: image understanding for environment perception, move ability, and artificial intelligence. In order to let the robot have a high ability of environmental detection, a camera and array of sensor are equipped on the body of the implemented robot to obtain the information of the environment to decide an appropriate action. We used available personal digital assistant (PDA) for processing vision and higher level reasoning and brain of our robot. A control board with an ATMEGA128 microcontroller is mainly utilized to control the robot. Many functions are implemented on this system so that it can receive the vision signal obtained by the camera via a CF port and process the data obtained by gyroscopes and the digital compass. It also can process the high level artificial intelligence, such as the navigation. The humanoid robot is designed as a soccer player so that the implemented robot can walk, turn, and shoot the ball. In this paper, we will at first describe the general hardware design of the PERSIA Humanoid Robocup Team, (section 2) and after that focus on our scientific approaches in sensor fusion and learning (section 3). Finally, section 4 concludes this paper. This document describes the current state of the project as well as the intended development for the RoboCup 2010 competition. Figure 1. PERSIA Humanoid Robot in Robocup IranOpen2010 Competition 2. Mechanical Design Figure2 shows our humanoid soccer robot, Persia robot includes motion mechanism, Shooting and dribbling mechanism. PERSIA kid-size humanoids are built with aluminum brackets. The kinematics chains are powered by high-torque servomotors. The actuators used in the PERSIA robots are the Hitec servo motor. The motion mechanism consists of 18 degrees of freedom G. Blioju - EKG Through Sound-Card 59 distributed in 5 per leg, 3 per arm and other two degrees of freedom as a pan-tilt system holding the head, we use an aluminum mechanism powered by two micro servomotors directly controlled by the camera, providing object tracking independently from leg or arm motions. Figure 2 shows one of the constructions used for our robots. Knee joints are considered to bend in both directions which help faster response of the robot in backward walking. Efforts have been made to hold the proportions as much as possible human like. The PERSIA robot is 38cm tall and weighs about 1.6 kg. It has 18 degrees of freedom: 5 in each leg, 3 in each hand and 2 in head. To facilitate exchange of the players, all robots use mechanically the same structure. Figure 2. Mechanical construction of the PERSIA humanoid robots The PERSIA Humanoid robot designed for has multipurpose capability. This robot equipped with main board for motion control, vision sensor, other balancing sensors, servo motors and etc. Figure 3 shows picture of the robot and overview of the Persia humanoid robot control system. Figure 3. (a) Our Humanoid soccer robot, (b) Overview of the Control System BRAIN. Broad Research in Artificial Intelligence and Neuroscience Volume 1, Issue 3, July 2010, ”Happy Summer 2010!”, ISSN 2067-3957 60 Our robots perform high mobility and stability. The maximum speed is approximately 0.25m/s. It can also walk to any direction and targeting smoothly. For stable walking, we use an acceleration and gyro sensors. The acceleration sensor is also used to detect falls. In our robots we use two processors; one is used for motion control and receives data from gyro and acceleration sensors via A/D converter, and another is used for image recognition, behavior determination and so on. 3. Robot Software In soccer game, for example, the robot searches a ball and two goals, and moves to its desired location with avoiding many obstacles, therefore we developed our humanoid robot software in Visual C++ and robot software is divided into four sections: vision, artificial intelligent, behavior engine, and motion control (actuation). Figure 4 shows the block diagram of the software which runs in the robot’s main processor. The program consists of 4 main blocks: • Hardware Interface: Contains all low level routines to access hardware of the robot including sensors and actuators. • Vision: Contains image processing algorithms such as recognition of landmarks and other object. Self localization is done using particle filtering. Particles are scored by comparing a simulated image from each particle with the current frame captured by camera. Using “Sampling-Importance Resampling” method, a new distribution of the particles is created after each step. Particles are also updated using a motion model. Final distribution of the particles converges to the real pose of the robot. • Planning: Planning system of the robot is based on a multi layer, and multi thread structure. The layers are named Strategy, Role, Behavior and Motion. Each layer contains a Scenario which runs in parallel with the scenarios in the other layers. A scenario in a higher level can terminate and change the scenario running in the lower level; however it is usually done in synchronization with the lower level scenario to avoid conflicts and instabilities. (Such as stopping the walking motion while one of the feet is still in the air). • Network: Mainly responsible for the wireless communication of the robot with the other robots or the referee box. This is done via WLAN. • Motion Control: manages all the actuators of the robot, and controls locomotion or any other action of the robot according to the requests from Cognition. • Sensor Control: manages other sensors, and interacts with the Sub-Controller. A. Motion Control PERSIA Humanoid Robot has two kinds of locomotion pattern: omni directional walking and special actions such as kicking and getup. Special actions are described using key frames, which can be edited very fast by our software tool HumanoidRobotControl. Omni directional walking means the robot can walk in every direction with variable step length. The behavior module determines the target position and orientation according to the results of localization and the sensor measurements, and then constructs an action series which consists of the elementary gaits to realize omni directional walking. The implementation of forward walking is applying Virtual Slope Walking in the sagittal plane with the Lateral Swing Movement for lateral stability. The sideward walking and turning is realized by carefully designing the key frames. All of above gait is generated by connecting the key frames with smooth sinusoids. The forward walking speed of PERSIA Humanoid Robot is 25cm/s. The image sequences of forward walking are shown in Figure 5. G. Blioju - EKG Through Sound-Card 61 Figure 4. (a)Our Humanoid soccer robot, (b) Overview of the Control System Figure 5. Forward walking image sequence The image sequences of sideward walking and turning are shown in Figure 6 respectively. Figure 6. Forward walking image sequence B. Image Processing One of the primary tasks for the vision system is to locate a particular goal and calculate the robot’s position in relation to it. Utilizing a camera, each time the personal digital assistant (PDA) on each robot performs the processing of the current frame and calculates the position and direction of the robot. It also determines the position and position of the opponent robots as well as the position and velocity of the ball. The image-processing algorithm first filters the image by using a table for labeling the colors (Color Adjustment) then recognizes the contiguous regions through either a BFS or a DFS search algorithm and finally extracts the necessary information like: self- localization, ball, and goal and opponent robot position by looking in the Image. Sometimes for better image processing the RGB color space is converted to HSL (Hue, Saturation and Luminance). To recognize a certain color, a combination of conditions on Hue, Saturation and RGB BRAIN. Broad Research in Artificial Intelligence and Neuroscience Volume 1, Issue 3, July 2010, ”Happy Summer 2010!”, ISSN 2067-3957 62 is used. This procedure makes the color recognition independent from the change of brightness and other unpredicted conditions. We are trying to evaluate new methods to find some kinds of objects based on pattern recognition to reduce the effect of changing the colors on algorithm. The image processor receives its data through SD port connected to a camera with the speed of 7 frames per second. C. Artificial Intelligent In this section the AI part of the software is briefly introduced. There are three distinct layers: AI Core, Role Engine and Behavior Engine. AI Core receives the computed field data from World Map Modeling unit and determines the play state according to the ball, opponents and our robots positions. Considering the current game strategy, determination of the play state is done by fuzzy decision-making to avoid undesirable and sudden changes of roles or behaviors.[3-4] Figure 7. World model construction and artificial intelligent structure running on the PDA D. Role Engine Role engine module receives information from AI core; process them, and then selected a role. This module is the main section of robot software. The proposed rules for role engine have been turned by various experiences and they are independent of game field conditions. The output of this module is a set of high level commands that send to Behavior engine. Some of high level commands which are produced by role engine module are: • Go to position • Go to ball • Targeting • Shooting ball • … G. Blioju - EKG Through Sound-Card 63 E. Behaviors Engine This module receives information from Artificial Intelligent unit. Total functions about Robot Behavior such as stability motors actions, robot path planning, turn camera, walking, shooting, dribbling; motion and etc are controlled in this section. Figure 8. Artificial Intelligence Algorithm F. Trajectory Since the motion trajectory of each robot is divided into several median points that the robot should reach them one by one in a sequence the output obtained after the execution of AI will be a set of position and velocity vectors. So the task of the trajectory will be to guide the robots through the opponents to reach the destination. The routine used for this purpose is the potential field method (also an alternative new method is in progress which models the robot motion through opponents same as the flowing of a bulk of water through obstacles). In this method different electrical charges are assigned to our robots, opponents and the ball. Then by calculating the potential field of this system of charges a path will be suggested for the robot. At a higher level, predictions can be used to anticipate the position of the opponents and make better decisions in order to reach the desired vector. Figure 9. Path planning with algorithm of potential fields BRAIN. Broad Research in Artificial Intelligence and Neuroscience Volume 1, Issue 3, July 2010, ”Happy Summer 2010!”, ISSN 2067-3957 64 4. Conclusion and Future Work In this paper, we present the details of design and implemented method of our humanoid soccer robot. The performance of our robot team in Iran-Open Robocup competitions 2010 (3st place) and 1st national Khwarizmi Robotic Competitions in 2009 showed that the combination of methods and techniques that described in this paper are led to a successful Humanoid Robot. In our robot, Omni directional walking, vision system and a novel motion controller based on artificial neural network and PD controller have been combined to create a comprehensive Humanoid robot. Our robots can get up from a fall, walk forward and backward, turn right and left, and kick the ball. A camera, two IR sensors and a digital compass are integrated so that the robot can obtain the environmental information to decide the action behavior. We try to making the robot more stable and reliable as the result of our researches. Future plans are to develop and implement autonomous team actions towards participation in the three-by-three games similar to other leagues in RoboCup. Further information’s and video about our works are presented on our website http://www.IranAdro.com/HumanoidIndex.htm 5. References [1] Wong, C.C., Cheng, C.T., Wang, H.Y., Li, S.A., Huang, K.H., Wan, S.C., Yang, Y.T., Hsu, C.L., Wang, Y.T., Jhou, S.D., Chan, H.M., Huang, J.C., Hu, Y.Y.: Description of TKUPaPaGo Team for Humanoid League of RoboCup 2005. RoboCup InternationalSymposium 2005 (2005). [2] Zhou, C., Jagannathan, K.: Adaptive Network Based Fuzzy of a Dynamic Biped Walking Control Robot. IEEE Int. Conf. on Robotics and Automation. 4 (2000) 3829-3834. [3] Pauk, J. H., Chung, H.: ZMP Compensation by On-Line Trajectory Generation for Biped Robots. IEEE International Conference on Systems, Man, and Cybernetics. 4 (1999) 960-965. [4] Huang, Q., Li, K., Nakamura, Y.: Humanoid Walk Control with Feedforward Dynamic Pattern and Feedback Sensory Reflection. IEEE International Symposium on Computational intelligence in Robotics and Automation. (2001) 29-34. [5] Sugihara, T., Nakamura, Y., Inoue, H.: Real time Humanoid Motion Generation through ZMP Manipulation based on Inverted Pendulum Control. IEEE International Conference on Robotics and Automation. 2 (2002) 1404-1409. [6] Furuta, T.: Design and Construction of a Series of Compact Humanoid Robots and Development of Biped Walk Control Strategies. IEEE International Conference on Robotics and Autonomous Systems. (2001) 65-88. [7] Vukobratovic, M., Frank, A. A., Juricic, D.: On the Stability of Biped Locomotion. IEEE Trans. Bio-Med. Eng. 17 (1970) 25-36. [8] Golliday, C. L., Jr., Hemami, H.: An Approach Analyzing Biped Locomotion Dynamics and Designing Robot Locomotion Control. IEEE Trans. Aut. Contr. (1977) 963-972. [9]Miyazaki, F., Arimoto, S: A Control Theoretic Study on Dynamical Biped Locomotion.ASME J. Dyna., Syst., Meas., Contr. 102 (1980) 233-239. [10] Furusho, J., Masubuchi, M.: A Theoretically Motivated Reduced Order Model for the Control of Dynamic Biped Locomotion. ASME J. Dyna., Syst., Meas., Contr. 109 (1987) 155-163.D. Equations