Abstract
1. Introduction
From the viewpoint of motion planning, the continuous motion of a humanoid robot can be represented by a series of key states, and each state corresponds to a specified body configuration during the motion (Wang 2007 et al.). To define these key states, numerous and effective original motion data are essential. Currently, the original motion data are acquired primarily through the method of HMCD, i.e. Human Motion Capture Data. But these motion data cannot be applied directly to the humanoid robot because of kinematics and dynamics inconsistence between the human subject (whose motion is recorded) and the humanoid. Techniques such as motion warping (Witkin et al. 1995) or dynamic filtering (Yamane et al. 2000, Tak et al. 2005) are often used to ensure that the captured motions can be transformed into a dynamically feasible one. However, these methods are not flexible as dealing with the contact constraints and stability maintenance. An effective state should satisfy various kinds of constraints, such as configuration constraints, contact constraints, stability constraints, and so forth. So, it is a problem of multiple constraints. At the same time, the coordinate transformations between the task and actuator space are necessary in the course of motion planning, which certainly relates to the solving of inverse kinematics. As redundant manipulators, humanoid robots are still under development in the areas of multiple constraints and inverse kinematics.
In most of the existing biped systems, the synergy method (Vukobratovic et al. 1990, Amos 2003) and methods based on optimization (Capi et al. 2002) are often used. But for an irregular motion, e.g. standing up from a lying to a standing posture, the computation for ideal trajectories becomes impractical because of high computational efforts. So, the methods lack applicability for the design of various complex motions. Yamane et al. proposed a computational technique for creating whole-body motions of human without any captured motion (Yamane 2003). By specifying arbitrary constraints to the links and joints, the animators can generate a natural motion accordingly. The method also presents an intuitive pin-and-drag interface where the user can generate whole-body motion by simply switching on or off or strengthening or weakening the constraints. The pin-and-drag method shows good performance for multiple constraints and inverse kinematics with redundancy. But it doesn't take into account the stability of the robot during the motion. On the other hand, it is unavoidable to compute Jacobian matrices frequently for introducing the differential kinematics to solve inverse kinematics. Hauser et al. (2005) studied non-gaited humanoid locomotion planning and proposed a “contact-before-motion” approach. The planner allows contact with any pre-designated part of the robot's body and uses a probabilistic, sample-based approach to compute each step. In this approach, all possible contacts (that is a point from the environment and a point of the robot) are given at the beginning, and a method of iterative constraint enforcement is adopted to accelerate the sampling of all feasible configurations. Based on the similar idea, Escande et al. (2006) developed “contact-before motion” approach by incrementally building a contact tree according to a potential-like function. Starting with a description of the environment and of a target, the planner can compute a sequence of postures that allow the robot to reach its target. Their works develop the studies for whole-body contactable motions by considering the multiple constraints in the planner.
This paper describes a new generation method of the original motion data based on the genetic algorithms (the GAs). Since the algorithm generates key states for humanoid motion planning, it is also termed a State Generator in our study. The State Generator provides a new motion data generation method for the whole-body motion planning for the humanoid robot. Without utilizing any reference motion data, the State Generator can create various desired motion states by specifying arbitrary configuration and contact constraints.
The remainder of this paper is organized as follows: we first introduce a kinematics modeling method for humanoid robot in Section 2 and then present the mathematics representation for various constraints in Section 3. Section 4 describes the state generation process based on the genetic algorithms. In Section 5, some motion examples are shown to validate the proposed method. Finally, we summarize the contributions of this paper in Section 6.
2. Kinematics Modeling of the Humanoid Robot
Kinematics modeling is to establish the relationship of the joints and links of the robot, which is a fundamental task for the motion planning. This work consists of two parts: the forward kinematics and the inverse kinematics. Generally, the inverse kinematics solution is much more difficult than the forward one. In the motion planning and control of the robot, in order to reach a desired location for the end-effector of the manipulator, suitable values of the joint variables must be specified. The humanoid robot is a typical redundant robot, so mapping from the world coordinates to the joint coordinates is not one to one, meaning that there may exist an infinite number of joint variables setting which result in a given end-effector position/orientation. At present, minimizing an error function through some iterative optimization technique has been the main approach for solving the inverse kinematics problem of redundant robots. This function corresponds to the Euclidean distance between the actual and the target position/orientation of the robot's end-effector. But for a humanoid robot, more complex factors have to be taken into account in the real-life application, such as the contact constraints, the stability maintenance, and so on. In this case, the error function must be modified to combine the desired optimization criteria. It is very disadvantage for the solution of the problem.
In this paper, we select the GAs as the optimization algorithm for solving the inverse kinematics problem for the humanoid robot. The GAs solution needs only the forward kinematics equations which are easily to acquire, and the cost function (fitness function) which envelops various constraints has not the requirements of continuity in the derivatives. The characteristics of the GAs will be presented particularly in the Section 4. In this Section, we primarily introduce the modeling method for the forward kinematics.

Structure model of the humanoid robot in this study. Image (a) is a front view and (b) is a side view
An outline of the model structure developed in our study is shown in Fig. 1. The model has 12 rigid body segments in total, and each rigid body is represented by two capitalized characters, for example CB, CA, etc. The total degree of freedom (DOF) of the humanoid robot is 17. In details, the DOF is distributed as: each leg has 5 DOF (2 for the hip joint, 1 for the knee joint, and 2 for the ankle joint), each arm has 3 DOF (2 for the shoulder joint, 1 for the elbow joint), and 1 DOF for the head. We represent the robot as a mechanism of tree structure whose root is a free-flying base link (pelvis) i.e. CB of the model. Taking a point on the root link CB, i.e. CBnot, as the reference point, we can establish the kinematics equations gradually. Thus, to describe the movement of the whole-body of the robot in the global coordinates N (where N1, N2, N3 are three unit base vectors), 23 generalized coordinates are needed totally: 6 of them are used to represent the configuration of the pelvis in the global coordinates, and the rest 17 of them are used to describe the relationship of the other parts of the robot relative to the pelvis. In this way, the movement of any point
Here,
Where:
3. Definition and Formulation of the Constraints
3.1. Configuration Constraints
The constraints of the kinematic systems can be classified into two categories, that is, holonomic and nonholonomic constraints. Since the State Generator is primarily to generate desired robot states that satisfy some configuration requirements, it belongs to the category of holonomic constraints. The space configuration of the robot can be characterized by specifying whole or partial character point coordinates, and partial joint angles. Suppose
In general, robot's states alternate with the constrained subjects, therefore the members in
where
here
3.2. Static Stability Constraints
In order to guarantee the generated states are static stable, the static stability constraints must be taken into account, that is, the ground projection of the center of the gravity (COG) of the robot should be kept in the support polygon. Two aspects of the contents are involved in this study: one is the mathematic expression of the support polygon; and the other is the relativity calculation for the ground projection of the COG relative to the support polygon.

Vertex representation of a convex hull acquired by using Graham scan. The lowest point
Idealistically, an arbitrary point on the robot can be taken as the support point interacting with the environment. However, in the real-life circumstance, the contact points primarily focus on the ends and the joints of the limbs. In this paper, we utilize the predefined character points
There are a lot of algorithms for computing the convex hull, and Graham scan is the most popular one (O'Rourke 2005). Given a set of points on the plane, Graham scan works in three phases to compute the convex hull:
a) First, select a point as the pivot. This point is guaranteed to be on the hull, and is chosen to be the point with minimum y coordinate. We select rightmost point in the set in case of the tie. b) Next, sort the points in order of increasing angle about the pivot. We end up with a star-shaped polygon. c) Build the hull, by marching around the star-shaped polygon, adding edges when we make a left turn, and back-tracking when we make a right turn.
For the detailed algorithm, please refer to O'Rourke (2005). As shown in Fig. 2, we acquire a convex hull
The position vector of the COG of the robot can be expressed as
where
For all
4. State Generation Method Based on GAs
Genetic algorithms (GAs) are search procedures based on the mechanics of natural genetics and natural selection. They combine an artificial survival of the fittest with genetic operators abstracted from nature to form a surprisingly robust search mechanism that is suitable for a variety of search problems (Goldberg 1989). There are several attractive features of GAs that make them suitable to solve the inverse kinematics problem of the humanoid robots (Parker 1989, Andreas 1998). The cost function is not necessarily required continuous in the derivation, so arbitrary form of the cost function can be selected for extremizing. There is no need for GAs to calculate the Jacobian Matrix of the end-effector relative to the joint variables. The GAs solution need only the forward kinematics equations, that is usually easy to acquire. The joint rotation limits can be handled directly, so any solution determined by GAs is physically realizable.
The main task of the State Generator is to generate the robot states that are compatible with the configuration and stability constraints by utilizing the effective searching technique of the GAs. Here the issue to be dealt with for the State Generator is not a single inverse kinematics problem, but a hybrid optimization problem that combine inverse kinematics with stability problems.
As shown in the followings, the GA is basically composed of five components that affect the algorithm significantly.
1) Encoding of the variables
2) Initial population's setting
3) Design of the fitness function
4) Genetic operation rules
5) Control of the algorithm parameters
One advantage of the GAs is its no requirement for the special knowledge about the optimization, where the optimal solution can be found by evaluating the fitness values of the chromosome-like data according to the defined fitness function. Suppose the optimization variables are
1) The boundary condition of the optimization variables:
2) The constraints of the joint angles:
3) The position constraints of the character points:
4) The position constraints of the contact points:

Checking the relative position of
Static stability constraints: for all
Here,
In these constraint conditions, constraint 1 and 2 can be met naturally by encoding of the variables; whereas constraint 3, 4 and 5 have to be synthetically satisfied according to specifying a proper fitness function. In this paper, the fitness function is designed as
Where
here,
5. Examples
The State Generator is implemented based on the software of Matlab by utilizing its Genetic Algorithm Toolbox, where the proposed method is employed to generate the key states for the whole-body motion planning for the humanoid robot. In the generalized coordinates, i.e. the optimization variables,
Definition of the joint variables. That is, the joints and their degree of freedom implemented in the model. Each joint is formed by two adjacent segments that can be found in Fig 1. And the reference coordinates represented by
5.1. Regulation of the Ground Projection of the COG
The original state generated by the State Generator is shown in Fig. 4, that is, an erect standing posture of the humanoid robot in the simulation space.

Initial output of the State Generator, i.e., the original state of the simulator without applying any constraints
In Fig. 5, we give an instance to illustrate the graphic ouputs of the State Generator, where the robot is standing with both hands touching an object. From Fig. 5(b), we can see that the ground projection of the COG locates inside the support polygon, which indicates the generated state is static stable. However, it's obvious that the ground projection of the COG is not strictly coincident with the center of the support polygon. In this case, we can increase the unbalanced weight number

Graphic representations for the outputs: picture (a) is the generated state of the robot whose hands touching an object, and graph (b) is the distribution of the support polygon vertexes as well as the ground projection of the COG

The state generated by increasing the unbalanced weight number to acquire more stable one

Climbing a ladder. (a) The initial state before climbing. (b) The robot begains to climb. (c) The robot has contacts on both feet and hands. (d) The right foot moves up one step. (e) The contacts are changed for the next climbing cycle. (f) The robot is then moved up one step again.
5.2. State Generations
Fig. 7 shows a series of key states generated by the State Generator to demonstrate a ladder climbing behavior. In this example, the hands are controlled to be in contact in order to maintan balance and also to control the ascention of the center of the mass. The climbing cycle is produced by designing the foot and hand positions at the ladder contacts. This example demonstrates the usefulness of the developed algorithms.
In this section, we summarize this paper as followings:
1) We present a particular mathematic representation for the constraints involved in the state generation, and propose a selection matrix to represent various constraints in a uniform expression.
2) In the static stability, we propose a convenient evaluation method by using Graham Scan to compute the convex hull for the support polygon.
3) With Genetic Algorithm, we simplify the state generation problem that involves the multiple constraints and inverse kinematics as a problem of optimizing and searching, which provides a new idea for the generation of original motion data.
4) This study contributes to not only the original motion generation for humanoid motion planning, but also the similar problems that relate to the multiply constraints and inverse kinematics.
