Inverse Kinematics for Control of Humanoid Robot Gaze

Johnathan Lyon

CSE 557 AUT 2009 Final Project


Project Summary

    Essentially this project is about getting a robot to move according to a target position and target normal, without the need for specifying individual joint angles. This is Inverse Kinematics (IK), finding the parameters that fit the target motion. For this project my goal was to build an implementation so that not only could I become familiar with IK, but that I would be able to apply the findings toward control of a robots gaze for a project for a robotic goal inference I'm currently working on.



Implementation Description

    In order to investigate IK concepts I expanded our pre-existing animation system (from Project 3) to build a testing area for implementation a simulated control scenario. I began with studies using a segmented snake that had 2 DOF at each joint (pan & tilt). I began with unconstrained target tracking and moved towards the goal of a constrained robot model, designed to the specifications of the Fujitsu HOAP-2 Humanoid Robot.



    In the above image you see the 6-segment snake, roosted on the brown box. At the head of the snake is a cyan cube with a yellow normal indicator. We call the center of the cyan cube the "model position". Similarly, the target is a red cube with a green normal indicator.



GENERAL EQUATIONS


In this instance, the IK problem is that we are given a set of parameters to specify, q, and an energy function, E(q), which to find the q to minimize:

where q* is the optimal parameters


We iteratively search the space of q's, subject to some hard constraints, along the gradient with respect to the change of energy function dependent on the change of our parameters:

where (Delta) is the convergence rate.



SIMULATION PARAMETERS:


Target (X,Y,Z) Pos:

These specify the target position in the 3D space.

Target (Tilt,Pan):

These specify the target normal direction.

Maximum IK Iterations:

specifies the maximum search steps performed to find a minimizing parameter set.

Position vs. Normal Weight:

specifies the amount of preference for either position or normal as a target to minimize.

Convergence Rate:

specifies the delta parameter of the IK iteration

Maximum Joint Movement:

specifies a constraint that no joint may move more than during a single frame.


Step One: Follow the RED Cube

The initial goal was to get the snake to follow the red cube. This was eventually done using the energy function:



where is the target position and is the model position as a function of q.

This leads us to:



where , the Jacobian of model position with respect to the parameters, q.

Once up and running this worked quite well. Because there was no constraint on jerking into position, there was a lot of stuttering across frames, but overall it performed the tracking part quite well. The one comment I would say about this though is this is where I started to notice the lower joints where not being used enough, which tended to lead to the model getting stuck or to jerky motion.

Step Two: Get NORMAL

Next step was to specify normal tracking the energy function. I did this by adding a term to maximize the component of the model normal in the direction of the target normal:



where is the target normal and is the model normal as a function of q.

This leads us to:



with

where as the model position moved slightly along the model normal direction, and TRANS is that corresponding affine transformation to achieve that adjustment along the normal.

This version did not seem to work well so constant weights were specified:



The weights allowed me both to independently check the performance of the normal tracking, but to find a tuning that solved both tasks well. This added parameter needed to be tweaked often, mainly as a result of the still jerky motion and kinking, and as the preference favored the normal tracking more, this required a higher convergence rate to find good solutions. Independently, however, the normal tracking worked well (not quite as robust as with the position tracking), especially after a bit of tuning the convergence parameters.

Step Three: Act Naturally

For this step the goal was to make the model move more smoothly and to mitigate some of the kinking problems. I tried a different things and the only one that seemed to work really we was to use hard constraints on the single frame deviation in joint angle for each joint independently, further I allowed this to be a tuneable parameter for the application. If a joint moved too much during a portion of the iteration, it was kicked back to its state at the beginning of the iteration, and the process continued on. This immediately curbed the jerky motion, and also had the secondary effect of keeping the model from kinking to much. Another added benefit was, since I was resetting each joint independently, it allowed the search to "jump" to a different path and search a wider breadth of the search space, at the cost of fine-tuning near illegal regions. Overall this seemed to be much favorable to the previous lack, however, it would probably be better design to soften this constraint in order to keep from neglecting the fine tuning of an optimal state that may be near illegal confirmation spaces.


Step Four: Make Me Inhuman




The final step I completed for this project was an implementation in reference to the HOAP-2 model. I designed my model to the scale of the HOAP-2, with the simplification that I treated the legs as a single centered unit. Just as I had done with the frame-to-frame joint deviation angles, I added constraints to the joints, a max and min angle for each, that if pushed beyond in the optimization iteration, that joint would independently reset to its state at the beginning of the frame. Again, if used further, it would be best to soften these to make sure we are taking all search paths to their full extent. Even with more constraints, the simulation worked just as well as the snake, with the obvious caveat that there were far less solution spaces within the allowed trajectories for the target cube. One very standout observation, that again the lower extremeties did not seem to be used optimally, as was the same in the snake simulations. Because of this the model moves into very precarious positions, were in reality it would topple off balance. One idea to combat this would be to generate a constraint based on the center of mass, which would hopefully encourage a more biomechanic sense of balance, i.e. using the knees to view low objects...


References

:: UW CSE 558 course lecture slides on IK, Zoran Popovic, 2000-2002.

:: HOAP-2 Instruction Manual, 3rd Edition, Fujitsu Corporation, accessed 2009.

Special Thanks to both Zoran Popovic and Brian Curless for their help!