real-time inverse kinematics technique for controlling...

3
Real-time Inverse Kinematics Technique for Controlling Redundant Avatar Arm* Sanghyun Kim 1 , Junhyung Kim 1 , Ji-Hun Bae 2 , and Jaeheung Park 1 Abstract—In this paper, a preliminary study of a real-time Inverse Kinematics (IK) technique is presented to transfer human arm postures to a humanoid avatar with 7 or more DoF arm. The proposed framework is based on Forward And Backward Reaching Inverse Kinematics (FABRIK) solver which is one of heuristic iterative methods, in order to calculate joint positions. In addition, the proposed method can calculate feasible arm postures of the avatar for treating kinematic redundancy by minimizing kinetic and potential energy. Thus, the proposed method can generate human-like motions. The proposed algorithm was implemented on avatar simulator with Virtual Reality (VR) devices and its performance was demonstrated by imitating human arm motions in real-time. I. INTRODUCTION Human-like motion control can provide a great deal of manipulation capability in not only exoskeleton and tele- manipulation system but also human-machine interaction. Especially, transferring human motion to virtual avatar in Virtual Reality (VR) has been actively studied for decades because VR technology has great potential for various fields including not only computer game and movie industry but also education and rehabilitation [1]. As a traditional method to imitate human motions, a high-dimensional input device such as a 3d motion capture system has been used to obtain all joint motion of the user [2]. However, the system is too expensive and bulky. The alternative method is to use a low-dimensional input devices such as a joystick and a motion tracker in order to track posture of hand or foot. In this method, an Inverse Kinematics (IK) solver is used to calculate joint angles of the avatar with kinematic redundancy to generate whole-body motions of the virtual avatar by using only the posture of the hand or foot in Cartesian space [3]. IK solver is mainly classified into three types: analytic IK solver, iterative IK solver, and optimization based IK solver. First, the analytic IK solver can calculate joint angles of avatars directly by using a kinematic information. In [4], the analytic IK solver was used to imitate human motion in real-time, because this IK method can solve faster than other IK methods. However, this method has a disadvantage that it is difficult to handle an avatar with a redundant arm. Second, the iterative IK methods can solve the IK problem by using a series of steps that lead to an increasingly better *This work was not supported by any organization. 1 are with the DYROS Lab, Graduate School of Convergence Science and Technology, Seoul National University, Seoul, Republic of Korea. {ggory15, john3.16, park73}@snu.ac.kr 2 is with Robotics R&D Group, Korea Institute of Industrial Technology, Ansan, Republic of Korea. {joseph}@kitech.re.kr answer to the solution. In [5] and [6], Jacobian pseudo inverse and damped pseudo inverse are used to minimize the error between a target posture and a current posture of the avatar iteratively. However, these Jacobian-based methods have low-convergence performance when the target pos- ture reaches kinematic singularity. Cyclic Coordinate Decent (CCD) based on backward iterative recursion with kinematic chain is also a popular iterative method [7]. However, the convergence rate of CCD is slow, when the solution is near the target posture. Finally, the optimization based method can treat IK problem by minimizing a cost function [8]. However, heavy computation for solving the optimization problem may prevent real-time operation, although this method can generate natural dynamic motion. This paper proposes a real-time IK scheme to transfer human arm motions to an avatar with 7 or more DoF arm. First, a feasible arm plane is chosen by optimizing kinetic and potential energies of the avatar. Then, joint positions on the obtained feasible arm plane are calculated by using FABRIK solver which is a heuristic iterative method [9], [10]. FABRIK explores each joint position via locating a point on line, while existing iterative IK methods calculate angle of joints. Thus, fast convergence speed is ensured, un- like conventional iterative methods. The contributions of this paper are as follows. First, the proposed method including FABRIK and optimization method can generate human-like motions for avatar quickly, regardless of the number of the joint. Second, we modified a FABRIK solver to calculate joint angles, since the basic FABRIK solver finds only joint positions. Finally, the effectiveness of the algorithm was verified through experiments with VR devices. II. PROPOSED FRAMEWORK A. Avatar Definition We uses a virtual avatar with 12 DoF arm because con- ventional 7 DoFs arm model is often limited in representing human-like arm movements. As illustrated in Fig. 1a, the avatar arm model has four kinematic chains to generate natural arm motions; acromioclavicular, shoulder, elbow, and wrist. We denote the transformation matrix (T i = {p i , R i }), where p i R 3 and R i R 3×3 represent position and orientation of the ith joint, respectively. To define the feasible arm plane, we use the concept of swivel angle which is the rotational angle of the plane including the upper and lower arm [11]. The swivel angle φ is an index of the arm rotated about the axis connecting the wrist and the acromioclavicular. Note that the swivel angle is zero when the elbow is at the bottom (blue plane in Fig.

Upload: others

Post on 22-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

  • Real-time Inverse Kinematics Technique for ControllingRedundant Avatar Arm*

    Sanghyun Kim1, Junhyung Kim1, Ji-Hun Bae2, and Jaeheung Park1

    Abstract— In this paper, a preliminary study of a real-timeInverse Kinematics (IK) technique is presented to transferhuman arm postures to a humanoid avatar with 7 or moreDoF arm. The proposed framework is based on Forward AndBackward Reaching Inverse Kinematics (FABRIK) solver whichis one of heuristic iterative methods, in order to calculatejoint positions. In addition, the proposed method can calculatefeasible arm postures of the avatar for treating kinematicredundancy by minimizing kinetic and potential energy. Thus,the proposed method can generate human-like motions. Theproposed algorithm was implemented on avatar simulatorwith Virtual Reality (VR) devices and its performance wasdemonstrated by imitating human arm motions in real-time.

    I. INTRODUCTION

    Human-like motion control can provide a great deal ofmanipulation capability in not only exoskeleton and tele-manipulation system but also human-machine interaction.Especially, transferring human motion to virtual avatar inVirtual Reality (VR) has been actively studied for decadesbecause VR technology has great potential for various fieldsincluding not only computer game and movie industry butalso education and rehabilitation [1].

    As a traditional method to imitate human motions, ahigh-dimensional input device such as a 3d motion capturesystem has been used to obtain all joint motion of theuser [2]. However, the system is too expensive and bulky.The alternative method is to use a low-dimensional inputdevices such as a joystick and a motion tracker in order totrack posture of hand or foot. In this method, an InverseKinematics (IK) solver is used to calculate joint angles ofthe avatar with kinematic redundancy to generate whole-bodymotions of the virtual avatar by using only the posture of thehand or foot in Cartesian space [3].

    IK solver is mainly classified into three types: analytic IKsolver, iterative IK solver, and optimization based IK solver.First, the analytic IK solver can calculate joint angles ofavatars directly by using a kinematic information. In [4],the analytic IK solver was used to imitate human motionin real-time, because this IK method can solve faster thanother IK methods. However, this method has a disadvantagethat it is difficult to handle an avatar with a redundant arm.Second, the iterative IK methods can solve the IK problemby using a series of steps that lead to an increasingly better

    *This work was not supported by any organization.1 are with the DYROS Lab, Graduate School of Convergence Science

    and Technology, Seoul National University, Seoul, Republic of Korea.{ggory15, john3.16, park73}@snu.ac.kr

    2 is with Robotics R&D Group, Korea Institute of Industrial Technology,Ansan, Republic of Korea. {joseph}@kitech.re.kr

    answer to the solution. In [5] and [6], Jacobian pseudoinverse and damped pseudo inverse are used to minimizethe error between a target posture and a current posture ofthe avatar iteratively. However, these Jacobian-based methodshave low-convergence performance when the target pos-ture reaches kinematic singularity. Cyclic Coordinate Decent(CCD) based on backward iterative recursion with kinematicchain is also a popular iterative method [7]. However, theconvergence rate of CCD is slow, when the solution is nearthe target posture. Finally, the optimization based method cantreat IK problem by minimizing a cost function [8]. However,heavy computation for solving the optimization problemmay prevent real-time operation, although this method cangenerate natural dynamic motion.

    This paper proposes a real-time IK scheme to transferhuman arm motions to an avatar with 7 or more DoF arm.First, a feasible arm plane is chosen by optimizing kineticand potential energies of the avatar. Then, joint positionson the obtained feasible arm plane are calculated by usingFABRIK solver which is a heuristic iterative method [9],[10]. FABRIK explores each joint position via locating apoint on line, while existing iterative IK methods calculateangle of joints. Thus, fast convergence speed is ensured, un-like conventional iterative methods. The contributions of thispaper are as follows. First, the proposed method includingFABRIK and optimization method can generate human-likemotions for avatar quickly, regardless of the number of thejoint. Second, we modified a FABRIK solver to calculatejoint angles, since the basic FABRIK solver finds only jointpositions. Finally, the effectiveness of the algorithm wasverified through experiments with VR devices.

    II. PROPOSED FRAMEWORKA. Avatar Definition

    We uses a virtual avatar with 12 DoF arm because con-ventional 7 DoFs arm model is often limited in representinghuman-like arm movements. As illustrated in Fig. 1a, theavatar arm model has four kinematic chains to generatenatural arm motions; acromioclavicular, shoulder, elbow, andwrist. We denote the transformation matrix (Ti = {pi, Ri}), where pi ∈ R3 and Ri ∈ R3×3 represent position andorientation of the ith joint, respectively.

    To define the feasible arm plane, we use the conceptof swivel angle which is the rotational angle of the planeincluding the upper and lower arm [11]. The swivel angle φis an index of the arm rotated about the axis connecting thewrist and the acromioclavicular. Note that the swivel angleis zero when the elbow is at the bottom (blue plane in Fig.

  • 𝑻𝑻𝟏𝟏 = {𝒑𝒑𝟏𝟏,𝑹𝑹𝟏𝟏}𝑻𝑻𝟐𝟐

    : 3 DoF Joint

    𝑻𝑻𝟑𝟑𝑻𝑻𝟒𝟒

    (a)

    φ

    (b)

    Fig. 1: Avatar definition, (a) Kinematic structure of avatar,(b) illustration of feasible swivel angle

    1b). Using the concept of the swivel angle φ , arm plane isdefined including all joints’ position (red plane in Fig. 1b).

    B. Calculating Joint Position

    FABRIK solver is to find each position (pi) on the givenfeasible arm plane. Algorithm 1 introduces a full iterationof FABRIK with forward reaching process (line 7-12) andbackward reaching process (line 13-18). Given a desiredtarget position (pd) as shown in Fig. 2a, FABRIK checkswhether the target is reachable or not by using the sumeof the link length, di = |pi+−pi|, for i=1, ..., 3 and thedistance between the target and the root, dist = |pd−p|.Then, if the target is reachable, the forward reaching process(Fig. 2b-2d) is performed. As shown in Fig. 2b, the newposition of last joint p,n is set to be the position of targetpd. Then, the new position of 3rd joint, p,n, is drew overa line which passes through p,n and p (Fig. 2c). Thepositions of the rest of joints can be updated by repeatingthe same procedure (Fig. 2d). Finally, the backward reachingprocess starts from the first joint. Given the calculatedposition pi,n and root position p the new position of eachjoint is updated by applying the same rule in the forwardprocess. The forward and backward process are repeated untilthe distance between last joint and the target is less than theconvergence threshold.

    C. Converting Joint Position to Joint Angle

    Based on the obtained joint positions by FABRIK algo-rithm, we defined the rotation matrix of each joint (Ri) tocalculate joint angles as the following rules during iteration.First, the rotation matrix of a final joint (R) set the rotationof target Rd. Second, the x and y axes of the other rotationmatrices are defined as the direction of link and the normalvector of the swivel plane, as shown in Fig. 2a and 2d.

    In each iteration step, the obtained orientation is convertedto joint angles. In our case, the obtained rotation matrices areconverted into Euler angles in joint space. If the calculatedangle exceeds the range of joint limit for each iteration, thejoint’s position is re-updated until the Euler angle is withinrange, as shown in Fig. 3.

    D. Selecting Feasible Arm Plane

    An iterative search procedure is presented to find optimalswivel angle. This method is similar to the work of M.

    Algorithm 1 FABRIK solver1: Inputs:

    Joint position pi, target pd, joint distance di2: Output:

    New joint position pi3: if reachable() and Iter < MaxIter then4: b← p5: di f f ← |pn−pd|6: while di f f > tol do7: pn← pd8: for i=n-1 to 1 do9: ri← |pi+−pi|

    10: λi← di/ri11: pi← (1−λi)pi++λipi12: end for13: p← b14: for i=1 to n-1 do15: ri← |pi+−pi|16: λi← di/ri17: pi+← (1−λi)pi+λipi+18: end for19: di f f ← |pn−pd|20: end while21: Iter = Iter+122: end if

    , ,

    ( )

    ,

    ,

    ,

    xy

    z

    (a)

    ( )

    , =

    (b)

    𝑨𝑨𝑨𝑨𝑨𝑨 𝑷𝑷𝑷𝑷𝑷𝑷𝒏𝒏𝑷𝑷 (𝚽𝚽)

    𝒑𝒑𝟑𝟑,𝒏𝒏

    𝒑𝒑𝟐𝟐

    𝒑𝒑𝟏𝟏

    𝒑𝒑𝟒𝟒,𝒏𝒏

    (c)

    𝑨𝑨𝑨𝑨𝑨𝑨 𝑷𝑷𝑷𝑷𝑷𝑷𝒏𝒏𝑷𝑷 (𝚽𝚽)

    𝒑𝒑𝟒𝟒,𝒏𝒏

    𝒑𝒑𝟏𝟏

    𝒑𝒑𝟏𝟏,𝒏𝒏

    𝒑𝒑𝟐𝟐,𝒏𝒏

    𝒑𝒑𝟑𝟑,𝒏𝒏

    (d)

    Fig. 2: An example of forward reaching process of FABRIK.

    Kallmann [12], but we find an optimal swivel angle bydecreasing the energy cost function iteratively, as below.

    cost =12

    3

    ∑i=1

    (mi(∆pi,c

    ∆ t)2 +migTpi,c), (1)

    where mi, ∆pi,c, g, and ∆ t are a mass and a variation ofCoM for each link, gravity vector, and time step. Thus, byminimizing (1), the optimal swivel angle can be chosen toprevent sudden movements and keep elbow position as lowas possible.

    The iterative search procedure to minimize the cost is asfollows.

  • (a) (b)

    Fig. 3: An example of joint limit avoidance during FABRIK.

    1) Initialize φ ∗ and φcurrent to the lower bound of swivelangle.

    2) Calculate the linkage configuration obtained with theIK solver in Sec. II-B and energy cost in (1).

    3) Increase φcurrent by a threshold (∆ , in our case, 0.1 rad)and calculate IK solution and its energy costs could beobtained.

    4) φ ∗ is updated to φcurrent , if the energy cost from φcurrentis smaller than that of φ ∗.

    5) Repeat step 3) and step 4), until φcurrent reaches theupper bound of swivel angle.

    III. EXPERIMENTSA. System Overview

    We used VR trackers (HTC Vive) to track the postureof human hand in real-time. The avatar structure was ren-dered using Panda3d. The control frequency of the avatarframework is 150 Hz. In experiments, the operator performedvarious arm motions starting from T pose (standing straightwith arms stretched horizontally) in order to set initial swivelangle to zero.

    B. Results

    Figure 4a shows the results of human-like motions ofthe virtual avatar by using the proposed algorithm whenthe operator performed several motions. The postures ofthe avatar was similar to those of the user, thanks to thefeasible arm plane and FABRIK algorithm. Figure 4b isthe result of the obtained φ ∗, during continuous moving.Without a sudden change, the swivel angle is calculated byour proposed algorithm. The video clips of the experimentsin this paper are available at Youtube1.

    IV. CONCLUSIONSIn this paper, the preliminary study of the IK technique

    to imitate human-arm motions is proposed. The approach isbased on FABRIK, an efficient iterative IK solver. The pro-posed algorithm calculates the optimal swivel angle to treatkinematic redundancy by considering kinetic and potentialenergy. Then, each joint position is obtained on the feasiblearm plane by FABRIK solver. To validate effectiveness ofour algorithm, we implemented the proposed framework byusing VR devices and avatar simulator. Future works willfocus on extending the algorithm to imitate whole posture.

    1https://youtu.be/PfxoOjAHuBw.

    (a)

    (b)

    Fig. 4: Result of proposed algorithm, (a) comparison betweenavatar and user, (b) feasible swivel angle during operation.

    REFERENCES[1] G. C. Burdea and P. Coiffet, Virtual reality technology. John Wiley

    & Sons, 2003, vol. 1.[2] J. Lee, J. Chai, P. S. Reitsma, J. K. Hodgins, and N. S. Pollard,

    “Interactive control of avatars animated with human motion data,” inACM Transactions on Graphics (TOG), vol. 21, no. 3. ACM, 2002,pp. 491–500.

    [3] R. Boulic, P. Bécheiraz, L. Emering, and D. Thalmann, “Integrationof motion control techniques for virtual human and avatar real-timeanimation,” in Proceedings of the ACM symposium on Virtual realitysoftware and technology. ACM, 1997, pp. 111–118.

    [4] X. Wu, L. Ma, Z. Chen, and Y. Gao, “A 12-dof analytic inversekinematics solver for human motion control,” Journal of Information& Computational Science, vol. 1, no. 1, pp. 137–141, 2004.

    [5] C. Luciano and P. Banerjee, “Avatar kinematics modeling for telecol-laborative virtual environments,” in Proceedings of the 32nd con-ference on Winter simulation. Society for Computer SimulationInternational, 2000, pp. 1533–1538.

    [6] S. R. Buss, “Introduction to inverse kinematics with jacobian trans-pose, pseudoinverse and damped least squares methods,” IEEE Journalof Robotics and Automation, vol. 17, no. 1-19, p. 16, 2004.

    [7] J. Ren, Z. Zheng, and Z. Jiao, “Simulation of virtual human runningbased on inverse kinematics,” in Education Technology and Computer(ICETC), 2010 2nd International Conference on, vol. 3. IEEE, 2010,pp. V3–360.

    [8] Y. Chua, K. P. Tee, and R. Yan, “Robust optimal inverse kinematicswith self-collision avoidance for a humanoid robot,” in RO-MAN, 2013IEEE. IEEE, 2013, pp. 496–502.

    [9] A. Aristidou and J. Lasenby, “Fabrik: A fast, iterative solver for theinverse kinematics problem,” Graphical Models, vol. 73, no. 5, pp.243–260, 2011.

    [10] A. Aristidou, Y. Chrysanthou, and J. Lasenby, “Extending fabrik withmodel constraints,” Computer Animation and Virtual Worlds, vol. 27,no. 1, pp. 35–57, 2016.

    [11] D. Tolani, A. Goswami, and N. I. Badler, “Real-time inverse kinemat-ics techniques for anthropomorphic limbs,” Graphical models, vol. 62,no. 5, pp. 353–388, 2000.

    [12] M. Kallmann, “Analytical inverse kinematics with body posture con-trol,” Computer animation and virtual worlds, vol. 19, no. 2, pp. 79–91, 2008.

    INTRODUCTIONPROPOSED FRAMEWORKAvatar DefinitionCalculating Joint PositionConverting Joint Position to Joint AngleSelecting Feasible Arm Plane

    EXPERIMENTSSystem OverviewResults

    CONCLUSIONSReferences