|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshady.common.multi.chain.ChainIK
shady.common.multi.chain.DLSIK
public class DLSIK
Damped Least Squares 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 matrix
J'(JJ'+lambda^2I)^(-1), where lambda is a non-zero damping constant.
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.
| Field Summary | |
|---|---|
private static java.lang.String |
cvsid
CVS id. |
static boolean |
DEBUG
Whether to debug. |
static double |
DEFAULT_LAMBDA
Default damping constant. |
protected Jama.Matrix |
e
The error vector. |
protected double[][] |
E
The error vector matrix. |
protected double[][] |
J
Local reference to the Jacobian array. |
protected double[][] |
JJTL2I
Reference to JJTPlusLambda2I's array. |
protected Jama.Matrix |
JJTPlusLambda2I
[3 x 3] JJ'+lambda^2I. |
static double |
lambda
Damping constant. |
| 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 | |
|---|---|
DLSIK(Block chainEnd)
Construct a new DLSIK 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 (. |
| 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.
public static final boolean DEBUG
Whether to debug.
public static final double DEFAULT_LAMBDA
Default damping constant.
protected double[][] J
Local reference to the Jacobian array.
protected Jama.Matrix JJTPlusLambda2I
[3 x 3] JJ'+lambda^2I.
protected double[][] JJTL2I
Reference to JJTPlusLambda2I's array.
protected Jama.Matrix e
The error vector.
protected double[][] E
The error vector matrix.
public static double lambda
Damping constant.
| Constructor Detail |
|---|
public DLSIK(Block chainEnd)
Construct a new DLSIK 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
JJTPlusLambda2If = eChainIK.dofDelta = J'f
computeDOFDelta in class ChainIKiteration - iteration number
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||