shady.common.multi.chain
Class TransposeIK

java.lang.Object
  extended by shady.common.multi.chain.ChainIK
      extended by shady.common.multi.chain.TransposeIK

public class TransposeIK
extends ChainIK

Jacobian Transpose Inverse Kinematics for a MultiShady chain.

Following Introduction to Inverse Kinematics with Jacobian Transpose, Pseudoinverse and Damped Least Squares Methods by Samuel R. Buss, unpublished, 2004, this method computes ChainIK.dofDelta by transforming the target error vector e = (ChainIK.dx, ChainIK.dy, ChainIK.dt) through a scaled trasnspose of the Jacobian, J'. The scaling factor, alpha, is computed as described in the paper to minimize the error vector after the update.

Copyright (C) 2006 Marsette A. Vona, III

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Author:
Marsette (Marty) A. Vona, III

Field Summary
private static java.lang.String cvsid
          CVS id.
static boolean DEBUG
          Whether to debug.
static int DEBUG_ITERATION
          Iteration modulus at which to debug, if DEBUG.
protected  double[][] J
          Local reference to the Jacobian array.
protected  double[] JJTe
          [3 x 1] JJ'e.
protected  double[] JTe
          [n x 1] J'e.
 
Fields inherited from class shady.common.multi.chain.ChainIK
blockEndToChainEnd, blockStartToEnd, blockStartToEndWithDelta, chainEnd, chainEndToWorld, chainEndToWorldWithDelta, chainStart, DEFAULT_DOF_DELTA_CLAMP, DEFAULT_TARGET_CLAMP, dofDelta, dofDeltaClamp, dt, dx, dy, jacobian, JACOBIAN_DELTA, n, sentinel, targetClamp, worldToBlockStart, worldToChainEnd, worldToChainEndWithDelta
 
Constructor Summary
TransposeIK(Block chainEnd)
          Construct a new TransposeIK for a chain.
 
Method Summary
protected  void computeDOFDelta(int iteration)
          Subclasses must implement this to compute ChainIK.dofDelta vector from current ChainIK.jacobian and vector to target (ChainIK.dx, ChainIK.dy, ChainIK.dt).
 
Methods inherited from class shady.common.multi.chain.ChainIK
clampDOFDelta, clampDOFDeltaMagnitude, clampTarget, clampTargetMagnitude, closeEnough, gotoTarget, updateJacobian
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsid

private static final java.lang.String cvsid

CVS id.

See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG

Whether to debug.

See Also:
Constant Field Values

DEBUG_ITERATION

public static final int DEBUG_ITERATION

Iteration modulus at which to debug, if DEBUG.

See Also:
Constant Field Values

J

protected double[][] J

Local reference to the Jacobian array.


JTe

protected double[] JTe

[n x 1] J'e.


JJTe

protected double[] JJTe

[3 x 1] JJ'e.

Constructor Detail

TransposeIK

public TransposeIK(Block chainEnd)

Construct a new TransposeIK for a chain.

Parameters:
chainEnd - the end of the chain to control, not null. Note that the actual chain may be longer, but IK control will only be applied to (non-locked) blocks at or before chainEnd.
Method Detail

computeDOFDelta

protected void computeDOFDelta(int iteration)

Subclasses must implement this to compute ChainIK.dofDelta vector from current ChainIK.jacobian and vector to target (ChainIK.dx, ChainIK.dy, ChainIK.dt).

This is the main IK step.

Following [Buss] this impl computes

Specified by:
computeDOFDelta in class ChainIK
Parameters:
iteration - iteration number