1 Introduction
Humanoid robots are human-like figures that are primarily expected to make various human-like motions. The completion idea of the Federation of International RoboSports Association (FIRA) is to make robots that can perform all kinds of sports activities as humans do. For example, the FIRA HuroCup is held with several events that are similar but simpler versions of human sports events. For the humanoid robot stair-climbing task, previous research (Gutmann et al., Reference Gutmann, Fukuchi and Fujita2004; Fu and Chen Reference Fu and Chen2008) has discussed the force and kinematics of the humanoid robot. Much research has focused on how to modify the programming codes or develop an algorithm for the robot to complete the tasks. The goal of this work is to successfully complete the task of lift and carry in the FIRA HuroCup competition by imitating human motion.
The imitation of human motion by humanoid robots was proposed by Calderon and Hu (Reference Calderon and Hu2005) and Nakazawa et al. (Reference Nakazawa, Nakaoka, Ikeuchi and Yokoi2002). Koenemann et al. (Reference Koenemann, Burget and Bennewitz2014) suggested a system in which humanoid robots can imitate human body movements in real time by taking into account the end positions of the feet, arms, and the center of mass. Poubel et al. (Reference Poubel, Sakka, Ćehajić and Creusot2014) proposed imitating human motion through instant simulation. Both imitation systems are based on inverse kinematics (Williams, Reference Williams2012) to obtain the related motor angles for the robot (Nguyen and Lee Reference Nguyen and Lee2012). However, balance control remains an issue.
For the imitation of human motion, the Kinect sensor is the most popular device to capture the human skeleton (Field et al., Reference Field, Pan, Stirling and Naghdy2011; El-Iaithy et al., Reference El-Iaithy, Huang and Yeh2012). However, the difficulty lies in mapping the joints obtained from the Kinect sensor to those of a humanoid robot because of the degree of freedom (DOF) difference and whether the balance control system is supported by muscles.
Considering this difficulty, this work proposes an algorithm with a Kinect sensor and achieves the goal of a humanoid robot performing the task of lift and carry in HuroCup competition by imitating the motion of a human to maintain its balance. The rest of the paper is structured as follows. Section 2 describes the problem of obstacles and introduces the humanoid robot used in this study. A fuzzy logic algorithm is proposed in Section 3. The experimental results are presented in Section 4, and the paper concludes in Section 5.
2 Humanoid robot and the problem description
2.1 Humanoid robot
Figure 1 shows the 45.5-cm-tall humanoid robot DARwIn-OP, which is an abbreviation for Dynamic Anthropomorphic Robot with Intelligence-Open Platform. DARwIn-OP, developed by ROBOTIS, operates with a 1.6 GHz Intel Atom Z530 (32-bit) onboard 4 GB flash solid-state drive and comprises 20 Dynamixel MX-28 actuators. The actuators offer 6-DOF leg movement, dual 3-DOF arm movement, and dual 2-DOF neck movement. The robot is equipped with a Universal Serial Bus (USB 2.0) high-definition Logitech C905 camera and has a three-axis gyroscope and a three-axis accelerometer as sensors to complete the task in the HuroCup competition. The motor ID and the related angles are defined in Table 1, where R indicates the right side and L represents the left side. Four force-sensing register (FSR) modules (Ha et al., Reference Ha, Tamura and Asama2013) are placed in each foot for ground reaction force measurements. These FSRs are used to find the zero moment point (ZMP), which indicates the most stable region of the robot.
Schematic of the DARwIn-OP servomotor numerically assigned positions

DWRwIn-OP servomotor ID position and angle.

2.2 Problem description
For the HuroCup competition, the robot needs to step up to irregularly shaped differently colored boards according to the rules of FIRA’s lift and carry event. The challenge in this event is that the height of the board for each step is approximately 1.8–2.0 cm, as shown in Figure 2. To perform the step-up motion successfully, the robot must automatically recognize the edge of the color boards.
Photograph of the robot performing the lift and carry event

3 Proposed algorithm
For the humanoid robot to step up onto the boards autonomously, we proposed the following algorithm:
Step 1. Use the imitation system to find the related core motor angles from the human to the humanoid robot by the fuzzy logic system described in Sections 3.1 and 3.2.
Step 2. Initialize the rest of the motors and adjust their parameters according to the ZMP stable region of feet from the FSR of both feet, as explained in Section 3.3.
Step 3. Increase the intermediate states between the stable states and the transition states (see Section 3.3).
3.1 Human motion imitation
To accomplish the lift and carry task, the robot is designed based on imitations of human motion. Human motion is captured by a Kinect v2 sensor, and the corresponding skeletal joints are recorded and screened by a personal computer, as shown in Figure 3. To make the original and imitated motion consistently, the number of human joints, captured by the Kinect as shown in Figure 3(a) and (b), is modified according to the servomotor ID of DARwIn-OP.
Twenty human skeletal joints captured by the Kinect. (a) Skeletal joints. (b) Kinect image

Next, the Kinect records the human motion of stepping up in three different views so that the motion can be analyzed and applied to train the robot. These three views of human motion—side, front, and top—are shown in Figures 4–6, respectively. The joints of human motion are not easily recognized; hence, the different views provide more recognizable motion for further analysis. The motion of stepping up is divided into five states, and the depth images for each state from the Kinect are shown in Figure 4. In Figure 4(a), the human is standing up in a ready position. The human now raises its left foot to step up to a stair (Figure 4(b)). Then, the human adjusts its center of mass by lowering its body and maintains balance by moving its arms, as shown in Figure 4(c). Next, the human keeps its left foot on the stair and raises its right foot to the stair, as seen in Figure 4(d). Finally, the human finishes the step-up task (Figure 4(e)).
Five states of the human step-up motion from the side view

Five states of the human step-up motion from the front view

Five states of the human step-up motion from the top view

3.2 Data analysis and fuzzy algorithm
Simple geometrical operations are used to calculate the angles between vectors, as shown in Equations (1) and (2), where V C3C1 represents the vector of the left elbow to the left and V C3C5 represents the vector of left elbow to left wrist as shown in Figure 7, and then the joint angle for left elbow can be calculated by vectors V C3C1 and V C3C5
\begin{equation}{\theta _{LE}} = {\cos ^{ - 1}}\left( {\frac{{\overrightarrow {{\textbf{V}_{{C_3}{C_1}}}} \times \overrightarrow {{\textbf{V}_{{C_3}{C_5}}}} }}{{\left| {\overrightarrow {{\textbf{V}_{{C_3}{C_1}}}} } \right|\left| {\overrightarrow {{\textbf{V}_{{C_3}{C_5}}}} } \right|}}} \right)\end{equation}
Schematic showing the angle calculation

However, there are several differences between a human body and a humanoid robot. For example, the difference in the DOF between humans and humanoid robots was discussed by Zheng et al. (Reference Zheng, Fu, Yang and Lv2012). Hence, direct movement mapping between a human arm and a humanoid robot arm is not feasible owing to differences in kinematics and dynamics parameters. Instead, the humanoid robot has to imitate human motion. The angles of the human step-up motion for five stages are listed in Table 2. The ID number is the same as that listed in Table 2. Because R_Hip_Yaw (ID 7), L_Hip_Yaw (ID 8), R_Ankle_Roll (ID 17), and L_Ankle_Roll (ID 18) are not available from the depth image, and the head (ID 19 and ID 20) does not move during the step-up process, servomotor IDs 7, 8, 17, 18, 19, and 20 are excluded in Table 2. In Table 2, IDs 1, 2, 11, and 12 are marked in blue. Because IDs 1 and 2 control robot arm movement and IDs 11 and 12 control robot body tilt, these four IDs significantly vary during the step-up process. The remaining IDs have less variation during the step-up process. These four motors were selected to be involved in the designed fuzzy logic rule because they control the balance of the robot and thus are the most significant factors influencing its step-up motion.
Angles of human step-up motion for the five stages.

The fuzzy logic system is designed as follows (Betin et al., Reference Betin, Pinchon and Capolino2000; Zhao and Bose, Reference Zhao and Bose2002). The parameter degree obtained from the human is called ϕ i , and i = 1, 2, 11, and 12 are the inputs called X i in the fuzzy system. Each parameter X i will be fuzzed into value within the range [0, 1], and the membership functions are very low (VL), low (L), medium (M), high (H), and very high (VH). The membership functions evaluate the ability x belonging to the set F denoted by μ F (x), in which x is the value of the estimated parameter and F is a set of real values within the range [0, 1], as defined in Figure 8. Even though different motors have different values for VL, L, M, H, and VH, these values are used to classify the fuzzy range of inputs. Fuzzy sets: F∈{VL, L, M, H, VH}, μF is the degree of the membership function for input fuzzy set F, {0 20 70 90 120 180}, {0 20 50 80 100 180}, {−30 −10 20 60 90 180}, and {0 30 50 60 90 180} are the values of input fuzzy set F for IDs 1, 2, 11, and 12, respectively.
Membership functions for each input X i

Next, the single-input and single-output fuzzy inference systems are adapted to define the fuzzy rule if… then… as follows:

Similarly, membership function evaluates the ability Y i belonging to the set A denoted μ A (y), in which y is the value of an estimated parameter and A is a set of real values within the range [0, 1] as defined in Figure 9. Finally, based on the fuzzy methodology, the center of gravity method is applied in this study to obtain the related output Y i which is the angle of motor ID 1, ID 2, ID 11, and ID 12 for the robot as shown in Equation (3).
\begin{equation}{Y_i}^* = \frac{{\int\limits_{{y_i} \in Y} {{\mu _A}({y_i}) \cdot {y_i}{\kern 1pt} \,d{y_i}} }}{{\int\limits_{{y_i} \in Y} {{\mu _A}({y_i})\;d{y_i}} }}\end{equation}
Membership functions for each output Y i

After the fuzzy algorithm calculation, the relationship between the angle variation in the human and robot step-up motion for IDs 1, 2, 11, and 12 is plotted (Figure 10).
Designed ID angle variation for the human and robot step-up motion

3.3 Robot motion adjustment and balance
Inside the sole area of the support foot, the FSR maps the current pressure point at which the whole body exerts its weight. The position values acquired from the FSR mounted in the DARwIn-OP humanoid are represented with integral quantities ranging from 0 to 254, as shown in Figure 11. For the double-stand phase of the humanoid robot, the stable region of the ZMP (the red rectangular region in Figure 11) is tested (Chien et al., Reference Chien, Sung and Kim2015) and is located at the center of both feet.
Definition of FSR values and the stable region for the DARwIn-OP humanoid

The related motors are adjusted to find a stable position for the humanoid robot (Figure 12). First, the related parameters of the robot are imported to the algorithm to obtain the ZMP from the FSRs of both feet. Next, a decision-making process is followed to adjust the related parameters of the motors to ensure that the ZMP from the FSR is in the stable region. If the ZMP is too far to the left, motor IDs 4, 6, 10, and 14 on the left side of the robot are adjusted. Similarly, if the ZMP is too far to the right, motor IDs 3, 5, 9, and 13 on the right side of the robot are adjusted. If the ZMP of the robot is too forward, related motor IDs 1, 2, 11 and 12 are adjusted to make the robot move its center of mass to the back and vice versa.
Flowchart showing how to adjust the robot position to be stable according to the ZMP

The ZMP is determined by the values of FSR. Then, the ZMP is adjusted based on the rule described below. If ZMP is too left, the motor IDs 4, 6, 10, and 14 are modified with a value Δ
$\theta$
i
, i = 4, 6, 10 and 14 as shown in Table 3. The listed values were obtained by experiments. The method is also applied when ZMP is at right, forward, and backward, respectively. If the motor needs to rotate clockwise, the angle increases with a small amount; otherwise, the angle decreases. The adjustment for ZMP is summarized in Table 3.
ZMP adjustment for Figure 12

Moreover, motor IDs 15, 16, 17, and 18 may affect the balance of the robot as well. The motors IDs 15 and 16 control the soles of the feet to left or right, while IDs 17 and 18 control them forward or backward. Therefore, the angles of those motors are within −15° to 15° to keep the soles of the feet parallel to the ground in X and Y planes so that the robot can step on the stairs with its entire feet and prevent itself from tripping.
Besides, a humanoid robot cannot move from one step to another step directly because suddenly changing position leads to balance loss and falling. Therefore, for a humanoid robot, a transition state (Chiang et al., Reference Chiang, Kuo, Lin and Chen2017), as illustrated in Figure 13, is required for balance and motor protection. The robot is designed so that it moves from a standing straight position (Figure 13(a)) to raise the right foot up (Figure 13(d)). In the process, two more steps, shown in Figure 13(b) and (c), are added to the transition state to maintain balance. These steps are added in the step-up motion of the robot for each of the five stages.
Adding transition steps in the robot’s motion to maintain balance

To handle a wide range of transitions, we also consider the case where two points (such as in Figure 13(a) and (d)) in the state space cannot be joined in one step. Specifically, given two states, S i and S j , we design transition states or two intermediate states – S a i→j (Figure 13(b)) and S b i→i (Figure 13(c)) (Da et al., Reference Da, Hartley and Grizzle2017), as shown in Equation (4) – and the corresponding control parameters so that the robot transitions are implemented. The transition state is obtained by linear interpolation, as shown in Equations (5) and (6).
where
$\alpha \in (0,1)$
,
$\beta \in (0,1)$
, and
$\Theta$
are all motors parameters.
3.4 Robot vision system
The robot is supposed to autonomously walk to and step up onto each color board in the lift and carry event. Thus, the vision system is used to recognize the color of the board and find a suitable step-up position. This position is the site where the robot’s balance is most likely to be maintained, with the size of the robot feet (10.4 cm in depth and 16.5 cm in width) taken into consideration. Thus, the relationship between the pixel size in the image and the real size of the color board, as shown in Figure 14 from the view of the robot, must be obtained. Next, the depth vector D, defined in Equation (7), is a 1 × 32 dimension vector and is obtained from the first color board location from the bottom row for each column, as shown in Figure 15(a).
The relationship between pixels versus dimension

The robot tries to find the edge of the color board

Here, d i is the distance from the first color board grid location to the robot for the ith column.
Then, every d i is calculated. If all the di are less than the threshold value T (in this experiment, T = 7 pixels) as described in Equation (8), then the robot has hit the edge of the color board, as shown in Figure 15(b).
4 Performance analysis
In Section 3, the imitation process of the robot to finish the lift and carry task is analyzed. To demonstrate the results of the proposed algorithm, we show the one step of lift and carry in Figure 16. In Figure 16(a)–(c), state S 1 to state S 2 is carried out with two additional transition states or intermediate states S a 1→2 and S b 1→2, as described in Section 3.3, to keep the robot in balance. Transition or intermediate states are also applied for states S 2 to S 4, as shown in Figure 16(d)–(l). Finally, the robot finishes the fifth state of stepping up a stair (Figure 16(m)).
Experimental result of the proposed algorithm from imitation of human motion. (a) State S1. (b) State Sa1→2. (c) State Sb1→2. (d) State S2. (e) State Sa2→3. (f) State Sb2→3. (g) State S3. (h) State Sa3→4. (i) State Sb3→4. (j) State S4. (k) State Sa4→5. (l) State Sb4→5. (m) State S5

The FSR of the robot during the proposed algorithm from imitation of human motion is plotted in Figure 17. In Figure 17(a) state 1, the robot is in the double-stand phase; hence, the ZMP marked in blue is the sum of both FSRs marked in red. In Figure 17(b) and (c), state S a 1→2 and state S b 1→2 are single-stand phases; the robot stands on its right foot only, and the left FSR is not shown in Figure 17(b) and (c). Therefore, the ZMP is only the right FSR for both states. In Figure 17(d)–(h), the robot is back to the double-stand phase; hence, the ZMP is the sum of both FSRs. In Figure 17(i)–(k), the robot is in a single-stand phase and stands on its left foot; hence, the FSR of the right foot is missing. Finally, the robot returns to the double-stand phase, with the ZMP shown at the center of both feet in Figure 17(l) and (m). To view the transition of the ZMP, the FSR from state 1 to state 5 is marked as 1–13. The right FSR is marked in green as Ri, i = 1, …, 13, and the left FSR is marked in red as Li, i = 1, …, 13. The sum of both FSRs is marked in blue as Mi, i = 1, …, 13 (Chien et al., Reference Chien, Sung and Kim2015). The result is shown in Figure 18. In Figure 18, all the states with the double-stand phase are in a stable region. Even though the single states are not in the ZMP stable region, in the next double-stand phase, the robot is in the stable region. Hence, the robot can imitate human motion to finish the life and carry event, while maintaining stable positions.
FSR results of the proposed algorithm from imitation. (a) State S1. (b) State Sa1→2. (c) State Sb1→2. (d) State S2. (e) State Sa2→3. (f) State Sb2→3. (g) State S3. (h) State Sa3→4. (i) State Sb3→4. (j) State S4. (k) State Sa4→5. (l) State Sb4→5. (m) State S5

FSR and ZMP for all states

To illustrate the performance and availability of the proposed algorithm in a real contest, an experimental environment is set up based on the rules of the lift and carry event (Figure 19).
Experimental result of the proposed algorithm with the vision system

5 Conclusions
This study proposed a method to enable a humanoid robot, DARwIn-OP, to imitate the step-up motion of a human and accomplish a lift and carry event in the HuroCup competition. First, human motion was captured by a Kinect sensor, and the positions of human joints and humanoid robot joints were made to correspond. Next, the human step-up motion was divided into five stages and analyzed separately. Then, servomotor IDs 1, 2, 11, and 12 were selected, and their angle variation was matched with that of human joint numbers 1, 2, 11, and 12 by designed fuzzy logic rules based on the difference in the DOF between the joints of a human and a humanoid robot. In addition, a process for maintaining a stable position was discussed by means of the ZMP region to adjust the parameters of the related motor according to ZMP. Two additional transition states were incorporated for each stage of the humanoid robot step-up motion to maintain its balance and reduce motor damage. Finally, for application in a real lift and carry event, the vision system was integrated to recognize the edge of the color board and determine a suitable site for the step-up. With these functions integrated, the robot under the proposed method was verified to successfully complete the lift and carry event without losing its balance or falling. As a result, this method can be applied to different types of humanoid robots.





















