Abstract
Controlling a humanoid robot with its typical many degrees of freedom is a complex task, and many methods have been proposed to solve the problem of humanoid locomotion. In this work, we generate a gait for a Hitec Robonova-I robot using a model-free approach, where fairly simple parameterized models, based on truncated Fourier series, are applied to generate joint angular trajectories. To find a parameter set that generates a fast and stable walk, optimization algorithms were used, specifically a genetic algorithm and particle swarm optimization. The optimization process was done in simulation first, and the learned walk was then adapted to the real robot. The simulated model of the Robonova-I was made using the USARSim simulator, and tests made to evaluate the resulting walks verified that the best walk obtained is faster than the ones publicly available for the Robonova-I. Later, to provide an additional validation, the same process was carried out for the simulated Nao from the RoboCup 3D Soccer Simulation League. Again, the resulting walk was fast and stable, overcoming the speed of the publicly available magma-AF base team.
Introduction
Humanoid robots are claimed to be more adequate than wheeled ones for locomotion in unstructured human environments that include floor discontinuities, ladders, rocks, debris, and so on. However, walk control for humanoid robots (biped locomotion) is a particularly challenging problem, because it encompasses many characteristics acknowledged for making a control problem hard: nonlinearities, underactuation, many degrees of freedom (DOFs), and so forth. As a result, classical control methods fail when applied to biped locomotion. Still, many alternative approaches have been proposed, but so far there is no robot that can walk as well as a human does.
Biped locomotion methods can be grouped into two main approaches: model-based and model-free. Model-based methods depend on analytical models of the dynamics of the robot. Since modeling a high DOF humanoid robot is currently unfeasible, approximate models are used, for example, “3D Linear Inverted Pendulum.” 1 Then, a controller is developed for the model assuming that the dynamics of the robot follows the model. Despite producing incredible results, as the walking performance achieved by the Honda ASIMO robot, 2 the best model-based walks still operate in a very conservative way and produces very energy inefficient motion. 3
On the other hand, model-free methods try to create a controller directly, without a mathematical model for the dynamics of the robot. Two known model-free methods are the central pattern generator (CPG) 4 and the ballistic walking. 5 CPG is inspired by nature, where evidence shows that human locomotion is generated by neural networks that produce rhythmic patterns. Ballistic walking also got its inspiration in nature: it is based on the observation that human muscles of the swing leg are activated only at the beginning and at the end of the swing phase.
Moreover, there are model-free methods that assume very simple parameterized equations for the robots joints and use optimization or machine learning techniques to learn suitable parameters. Following this idea, Shafii et al. use a truncated Fourier series (TFS) formulation to describe parameterized joints angular trajectories and then suitable parameters are found by optimization. 6 –8 Using this approach, they were able to develop a fast and stable walk for the simulated Nao robot of the RoboCup 3D Soccer Simulation domain.
In this article, our main goal is to derive fast and stable walking patterns for humanoid robots using optimization algorithms. To this end, the work reported herein was divided into two phases: (a) simulation, with the development of algorithms based on computational intelligence for learning stable locomotion in controlled, simulated environments and (b) implementation on real robots, which consisted in transferring and adapting the algorithms tested in simulation to a real setting. The main contribution of this article is showing successful transferring and adaptation of walking parameters learnt in simulation to a real robot. We used a Robonova-I, 9 developed by the Japanese company Hitec Robotics, as our robot hardware and USARSim as the simulation environment. Furthermore, to provide further validation of the walk development approach used in this work, we implemented the same process in the RoboCup 3D Soccer Simulation domain.
Computational walk model for a biped robot
The biped robot model
The Hitec Robonova-I 9 has 16 DOFs, as shown in Figure 1. Each joint is powered by a Hitec HSR-8498HB servomotor which has a position feedback loop. Thus, the control program needs only to compute desired angles for joints. The controller is an MR-C3024 board installed on the back of the robot and programming is made using a Hitec’s proprietary language called RoboBASIC.

Hitec Robonova-I robot.
Humanoid locomotion based on periodic functions
Given that humanoid locomotion is an approximately periodic movement, it is intuitive that angular trajectories of a humanoid locomotion might be described as periodic functions. Indeed, 10 proved that TFS may be used to generate angular trajectories that yield a stable biped locomotion based on the zero moment point (ZMP) criterion.
Therefore, our walk algorithm uses periodic functions to generate stable and fast walking in a model-free approach. Our walking model is similar to the one shown in the studies by Shafii et al. 6 –8 However, based on intuition and observation of human locomotion, we considered an additional DOF for the shoulder movement to allow different amplitudes between forward and backward movements of the arms. Furthermore, our coronal movement pattern maintains the torso upright.
We now explain how periodic functions are used to compute angular trajectories for the joints. First, consider only the three pitch joints on each leg. We used periodic functions to generate angular trajectories for hip-pitch and knee joints. Moreover, foot-pitch joints were positioned to maintain the feet parallel to the ground at all times. It was assumed that the equivalent joints of each leg follow the same trajectories, except for a phase difference of
where
The model may be extended to include arms movement by adding the shoulder-pitch joint. The equation we used to describe the trajectory of the left shoulder was
where
A further extension may introduce joint movement in coronal plane (lateral direction) with the objective of trying to help the robot to take its foot off the ground. This idea is illustrated in Figure 2, and equation (6) is used to move the hip-roll joint. Differently from Shafii et al., 8 we maintain the torso allows upright. Note that our coronal movement pattern is qualitatively similar to the lateral torso sway that naturally arises in pendulum-based walking. 1 This kind of lateral torso sway motion helps maintaining the ZMP inside the support polygon during single support. 2

Proposed sequence of movements in coronal plane.
where
Three walking models were implemented herein following the ideas presented above. We call them Simple model (SM): walking model that uses only the pitch joints of the legs. Model with arms movement (AM): add arms movement to the simple model. Complex model (CM): complete model considering movements from AM plus legs movement in coronal plane.
Note that our robot hardware has the required DOFs to implement all three walking models.
Optimization algorithms
To reduce the search space and make the optimization algorithms more efficient, it is convenient to limit the domains of optimization variables. In our specific problem, we are not interested in testing walking parameters and we certainly know that will make the robot fall. Accordingly, some tests were done to establish limits to the walking parameters, as shown in Table 1.
Limits for the domains of the walking models parameters.
We considered two approaches for walk optimization: one is based on particle swarm optimization (PSO) and the other one is based on genetic algorithms (GAs). For further details about the fundamentals of these approaches, please refer, respectively, to the studies by Shi and Eberhart 11 and Holland. 12
PSO setup
The natural choice is to consider that each particle is in a
In the basic implementation of PSO, particles can reach high unrealistic speeds and get out of the search space boundaries. To avoid these problems, we made modifications to the basic PSO algorithm. First, we update a particle velocity using the following usual rule 11
where
where
Finally, Table 2 presents the values used to configure the PSO.
Parameters values used for PSO.
PSO: particle swarm optimization.

Subroutine that simulates collisions of the particles against search space boundaries.
GA setup
To allow us to use GA, the operations of this algorithm were implemented as follows: Chromosome: an array containing the Fitness function: we used the equation shown in “Simulation setup for experimental analysis” section. Since this equation can yield a negative number, we just normalized every chromosome fitness by adding the smallest score of the current generation. Mutation: with probability Selection: a standard roulette wheel selection was used. Crossover: a standard one-point crossover mechanism was used. Survival of the fittest: only the Finally, to configure GA, we used the parameter values presented in Table 3.
Parameters values for GA.
GA: genetic algorithm.
Experimental setup
The USARSim simulator
USARSim is a high-fidelity robot simulator. 13 Its current version is based on the Unreal Development Kit from Epic Games. 14 Unreal uses NVIDIA PhysX 15 as its physics engine, which is able model mechanics interactions (collision, friction, etc.) with high accuracy. Therefore, humanoid robots with high DOFs may be modeled using USARSim, as shown in the study by van Noort and Visser, 16 with the Aldebaran Nao robot. 17
The simulator comes with many robots, sensors and actuators, and model off-the-shelf. Implementation of new models is done using the tools provided by UDK. The most relevant tools used in this work were the UDK Editor—a 3-D model edition tool—and UnrealScrip—a proprietary high-level programming language.
Implementing the Robonova-I model
To implement a new robot model inside USARSim, the following basic steps are needed: Develop CAD models of the robot; Generate physical models based on the CAD models; Program the robot model using UnrealScript; Define extra parts, as sensors and actuators.
The implementation of the Robonova-I followed these steps, as explained in the next subsections.
Robonova-I simulation model
The CAD models used in this work were developed in a previous work using AutoCAD software from Autodesk, based on measurements taken on the real robot. 18 Next, the pieces were imported in Autodesk 3D Studio Max, where graphic materials with simple colors patterns were assigned matching the real robot colors. Then, the models were exported to FBX format.
FBX files were imported in UDK Editor, where the 26-DOF simplified collision algorithm was used to generate physical models based on the CAD ones. After configuring each piece, the set was exported as a UPK (Unreal Package).
The next step involved creating an UnrealScript class to represent the robot, which was done based on an implementation made for the Aldebaran Nao robot. 16 Each joints was implemented as a RevoluteJoint (a physical entity that connects two rigid bodies, allowing them to rotate with respect to each other around an axis), and collision between adjacent parts was disabled to avoid collision problems.
Finally, some sensors were added. Also, a USARSim special sensor called GroundTruth was attached to the torso of the robot. This sensor provides noiseless global position and orientation. Despite hard to obtain in the real world, these informations are very convenient for the learning process.
Figure 3 shows Robonova-I inside USARSim: physical models are presented as pink wireframe lines. On the left upper corner, there is a visualization of a camera attached to the robot head.

Simulated Robonova-I inside USARSim.
Simulation setup for experimental analysis
To evaluate the robotic walking, we developed an experimental setup inside USARSim. The idea was to run experiments where the robot could walk for some time and a metric would be used to evaluate the observed walk performance.
The map “ExampleMap” (shown in Figure 4) was chosen for this experimental setup, as it provides a large area with flat ground and without obstacles. Considering the orientation that the robot is initialized inside this map, the X-coordinate axis points forward and the Y-axis to the right. Then, each experiment consisted of the following process:

ExampleMap.
Start the simulated Robonova-I in a known position;
Wait 1.5 s so the robot can get in position for walking (e.g. bending its knees);
Let it walk for 20 s. The experiment is stopped if the robot falls;
Assess the walking performance using the following equation
where (
Punishment values.
After some experimentation, we noted two problems: The robot was frequently falling down when trying to make the first step, even with walks that were very stable when the walking was in steady state. Due to the fact that walking is a very noisy process, it was often happening that a walking parameter set was misevaluated. The worst case was when a very fast but unstable walk made the robot upright for 20 s, thus receiving a very good evaluation. This was especially bad for PSO, because this algorithm is strongly guided by the best global solution.
To minimize these problems, two heuristics were implemented: Instead of beginning the movement with nominal amplitudes, the robot linearly increases all amplitudes from zero to the nominal values during the first steps (after experimentation, we decided that this should be done during the first three steps). Instead of using one experiment run to evaluate a walking parameters set, we decided to take an average of three experiment runs.
Optimization results
Table 5 shows the results from the optimization experiments, once the heuristics aforementioned were adopted. Each line in Table 5 refers to a single optimization instance. The following qualitative conclusions can be drawn from the results:
Experiments results.
GA: genetic algorithm; PSO: particle swarm optimization; SM: simple model; AM: arms movement; CM: complex model.
Adding arms movement improves the walking quality (if walking parameters are correctly adjusted).
Adding movement in coronal plane improves even more the walking quality (again, if walking parameters are correctly adjusted).
Adding more parameters makes optimization convergence harder, as expected.
Figures 5 and 6 show how the performance of the best individual in the population evolves with the number of evaluations for different executions of the optimization algorithms considered. SM, AM, and CM are the walking models defined in “Humanoid locomotion based on periodic functions” section. Table 6 shows the best walking parameters for each optimization case.

Performance evolution (best individual) against number of evaluations for optimizations using GA. (a) Simple model. (b) Model with arms movement. (c) Complex model. GA: genetic algorithm.

Performance evolution (best individual) against number of evaluations for optimizations using PSO. (a) Simple model. (b) Model with arms movement. (c) Complex model. PSO: particle swarm optimization.
Best walking parameters for each optimization case.
GA: genetic algorithm; PSO: particle swarm optimization; SM: simple model; AM: arms movement; CM: complex model.
Transferring to other domains
Transferring to a real robot
There are several factors that do not contribute to match simulation to a real robot setting, namely: Physical models are approximations of CAD models. Despite originating from the same model, real same type servomotors have small differences in torque and speed. In the real robot, there are many mechanical phenomena that are usually not modeled in simulation due to computational complexity constraints: servomotor backlash, structural flexibility, and so forth.
In fact, humanoid locomotion is a complex problem and model imperfection may lead to very different walking behaviors. We thus expect that the parameters learned in simulation do not perform so well in the real robot.
To measure the walking speed in the real robot, we prepared the experiment setup shown in Figure 7. Ten experiments were ran for each walking, and we let the robot walk for 5 s and then measured the forward distance it moved.

Experiment setup to measure the real robot speed.
As a first solution, we considered the simple model with parameters optimized in simulation. A walking pattern did occur, but the performance was poor, with the robot frequently falling and the trajectory making a turn to the right. After manually tweaking the walking period, we arrived at a stable walking despite a trajectory still with side turn. We noted that the robot was slipping because the movement amplitude was very high, so the foot movement was probably exceeding the maximum static friction provided by the floor. We then reduced the movement amplitudes until arriving at 60% of the original values. The walking obtained in this way had a forward speed of approximately 18.1 cm/s.
Then, we added arms movement and the forward speed improved to 21.5 cm/s. Moreover, the trajectory of the robot became more straight. Table 7 shows the obtained speeds for different walking models. We also show the original walks from the robot manufacturer (Hitec) and an improved version available at Hitec Robotics. 19 Note that the final walking we developed outperforms all other tested. Figure 8 also shows a sequence of images to illustrate the real robot executing the walking with arms movement.
Comparison among different Robonova-I walks.
SM: simple model; AM: arms movement.

Image sequence showing the final walk on the real Robonova-I. The frame rate is 30 fps.
Transferring to a 3D soccer simulation domain
To provide further validation, we also implemented the walks in the RoboCup 3D Soccer Simulation League domain. 20 In this domain, twenty-two robots (11 in each team) play soccer in a simulation environment. The robotics simulator used is SimSpark, 21 which uses open dynamics engine 22 as its physics engine. The robot simulation model was inspired on the Aldebaran Nao robot. 23 To reduce our development effort, we used the base code magma-AF. 24
We executed the optimization process only for the simple and complex models using PSO, configured with the parameters presented in Table 8 and the search space limits shown in Table 9. The experiment setup used to evaluate the walking performance was very similar to the one we used in USARSim. The parameters learnt in this domain are shown in Table 10.
Parameters used to configure PSO for the 3D Soccer domain.
PSO: particle swarm optimization.
Search space limits for the 3D Soccer domain.
Best walking parameters learnt in the 3D Soccer domain using PSO.
PSO: particle swarm optimization.
To evaluate the performance of the learned walk, we compared it with the walk provided by the magma-AF base team. Fifty simulated experiments were performed for each walk model, where the robot was allowed to walk for 20 s. The experiment is interrupted if a fall is detected. Figure 9 shows an X-Y view of the 50 trajectories executed by the robot’s torso for each walk model. These trajectories show that the walks developed in this work far exceed the magma’s walk. Furthermore, the complex walk deviates much less than the simple one. In fact, the results show that the simple walk learnt is biased to the left, while we do not see a clear bias in the complex walk learnt.

X–Y view of the 50 trajectories executed by the robot’s torso for each walk model.
Moreover, Table 11 shows some statistics regarding the results. “X distance” and “Y deviation” refer to the distance the robot has covered in the direction it is initially pointing and the distance it has deviated in the perpendicular direction at the end of the 20 s(or when it falls), respectively. Since the experiment is stopped when the robot falls, the experiment time gives a measure of the robot stability. These results are consistent with the trajectories shown in Figure 9. The best walk learnt covers about 355% more distance than the base team’s walk. Additionally, the gain in X distance was small (about 10%) by activating arms and coronal plane movements when compared with the simple walk learnt; however, the reduction in Y deviation (more than 40%) clearly shows that adding these features yields a better walking performance.
Results of the experiments done to evaluate the walks learnt in 3D Soccer domain.a
aFifty experiments were executed for each walk model. In each experiment, the robot was allowed to walk during 20 s.
Figure 10 presents an image sequence showing the CM walk learnt in the 3D Soccer domain. To provide a better understanding between the effects of the arms and coronal movements on the learnt joint trajectories, Figure 11 shows the joint trajectories for the walks learnt in the 3D Soccer domain. Observe that the trajectories learnt for the leg joints legs are very similar between simple and complex models in this case.

Image sequence showing the complex walk learnt in the 3D Soccer domain.

Joint trajectories of the walks learnt in the 3D Soccer domain.
Conclusions
In this work, stable and fast walks for the Hitec Robonova-I robot were developed and presented. The approach used considered parameterized walking models, with TFS used to generate angular trajectories for joints. Adequate parameter values were determined using optimization algorithms, namely, GA and PSO.
Since optimizing directly on the real robot would probably result in hardware damage, we decided to follow an approach where a walk was learned in simulation and then adapted to the real robot. After manually tweaking the walk learned in simulation, we arrived at a walking that outperforms the original Robonova-I walking in the real robot. To provide further validation of the approach used, we executed the same process in the RoboCup 3D Soccer Simulation domain, where a simulated robot was also able to learn a fast and stable walk.
The approach presented here may be extended in future work. The model used allows only forward walking, but it is often convenient to be able to walk sideways and to change the direction the robot is facing. Other interesting research direction is to improve the walking model by adding more features. Also, the resulting gait is a pattern that is played over time without taking into account the robot state. Even using this open loop pattern, the real robot was able to walk stably and accommodate some perturbation and model error. However, the use of sensory feedback is expected to greatly improve the walk robustness. We are currently working on these improvements.
Footnotes
Author Note
Author Carlos H. C. Ribeiro is now affiliated to Aeronautics Institute of Technology, São José dos Campos, São Paulo, Brazil.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
