|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.animation.AnalyticalIKSolver
public class AnalyticalIKSolver
IK calculations for a 7 DOF Joint construction (e.g. arm/leg) Loosely based on the IKAN toolkit: Tolani, Deepak, Goswami, Ambarish and Badler, Norman I., Real-time inverse kinematics techniques for anthropomorphic limbs (2000), in: Graphical Models and Image Processing, 62:5(353--388) Given matrices G, S, T solves the equation G = S*Rx*T*R1 for R1,Rx where R1 represent general rotation matrices Ry represents a rotation about the y axis and G is the desired goal matrix S, T are constant matrices In the case of the arm: S : Wrist to Elbow transformation Rx : Elbow joint T : Elbow to Shoulder transformation R1 : Shoulder joints This method assumes a close to HAnim resting pose
| Nested Class Summary | |
|---|---|
static class |
AnalyticalIKSolver.LimbPosition
|
| Field Summary | |
|---|---|
private float[] |
a
|
private float[] |
aRot
|
private float[] |
axis
|
private float[] |
backAxis
|
private float[] |
C
|
private static double |
DOT_MARGIN
|
private float[] |
e
|
private float[] |
elbowRotAxis
|
private float |
elbowStartRotation
|
private float[] |
eNorm
|
private float[] |
forward
|
private float[] |
goal
|
(package private) float |
l1
|
(package private) float |
l2
|
static int |
LEFT
|
private AnalyticalIKSolver.LimbPosition |
limbPosition
|
private float[] |
n
|
private float[] |
planeNormal
|
private boolean |
project
|
private float |
projectionLength
|
private float |
R
|
private float[] |
R1
|
static int |
RIGHT
|
private static double |
ROT_MARGIN
|
private float[] |
Rx
|
private float[] |
sewT
|
private float[] |
Sv
|
private double |
swivel
|
private float[] |
tempv
|
private float[] |
Tv
|
private float[] |
u
|
private float[] |
v
|
private float[] |
w
|
private float[] |
WH
|
private float[] |
x
|
private float[] |
y
|
private float[] |
z
|
| Constructor Summary | |
|---|---|
AnalyticalIKSolver(float[] Sv,
float[] Tv,
AnalyticalIKSolver.LimbPosition lp)
Constructor |
|
AnalyticalIKSolver(float[] Sv,
float[] Tv,
AnalyticalIKSolver.LimbPosition limbPosition,
float projectionLength)
Constructor, creates a IK system with projection enabled |
|
| Method Summary | |
|---|---|
float[] |
getA()
|
float[] |
getC()
|
double |
getR()
|
float[] |
getR1()
|
float[] |
getRx()
|
double |
getSwivel(float[] e,
float[] g)
Calculate the swivel angle, given an elbow/wrist position and a goal |
void |
setProject(boolean proj)
Project onto local sphere? |
void |
setProjectionLength(float length)
Set the length (=radius of projection sphere) |
void |
setSwivel(double swivel)
set the swivel angle |
void |
solve(float[] goal,
float[] qSho,
float[] qElb)
Solves the joint configurations for a goal and the current end effector |
boolean |
solveIt(float[] g)
Solve the elbow and shoulder rotations for a certain rotation goal |
private boolean |
solveRy(double L1,
double L2,
double L3)
Find the elbow rotation |
static void |
translateToLocalSystem(VJoint obj1,
VJoint obj2,
float[] src,
float[] dst)
Translates a vector src in obj1-coordinates to the local coordinate system for a visual object obj2, excluding obj2's rotation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private float[] Sv
private float[] Tv
private float[] WH
private float[] Rx
private float[] R1
public static final int LEFT
public static final int RIGHT
private double swivel
private float projectionLength
private boolean project
private float[] sewT
private float R
private float elbowStartRotation
private float[] C
private float[] goal
private float[] a
private float[] elbowRotAxis
private AnalyticalIKSolver.LimbPosition limbPosition
private static final double ROT_MARGIN
private static final double DOT_MARGIN
float l1
float l2
private float[] x
private float[] y
private float[] z
private float[] w
private float[] n
private float[] e
private float[] tempv
private float[] forward
private float[] axis
private float[] backAxis
private float[] planeNormal
private float[] aRot
private float[] eNorm
private float[] u
private float[] v
| Constructor Detail |
|---|
public AnalyticalIKSolver(float[] Sv,
float[] Tv,
AnalyticalIKSolver.LimbPosition lp)
Sv - wrist to elbow vector in the shoulder coordinate systemTv - elbow to shoulder vector in the shoulder coordinate systemlp - arm or leg
public AnalyticalIKSolver(float[] Sv,
float[] Tv,
AnalyticalIKSolver.LimbPosition limbPosition,
float projectionLength)
Sv - wrist to elbow vectorTv - elbow to shoulder vectorlimbPosition - arm or legprojectionLength - | Method Detail |
|---|
public void setSwivel(double swivel)
swivel - the new swivel angle
public void solve(float[] goal,
float[] qSho,
float[] qElb)
goal - goal positionqSho - quaternion rotation around shoulder(-like) jointqElb - quaternion rotation around elbow(-like) joint
public double getSwivel(float[] e,
float[] g)
e - elbow/wrist position in shoulder/hip coordinatesg - the goal position
public boolean solveIt(float[] g)
g - the goal wrist position
private boolean solveRy(double L1,
double L2,
double L3)
public float[] getR1()
public float[] getRx()
public float[] getC()
public double getR()
public float[] getA()
public void setProject(boolean proj)
proj - new project valuepublic void setProjectionLength(float length)
length - the new projection length
public static void translateToLocalSystem(VJoint obj1,
VJoint obj2,
float[] src,
float[] dst)
obj1 - the visual object in which the src coordinates are definedobj2 - the visual object in which the dst coordinates should be definedsrc - the vector in world coordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||