Humanoid Robot Field-programmable Gate Array Hardware and Robot-operating-system-based Software Machine Co-design

We utilized the robot operating system (ROS) and the embedded system-on-a-chip (SoC) field-programmable gate array (FPGA) system to achieve the hardware and software co-design. A novel SoC FPGA processor system architecture is implemented by combining both ARM kernel and FPGA technologies. The advanced FPGA with the parallelized utilization and the powerful central processing unit (CPU) with universal abilities are adopted to complete the hardware and software co-design. The hybrid ROS-based control architectures efficiently communicate with each other at nodes to devise the correct sequential procedures and complete the full transformation of information in the distributed peer-to-peer topology. The humanoid robot platform design is intended to mimic the human body and its related motion to support various tasks. Humanoid robot machines have the limbs and trunk like the human body. The robot’s structure routing comprises connections between sheet-metal parts and linking motors. Motors rotate joints to imitate human motion. Pose and pressure sensors are located at the waist and on the undersides of the two feet, respectively. Sensors intuitively perceive relational robot situations and outdoor environment information. A kernel control board functions like a human brain to gather the whole information. The controller analyzes an appropriated command for the motor driver board to realize the suitable joint motion of the robot. A detail humanoid robot machine design and its related working events in different experiments are shown in this study.


Introduction
Because of the traditional architecture design for an embedded system, a small humanoid robot always uses individual central processing units (CPUs) or field-programmable gate arrays (FPGAs), which computational ability is limited by a single computing unit. Currently, an effective real-time control design for bipedal robots is still a major challenge. Over the last decade, a novel system-on-a-chip (SoC) FPGA processor system architecture has been implemented by combining both ARM kernel and programmable digital logic technologies. (1) Advanced FPGAs with parallelized utilization and the flexible and powerful ability of universal processing function designs are adopted to complete hardware and software co-structures. The lower power consumption and the smaller electric elements fixed on the main board successfully support the action required by the programmable unit in this study.
In humanoid robot research, the robot body imitates human behavior to literally match people's lives. Humanoid robots have become the most interesting topic in the world. Humanoid robots are made in various forms to mimic the human body with different combinations of muscles and joints. Balancing these robot movements over long time spans is highly intuitive, and it is difficult to overcome global and dynamic constraints. (2) An essential topic for robot bipedal movement is the control of legged motion and the body's center of gravity to achieve the desired locomotion. (3) Therefore, sensory neurons are simulated by sensors, such as pose and pressure sensors. The pose sensor may be adopted to detect the environment and estimate the state of a robot. (4) The pressure sensor may be adopted to integrate with the gait pattern to achieve the dynamic stability of robot walking. (5) Since the control of bipedal motion and the robot's center of gravity is an essential topic , both the pose and pressure sensors can be used simultaneously to guarantee the desired locomotion. (6) Currently, a great number of research studies on humanoid robots are on their applications to assisting our lives. For example, the humanoid robot takes a drill to cut the wall by using its gripper and steps up the stairs to overcome complex environments. The other vision-based robot machines also support the robot applications. (7) User-friendly robot operating system (ROS) software is developed as a functional framework to rapidly integrate the computational resources in the distributed operating environment. The ROS contains powerful tools for executing consistent communication between internal procedures such as Service, Topic, and Action. The ROS has a feasible modularized structure that enormously improves the assigning ability of the resources. The ROS package also deploys higher repeated utilization. Because of the powerful open-source feature of the ROS, it can be manipulated into any computational layer. The ROS has become a widely used tool in some real robot applications, such as PR2, Baxter, Fetch, Meka, and UBR-1 machines. A continuously increasing number of ROS studies have been carried out over the decades. The EL-E robot platform was used to efficiently create a moveable arm of a robot system with the indispensable support of the ROS. (8) Researchers developed a real-time grasp-planning human-robot system that follows a motion field graph by using the ROS. (9) The ROS is adopted to control multiple robot motions by manipulating the nodes of the architecture. A humanoid robot imitates a series of human motions to interactively work with humans. Therefore, different motions (such as pick up, move, and place) must be approached through complex kinematic procedures. (10) In Sect. 2, we discuss the details of a design structure of the hardware mechanism for humanoid robots in this study. In Sect. 3, we show the SoC FPGA hardware and ROS-based software co-design. In Sect. 4, we present the designed humanoid robot machine action plans and their related simulations in different experiments. Finally, our conclusions are given in Sect. 5.

Humanoid Robot Hardware Mechanism Design
A humanoid machine design is based on the concept of imitating human behavior. The humanoid body is constructed using various skeletons and joints. Such skeletons are made of aluminum alloy. The generated structure is strong enough to carry the full weight of the humanoid machine and enables various actions to be perfectly executed. The main robot parts are joined via 23 connections (joints) to realize full working functions using this basic platform. Some different and individual requirements for robot machine products are designed to satisfy the specific level of required torque force. For example, high torque force requirements for holding a heavy object will lead us to choose a high-power motor. Below, we introduce several robot machine part designs with detail discussions and descriptions of mechanical parts.

Head structure
In the head structure design, vertical and horizontal motors are placed under the robot head. Therefore, motors move the head structure up/down or left/right smoothly to simulate human motions. Suppose a camera is located in the upper portion of the head, which can be rotated around a spherical surface to increase the viewing range of the robot. The robot can quickly complete search movement, object tracing, and target localization in the related humanoid robot applications. Figure 1 shows the designed placement of the head motors. Head motors need only to support the head and the camera, which we hope will reduce the upper humanoid robot weight. Therefore, small head motors with suitable torque force are selected.

Hand structure
The hand structure is designed for a humanoid robot that lifts objects, climbs walls or plays basketball. One humanoid robot has two arms that each requires four degrees of freedom to perform the raise, lower, rotate, hold, and release actions. In the Palma design, the grip and notch modules enable the humanoid robot to carry out the appropriate applications. The positions of the hand motors are illustrated in Fig. 2. Motor 1 is used to swing the arm forward and back. Motor 2 controls the direction of motion for raising and lowering the arm. Motor 3 executes rotation. Motor 4 simulates the working action of wrist joints. In two-arm designs, these structures are located in the upper part of the humanoid robot. The weight of the two arms greatly affects the center of gravity of the entire humanoid robot. Therefore, AX-18 motors are chosen for the arms, as they have high power, light weight, and sufficient torque force for lifting heavy objects and climbing walls.

Leg structure
In the leg structure design, six required actions for the humanoid robot must be considered: forward, backward, out to the side and back, and two rotations. One leg contains six motors to support these six degrees of freedom. As shown in Fig. 3, Motor 1 drives the rotation. Motors 2 and 5 balance the swinging stability. Motors 3, 4, and 6 control the extension and contraction of the leg in the humanoid robot system design. The humanoid robot walks by interactively lifting its two feet alternately and adjusting its center of gravity. One foot must carry the total humanoid robot weight. Therefore, we selected MX-64 motors as they have the required high torque force in this study.

Humanoid robot sensory design
In humanoid robot sensor design, the pose sensor GY-87 and pressure sensor FlexiForce are installed as shown in Fig. 4. From these sensors, the humanoid robot obtains the required information from the outside environment to perfectly control its different motions. GY-87 comprises a combination of inertia-type sensors (i.e., gyroscope and accelerometer) to obtain real-time information on six axes from the I 2 C interface and sends that information to the FPGA module. GY-87 is set up at the waist of the humanoid robot. This sensor detects the slope angle and evaluates the upper body pose of the humanoid robot. FlexiForce measures the pressure from the compressive resistance, which is the inverse of the measured pressure. Resistance is in the open state when there is no pressure and it gradually decreases as pressure increases. The single chip MSP430G2553 is analogous to a digital converter. We use MSP430G2553 to detect the value and transmit it to the FPGA module. FlexiForce is located on the undersides of the feet to measure the crossed zero-torque point in this area.

FPGA system structure of humanoid robots
The two main functions of the FPGA system are (1) sensory information feedback and (2) motor control command transition. For sensory information feedback, the gyroscope and accelerometer are located at the waist of the humanoid robot, and the pressure sensors are located under the baseboards of the feet. The MSP430G2553 microchip supports the I 2 C topology to obtain measurements from the three-dimensional gyroscopes and accelerometers in real time. The MSP430G2553 microchip is analogous to a digital converter. All environmental information is concentrated by the FPGA. The sensory package data of the biped robot are collected by MSP430G2553 and transferred to the hard processor system (HPS) for analysis.

ROS-based Humanoid Robot Hardware and Software System Plant Design
In the humanoid robot system, the fundamental blocks for SoC FPGA internal kernel design are divided into two parts: (1) FPGA and (2) HPS. The data transform flow is information sharing through the hand-shaking-type Qsys tools. We adopt one SoC FPGA board. Its benefit is the reduced size and weight of the board and the increase in transmission rate between the hardware and software boards. DE0-Nano-SoC is a dual-core architecture, in which the FPGA logic hardware and ARM-based HPS are combined to execute the required commands in parallel.
FPGA is considered as a programming logical array gate to efficiently handle the computational tasks in the parallel mode. This subsystem focuses on the real-time response and higher accuracy of the time planning work, for example, sensory information feedback and motor control commands. The HPS includes the universal CPU to perform mathematical functions and flexibly regulate the parameters. The HPS supports the human-machine interface, walking speed and gait planning, pose control, and robotic kinematics. The ROS is applied in this work. A basic function block of hardware and software co-design is shown in Fig. 5. The ROS design resembles a distributed operation system. It includes the following two main working layers: (1) The filesystem level is used to manage all the resource files. (2) The computation graph level is proposed to operate the peer-to-peer network and concurrently handle all the procedures and data manipulations. ROS software contains many packages to access different application services. One package has various nodes to execute the required procedures. Nodes communicate with each other through data message deliveries by Topic and Service methodologies in the ROS cross platform to support various robot applications. The HPS executes complex algorithms and mathematical computations in the ROS environment. The ROS structure is utilized in the HPS to design the walking speed planning software package of the humanoid robot. In planning the humanoid robot walking gait, various cosine waves are generated to form a smooth oscillating trajectory. This style of planning the robot design is effective for determining the appropriate walking action of the humanoid robot. In this study, the center of mass (CoM) of the humanoid robot is assumed to be at the waist to simplify the dynamic kinematics model. Therefore, walking speed planning for the robot waist and biped traces will be formulated in the three-dimensional space. The inverse kinematics module derives the individual motor rating and compensation angles of the pose controller on the basis of the biped traces. The compensation angle is generated using the analyzed sensor information from the Kalman filter. The obtained motor rating and compensation angles are sent to the FPGA.

Humanoid Robot Machine Action Planning and Simulations
To complete the robot machine functions, we first apply the waist trajectory planning design. We define the waist area of the humanoid robot as the position of the CoM.
( ) x W V t denotes the speed on the x-axis. Equation (1) shows the diversion of ( ) x W V t . T s and T d denote the start and end times of movement, respectively. T step is one walking step cycle and t is the system cycle time. The changing waist speed is shown as a wave in Fig. 6(a). In each walking cycle, the robot speed is divided into three phases: (1) speed up, (2) constant, and (3) slow down. The response speed curve is designed as shown in Fig. 6(b). The robot waist position ( ) Here, ρ is the oscillation amplitude, ω is the oscillation frequency, and φ is the starting oscillation phase. Their related parameter settings are shown in Table 1. Results for the waist trajectory wave planning are displayed in Fig. 7. Robot waist action planning is shown in Fig. 8.
Here, T s and T d denote the start and end times of movement, respectively. T step is one walking step cycle, t is the system time, ρ is the oscillation amplitude, ω is the oscillation frequency, and φ is the starting oscillation phase. α indicates the moving angle of the biped trajectory and robot waist. The related biped trajectory planning parameters are shown in Table 2. The results of   bipedal waves of the humanoid robot are displayed in Fig. 9. Figure 10 shows the (a) front and (b) side views of the determined bipedal actions. Simulated waist and biped movement trajectories are shown in Fig. 11. This figure shows that the humanoid robot can walk smoothly as a result of the defined path planning based on the direction of the bipedal movement control wave. The CoM of the humanoid robot is assumed to generate the appropriated waist and biped trajectories. The related walking speed and planning parameters are shown in Table 3.

Conclusions
In this study, we combined the FPGA hardware and RSO software technologies to construct the humanoid robot system. The main head, hand, leg and sensory hardware setups, and other related control elements with the FPGA core unit and ROS software packages were completed to implement the robot's motions. In the humanoid robot control strategy, we realized approximate waist balance and bipedal position control for stabilizing the desired movement trajectory. Simulation results showed that the humanoid robot follows the predefined wave to complete the walking paths as a result of the selected waist balance and bipedal position control strategy.
We will apply other parameters for tuning and learning algorithms to automatically generate a robust control wave and attain a good locomotion control. Some artificial intelligent technologies will be applied to improve the best performance. Therefore, near-optimal humanoid robot walking is anticipated to be realized and extended into related human's service applications in future work.

About the Authors
Hsuan-Ming Feng received his B.S. degree in automatic control engineering from Feng-Chia University, Taichung, Taiwan, R.O.C., in 1992. He received his M.S. and Ph.D. degrees in computer science and information engineering from Tamkang University in 1994 and 2000, respectively. He is currently a full professor in the Department of Computer Science and Information Engineering, National Quemoy University. His current research interests include fuzzy systems, neural networks, wireless networks, optimal learning algorithms, image processing, and robotics systems. (hmfeng@nqu.edu.tw) Ching-Chang Wong received his B.S. degree in electronic engineering from Tamkang University, Taipei, Taiwan, in 1984, and his M.S. and Ph.D. degrees in electrical engineering from Tatung Institute of Technology, Taipei, in 1986 and 1989, respectively. In 1989, he joined the Department of Electrical Engineering, Tamkang University, where he is currently a professor. His research interests include fuzzy systems, intelligent control, system-on-aprogrammable-chip design, and robot design.