1 Introduction

Team Baset, consisting of four team members working on different aspects of the humanoid robots, has started its researches since 2014 at Baset Pazhuh TehranFootnote 1 company. This team participated in the RoboCup competitions and ranked 1st in Teen-Size and 3rd in Kid-Size leagues, and introduced the first Teen-Kid humanoid robot platform in RoboCup 2014. Following that year, team Baset ranked 2nd in soccer competitions and 1st in the technical challenges in RoboCup 2015 adult-size league. After one year of experience in the adult-size league, team Baset participated in the RoboCup 2016 adult-size humanoid league and ranked 1st in both the soccer competitions and the technical challenges and consequently has been awarded the Louis Vuitton cup as the best humanoid robot of that year. The results of team Baset in RoboCup 2016 competitions are presented in Table 1, comparing them to the teams that ranked second.

Table 1. Results of team Baset in RoboCup 2016 competitions compared to others (https://www.robocuphumanoid.org/hl-2016/results/#adult)

The high weight and size of adult-size humanoid robots limit their speed, agility, and their ability to play soccer for long periods. The rules of RoboCup 2016 limits the time during which the robots can score a goal as a penalty kick with two randomly placed obstacles on the field. Thus, the robots have to act fast to score a goal. An adult-size robot should be able to handle the ball fast, avoid obstacles, and shoot toward the opponent’s goal. To achieve that, it needs to localize itself on the field, generate a quick and confident trajectory toward the ball and find exact position of the obstacles on the field. In this paper, we describe our approach to address these constraints and overcome the slowness attribute of adult-size robots. In Sect. 2, the hardware and electronics of Baset robot, and hardware related methods used to increase robot’s stability is described. In Sect. 3.1, the methods to achieve a smooth, stable, and fast walk engine, and also the jump motion, is explained. In Sects. 3.2 and 3.3, respectively, the methods to perceive the standard soccer ball and the localization is described. Finally, in Sect. 3.4 the new behavior system used during RoboCup 2016 competitions is explained.

By the methods described in this document, Baset robot could follow the rules and despite the mentioned limitations, could act with high agility keeping its balance without falling down and score goal in less than 90 s.

2 Hardware and Electronics

The most important aspect to construct the structure of Baset robot was its weight because the robot’s agility depends heavily on its total weight. The initial design of the robot weighed approximately 16 kg which decreased to 13.5 kg by making some changes on the upper-body structure and the thickness of links before RoboCup 2016, and make all the mechanical parts out of aluminum. The 13.5 kg weight of the robot is significantly low considering the total of 28 MX-106Footnote 2 actuators and robot’s 145 cm height. The full configuration of Baset robot is shown in Table 2.

Table 2. Hardware configuration of Baset adult-size robot

The structure of Baset adult-size platform is a parallel design with 6 degrees of freedom on each leg, which is depicted in Fig. 1. In order to achieve both speed and power, the total of 13 actuators has been used to construct each leg, 4 actuators working together in each knee joint, depicted in the Fig. 1 top-right, 2 actuators working together alongside external power transfer gears in each hip-roll and ankle-roll joints, depicted in the Fig. 1 down-right, and 1 actuator alongside an external gear in each hip-yaw joint.

Fig. 1.
figure 1

Baset adult-size platform

Thanks to the decreased weight of the robot and fast actuators, Baset robot was the only adult-size robot that could actually jump in the technical challenges. Results of which are shown in Table 1.

Two controllers, one for high level processes such as image processing, and one for low level tasks such as controlling and synchronizing actuators on every joint has been used. A model of low level controller and power controller board is depicted in Fig. 2. The low-level controller, using BeagleBone BlackFootnote 3 with Ubuntu operating system, produces all the required information about sensors and actuators, and makes the data available for the main controller through the communication interface over Ethernet using UDP protocol for an uninterrupted and fast response.

Fig. 2.
figure 2

Robot’s low level controller and power board designed by team Baset

Using Ubuntu, as a non-real-time operating system for the low-level controller, makes it easier and faster to develop and debug software on it, but it has a disadvantage that it’s not possible to control half-duplex RS-485 direction pins in real-time, which is needed to achieve a fast communication speed with actuators. In order to deal with this issue, a MAX13488EFootnote 4 IC is used to take the responsibility of controlling the direction automatically in real-time. As shown in Fig. 3, in order to achieve the fastest communication speed with actuators, 3 individual RS-485 ports, one for each leg and one for upper-body joints have been used. The reason is that a single bus is not suitable to communicate with too many actuators. Baset robot’s electronic schematics are available freely on our GitHub repositoryFootnote 5.

Fig. 3.
figure 3

Electrical design of Baset robot

3 Software

3.1 Walk Engine and Motion Control

A fast communication interface over Ethernet has been developed in order to access the whole or partial data of objects on low level controller board, such as forward kinematics of all joints, and use them for the walk engine and static motions.

The parallel structure of Baset robot using multiple actuators for each joint, made us develop algorithms for a stable and fast walking system [3] for RoboCup 2016, which is based on the previous success of team Baset on Adult-Size and Teen-Size robots. The algorithm controls the proportional gain of actuators relatively to each foot’s Z trajectory. Figure 4 depicts the Z trajectory of robot’s left foot and the P-Gains of its actuators during two full strides. As depicted in Fig. 4, the lowest gains are used when the robot puts its foot on the ground, and the highest gains are used when the whole weight of the robot is on the supporting leg. Compared to the swinging foot, higher gains are used for the supporting leg. Following this approach, the robot is now capable of switching supporting foots smoothly by putting each foot on the ground using lower P-Gains which decreases the foot’s impact intensity on the field. The decreased impact intensity increases the life time of the actuators significantly and helps the robot to walk smoothly with lower noise using smoother strides. While the strides are smoother, due to the high P-Gains set on the supporting leg, as well as higher stability on the field, the maximum forward walking speed reached to 50 cm/s.

Fig. 4.
figure 4

P-Gains (green) relative to left foot’s Z trajectory (orange) (Color figure online)

The new developed walk engine accepts acceleration for forward, sideward, and rotation. The acceleration defines the robot’s tendency to change the speed and direction of its current walking state every moment. The higher acceleration values help the robot to be more agile whenever it is required (e.g. when dribbling the ball) and the lower values helps the robot to walk with high confidence without worrying about changing direction on a high-speed walk. The behavior system decides whether to use the higher acceleration values or the lower ones in each situation.

The new walk engine also accepts multiple configurations and can linearly combine them to provide custom configuration depending on the robot’s situation and state on the field. The combination is linear and every parameter in each configuration is combined with the same parameter in the other configurations, resulting a new configuration which is between the pre-defined configurations. One configuration is for ball handling and has the minimum, yet working, time period for strides and lower amplitudes of Z axis movement of each foot. The other configuration is specialized for the fastest and the most stable omnidirectional walking without handling the ball. The last configuration is specialized for the goal keeper which increases sideward movement and acceleration to help the goalkeeper walk immediately on the desired direction. Other configurations have been used for technical challenges. The behavior system combines these configurations during the match in accordance with the situation. When the robot is not handling the ball, it combines dribbling and fast-walking configurations depending on the ball’s distance to the robot, helping the robot walk fast and confident when it’s far from the ball and perform quick and agile actions when dribbling the ball. The system also uses the goalkeeper configuration when the robot acts as a goalkeeper. Due to the smooth linear changes in these configurations, the robot doesn’t act abnormally on the field and the average balance of the robot is maintained. The high confident walking system with high speed played a major role in winning the RoboCup 2016 adult-size competitions.

The high weight and size of adult-size robots forces many teams to considerably increase the double support time of the walking system. It’s obvious that during double support time, on which both feet are touching the field, no actions can be requested from the walk engine. Thanks to the light materials and powerful actuators used to construct Baset robot, it is possible to achieve the quickest response, by setting the double support time of all the configurations of walk engine to zero seconds. The result is depicted in Fig. 5.

Fig. 5.
figure 5

Walking with zero second double support time

The static motion generator controls proportional gains just like the walk engine system. To design a motion, depending on the pressure and strike on each joint, custom gains can be used, making it possible to design a jump motion. As shown in Fig. 6, Baset robot could jump about 3.4 cm during technical challenges. The high jump challenge is defined in RoboCup 2015 rulesFootnote 6 as the time that the robot terminates ground contact and stays in the air. The jump time is measured with a special device provided by the league. In order to make the jump motion we had to make sure that the mechanical structure of the robot could provide both the speed and the power. Thus, the knees constructed with 4 actuators working together in parallel, which is depicted in Fig. 1 top-right. To generate the jump motion, first the upper parts from the knee joints are moved upward while increasing both the speed and P-Gains of each foot, then after reaching the highest position, the lower parts of each leg are moved upward which lets the robot terminate the ground and make the jump. Then, while decreasing the speed and P-Gains of both feet, the robot lands on the ground with the lowest possible P-Gains set to the actuators. Therefore, the robot can jump without getting hurt.

Fig. 6.
figure 6

Jump motion for 3.4 cm during the technical challenges, RoboCup 2016

3.2 Perception

In Humanoid adult-size league detecting the obstacles and the opponent’s goal keeper plays a major role to win the competition. To locate each object in real self-coordinating system, the DH parameters and extrinsic camera matrix provided by motion module has been used. Lines are detected by a customized low computational cost method using RANSAC algorithm [6].

To calibrate the cameras, the chessboard calibration method [7], provided by OpenCV, has been used.

Ball Perception. The standard soccer ball has been used in the adult-size league since RoboCup 2015. In order to perceive the ball, using a growing color table and a simple contour detection algorithm [8, 9] on the binary image after removing white lines, the potential spots are detected first. Then these spots are compared to the ball and a confidence value is calculated.

To determine how much each spot resembles the ball, three algorithms have been used. Each algorithm calculates the confidence value using its specific Gaussian filter which reduces the effect of noises. By combining these confidence values according to their importance, each spot’s overall likelihood to be a ball is calculated. A sample of detected ball is depicted in Fig. 7. The algorithms used to calculate the confidence of each spot are as following:

Fig. 7.
figure 7

Ball perception

  • The size of the spot is compared to the size of the real ball.

  • The best matching circle is detected using OpenCV Hough Circle Transform [10] and its radius is compared to the actual ball’s radius.

  • Using Correlation Histogram Comparison algorithm [11] with 32 bins, all three HSV color channels of the spot is compared to the previously trained colors of the real ball. This algorithm output has more importance than the other two when combining them to get the overall confidence.

There is an ongoing research in the team Baset to use stereo camera’s depth image to achieve more robust ball perceptions.

3.3 Localization

A good and robust localization method is the key to succeed in the humanoid league. To localize the robot, the Sample Importance Resampling method has been used due to its simplicity and low computational cost.

The localization problem has been solved by using 110 particles, which are living by the probability proportional to their weights. For calculating each particles’ weight, a Gaussian function has been used on distance and orientation [12].

The sensor-reset technique [13] has been used in order to solve the global localization problem. This method solves the kidnaped robot problem by spreading 10 random particles in the field. For tracking the robot’s position, the dead reckoning data provided by the motion module has been used. The motion module gathers all the required information from each joint, such as current position and speed, and keeps track of the robot’s current speed and acceleration. It also provides camera’s position and orientation toward the robot’s ground contact. Localization output is depicted in Fig. 8.

Fig. 8.
figure 8

Initial particles (left) and after conversion to one location (right)

3.4 Behavior

The adult-size league has customized rules compared to the other size classes. A team takes a penalty shoot and has up to 150 s to score a goal. The ball is placed behind the robot which is faced the opponent goal. Then the robot starts the penalty from the center of the field, while two obstacles are randomly positioned on the opponent’s field. The robot has to reach the ball, dribble it to the opponent’s field while avoiding any touches with the obstacles, and shoot the ball toward the goal. Touching the obstacles finishes the penalty chance. The opponent team uses its robot as the goal keeper during each penalty shoot. After each penalty, the teams replace the roles and the penalty shoot continues for 5 strikes for each team in a normal match.

Because the adult-size robots are big and usually heavy, they can’t move as agilely as teen-size and kid-size robots. Thus, they have to act smart to score a goal during the limited time they have which underscores the importance of the behavior that the robot follows.

The robot’s camera has limited field of view while the obstacles can be placed near the robot forcing it to spend reasonable time scanning the field in order to find the obstacles exact position. To deal with this issue, the robot does not search for obstacles at first, instead it starts to find the ball as soon as the game starts then walks behind the ball. As shown in Fig. 9, when the robot is behind the ball in its own field, due to the obstacles long distance to the robot, by looking toward the opponent’s goal, both obstacles will be within the field of view of the camera and there won’t be necessary to scan the field to detect the obstacles. Therefore, the time to find the obstacles on the field is reasonably decreased.

Fig. 9.
figure 9

Robot’s behavior. Black curve indicates robot’s trajectory toward ball, and gray lines on that curve indicate robot’s direction on the field. Yellow lines show the camera’s field of view. Red circle is the place to which the robot shifts the ball then shoots it toward opponent’s goal. Violet segments of lines indicate the gaps between obstacles and field lines. (Color figure online)

Thanks to the perfect omnidirectional walking capability of Baset robot, it is possible to follow a trajectory which considers robot’s yaw angle on the field as a parameter. To produce the trajectory, three Gaussian filters have been used which determine the sideward, forward, and rotation speed of walking system. These filters use the ball position toward the robot which is produced by the robot’s vision system all the time as the input. A linear relationship between rotation speed and forward or sideward speed is used by which the higher value of rotation speed decreases both forward and sideward speeds. This way the robot moves toward the ball with a short trajectory considering robot’s angle on the field and can handle the ball without losing its own desired direction. A sample of resulting trajectory is depicted in Fig. 9 with black curve.

The robot, after walking behind the ball and finding the obstacles, considers the three free gaps made by obstacles and selects the one which is bigger and also needs less time for the robot to pass through (red circle on Fig. 9). Then, it shifts the ball there. As the robot is always maintaining its desired direction while handling the ball, when it reaches the ball, it has already aimed the opponent’s goal and moved one of its feet behind the ball. Otherwise, if the desired direction of the robot or the location of the ball toward it’s foot is not obtained, the robot will spend extra time to fulfill it. Then it shoots the ball toward the opponent’s goal.

4 Conclusion

In this paper, we provided our approaches and methods which let us win the humanoid adult-size league in RoboCup 2016 competitions. We first described our robust hardware and electronic devices which helped the robot play for long periods. Then we described the walk engine that controls P-Gains of actuators and accepts acceleration as a parameter. We also described how we obtained agile walking system by zeroing the double support time, how we could make a jump motion, how we perceived the real soccer ball and localized on the field, and finally described the behavior system of the robot to play the adult-size soccer.

During the competition, our robot proved to be the most stable one without even falling once. We demonstrated that an adult-size robot can play real soccer instead of penalty shoots using the high walking speed and stability. We also demonstrated the capability of jump motion for the first time in the adult-size league.

For further researches, we are updating the mono vision of the robot with a stereo camera. The provided information from the stereo camera is going to be used to perceive the obstacles and the opponent’s robot as well as the ball more accurately, and to record the visual odometry of the robot’s head in three dimensions. Afterwards, a fusion between robot’s walking pedometer and the visual odometry of camera is going to be used to enhance the robot’s localization accuracy. We are also planning to make our robots play real soccer in the adult-size league more efficiently in the future.