Journal of Information & Computational Science 1: 1 (2004) 137 141 Available at http://www.joics.com A 12-DOF Analytic Inverse Kinematics Solver for Human Motion Control Xiaomao Wu, Lizhuang Ma, Zhihua Chen, Yan Gao Department of Computer Science and Engineering, Shanghai Jiao Tong University Shanghai 200030, China Received 7 June 2004; revised 30 August 2004 Abstract In this paper, a new analytic inverse kinematics (IK) solver is proposed which is suitable for multiple constrained 12-DOF human limbs. By decomposing human skeleton into five parts one head chain, two arm chains and two leg chains, a multi-constrained human skeleton can be solved analytically. The new IK solver has the advantage of fast speed and easy implementation. We also demonstrate its application to motion editing of captured human motion clips. Keywords: Inverse kinematics; Analytic solver; Motion editing; Human animation 1 Introduction Inverse kinematics addresses the problem of calculating the joint angles of the body segments given the position and orientation of some body segments in 3D space. It can help the animator generating desired human posture with trivial effort. However, inverse kinematics problems are usually under-constrained. Existing IK algorithms such as Jacobian inversion, Jacobian transposition, cyclic coordinate descent(ccd), optimization, and genetic programming tackle this challenge through numerical method. Although analytic IK solver for 7-DOF human limbs has been developed[6, 4], it can only be integrated into existing numerical IK solver for complicated human bodies. In this paper we describe an analytic IK solver which is suitable for 12-DOF human arms. By decomposing a human figure into five parts, a totally analytic IK solver for 46-DOF human bodies was developed. Supported by the National Natural Science Foundation of China ( No. 60373070 and No. 60173035) and 863 High Tech Project of China ( No.2003AA411310). Corresponding author. Email address: xmwu@cs.sjtu.edu.cn. (Xiaomao Wu). 1548 7741/ Copyright c 2004 Binary Information Press September 2004
138 X. Wu et al. /Journal of Information & Computational Science 1: 1 (2004) 137 141 2 Related Work Many researchers have devoted to the study of inverse kinematics of a human-arm-like chain. Among them, Korein [1] is one of the first to study the geometry of humane arm. Zhao and Badler [5] formulated the inverse kinematics problem of a human figure as a constrained optimization problem. Zhao [6], Tolani et al. [4], Lee and Shin [2], proposed a new inverse kinematics algorithm by combining analytical method and an optimization procedure. The reader is referred to [4] for a good survey. Existing IK algorithms can only give analytic solutions to 7-DOF arms. When it comes to a chain containing more than 7 DOFs, numerical iteration is inevitable, which will slow down the computation speed, especially for large scale IK problems. The analytic IK solver we proposed can avoid this problem. 3 The Relationship Between Elbow Swivel Angle and Hand Orientation In this section, we introduce how to determine the swivel angle through the hand orientation angle. Without loss of generality, we just illustrate the right arm. We first introduce two angles S O 1 Y w W P X Y Z O chest Fig. 1 Determine the elbow position based on the β φ relationship E E g φ and β. As illustrated in Fig. 1, S, E and W represent initial reference positions of shoulder, elbow and wrist respectively. E g is the goal elbow position. O 1 is the rotation center of elbow on the SW line. φ is the elbow swivel angle which is defined as the angle between O 1 E and O 1 E g. β is the hand orientation angle which is defined as the angle between the X axis of the wrist distal frame which is denoted by X w and the XOZ plane of the chest distal frame which is denoted by P. Table. 1 Relationship between β and φ in chest proximal coordinate system. β(degree) φ(degree) 0 25.0 45.0 35.0 90.0 42.0 135.0 53.0 180.0 65.0 225.0 76.0 270.0 86.0 315.0 115.0 Through a series of anthropometry experiments, we found that when the shoulder and the wrist joint are fixed, the elbow swivel angle φ is closely related to the hand orientation angle β. We have tested ten males aged from 20 to 30 and calculated the average angle for φ(table 1). X w
X. Wu et al. /Journal of Information & Computational Science 1: 1 (2004) 137 141 139 4 Analytic Inverse Kinematics Solver 4.1 IK solver for arm chain Due to the symmetry of human body, we only illustrate the right arm which contains 12 DOFs: 3 for chest, shoulder and wrist, 2 for collar and 1 for elbow respectively. The IK problem for the right arm chain can be stated as: given the original positions of the 5 joints of the right arm chain and the orientation of the right hand, solve the angles of theright arm chain so that wrist and hand are placed at the goal position and hand placed at desired orientation. Our IK solver takes the following 7 steps: (1) Calculate the distance from shoulder to goal wrist position, if R L max (Fig. 1), go to step 2. Otherwise, adjust shoulder and collar joint, solve chest and collar angles, and then restart the whole process. (2) Calculate the elbow angles θ e = arccos(lu 2 + LL 2 d 2 )/(2 LU LL), where LL and LU are the length of the upper arm and lower arm respectively, d is the distance from shoulder to wrist joint. (3) Determine the elbow position. When the shoulder and wrist position along with the wrist orientation are given, the elbow position can be determined. We first determine the hand orientation angle β, and then use β to calculate the swivel angle φ by linear interpolation. The β φ relationship is given in Talbe 1. The elbow position can be obtained through algebraic knowledge. (4) Determine shoulder angles. The three euler angles of shoulder joint are denoted by θ sx, θ sy and θ sz respectively. Similar to Zhao s method[6], θ sx and θ sy can be obtained through the equation R sz R sx T se [0 0 0 1] T = [E s.x E s.y E s.z 1] T, and θ sy can be obtained through the equation R sz R sx R sy T se R e T se [0 0 0 1] T = [W s.x W s.y W s.z 1] T, where R sx, R sy, R sz are the rotation matrix of the shoulder joint in the proximal frame, T se is the matrix that translates the shoulder distal frame to the elbow proximal frame. R e is the rotation matrix of the elbow proximal frame. T ew is the matrix that translates the elbow distal frame to the wrist proximal frame, and E s is the elbow position, W s is the wrist position. (5) Determine wrist angles. Wrist angles can be determined similar to the process of shoulder angles determination except for the Y angle. (6) Test if shoulder angles violate joint limits, if they do, adjust the chest angles to satisfy shoulder s joint limits. If the adjustment makes the chest angles exceed joint limits, terminate the IK process with no solution found. (7) Determine collar and chest angles. The 7-DOF head chain and leg chain are easier to solve using a simplified version of the armchain-solver. 4.2 Application to motion editing In this section, we demonstrate the application of our IK solver to motion editing. We first obtain the constrains (t i, C i ) specified by the user on user-defined keyframes, then solve for the angles of
140 X. Wu et al. /Journal of Information & Computational Science 1: 1 (2004) 137 141 Shoulder Collar LU Hg R Lmax Wrist e LL Elbow Neck rcollar rshoulder relbow rwrist rhip Hip Head lcollar Chest lshoulder lhip lelbow lwrist Chest Fig. 2 Right arm posture control. H g is the goal position of wrist joint; R is the distance from shoulder to the goal hand position, L max = LU + LL, and θ e is the elbow angle. rknee rankle lknee lankle Fig. 3 Human skeleton model consisting of 18 joints each constrained keyframe using the analytic IK solver introduced above, thus the displacement value (t j, x j ) of each curve at each constrained frame can be obtained. Next we find a curve b(t) that approximates these displacement values (t j, x j ) based on multilevel curve fitting technique [2]. Finally we propagate the changes to the neighboring frames of each constrained frame. 5 Experimental Results We have applied our IK algorithm to a captured pose. In Fig. 4(a) a frame selected from an open-door captured motion is chosen as the original pose. In Fig. 4(b), Fig. 4(c) and Fig. 4(d), (a) (b) (c) (d) Fig. 4 (a) Original pose. (b) IK solver for the arm chain. (c) IK solver for the leg chain. (d) IK solver for the head chain. (a) Fig. 5 (a) Original motion: jump-kick motion. (b) The left motion is edited to kick higher while preserving the smoothness and characteristics of original motion. we demonstrate the results of our IK solver for the left arm chain, left leg chain and head chain respectively. The small black sphere shows the goal position. Fig. 5 shows the application of our IK solver to motion editing. We edit a backward-round-house motion to kick higher than the original one while preserving its smoothness and characteristics. (b)
X. Wu et al. /Journal of Information & Computational Science 1: 1 (2004) 137 141 141 References [1] J. Korein, A Geometric Investigation of Reach, Ph.D. thesis, University of Pennsylvania, 1985. [2] J. Lee and S. Y. Shin, A hierarchical approach to interactive motion editing for human-like figures, Proceedings of SIGGRAPH 99, 1999, pp. 39-48. [3] J. F. Soechting and M. Flanders, Sensorimotor representations for pointing to targets in three dimensional space, Journal of Neurophysiology 62 (2) (1989) 582-594. [4] D. Tolani, A. Goswami and N. I. Badler. Real-time inverse kinematics techniques for anthropomorphic limbs, Graphical Models 62 (2000) 353-388. [5] J. Zhao and N. I. Badler, Inverse kinematics positioning using nonlinear programming for highly articulated figures, ACM Transactions on Graphics 13 (4) (1994) 313-336. [6] X. Zhao, Kinematic control of human postures for task simulation, PhD thesis, CIS, University of Pennsylvania, 1996.