Class PseudoinverseIK

  extended by shady.common.multi.chain.ChainIK
      extended by shady.common.multi.chain.PseudoinverseIK

public class PseudoinverseIK
extends ChainIK

Jacobian Pseudoinverse 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 the Jacobian pseudoinverse.

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.

Marsette (Marty) A. Vona, III

Field Summary
private static java.lang.String cvsid
          CVS id.
static boolean DEBUG
          Whether to debug.
Fields inherited from class shady.common.multi.chain.ChainIK
blockEndToChainEnd, blockStartToEnd, blockStartToEndWithDelta, chainEnd, chainEndToWorld, chainEndToWorldWithDelta, chainStart, DEBUG_ITERATION, DEFAULT_DOF_DELTA_CLAMP, DEFAULT_TARGET_CLAMP, dofDelta, dofDeltaClamp, dt, dx, dy, jacobian, JACOBIAN_DELTA, n, sentinel, targetClamp, worldToBlockStart, worldToChainEnd, worldToChainEndWithDelta
Constructor Summary
PseudoinverseIK(Block chainEnd)
          Construct a new PseudoinverseIK 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


private static final java.lang.String cvsid

CVS id.

See Also:
Constant Field Values


public static final boolean DEBUG

Whether to debug.

See Also:
Constant Field Values
Constructor Detail


public PseudoinverseIK(Block chainEnd)

Construct a new PseudoinverseIK for a chain.

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


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 ChainIK.dofDelta = J^(-1)e.

Specified by:
computeDOFDelta in class ChainIK
iteration - iteration number