human kinematics - gatech.edu

32
Human Kinematics

Upload: others

Post on 24-Jan-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Human Kinematics - gatech.edu

Human Kinematics

Page 2: Human Kinematics - gatech.edu

• Kinematic representation

• Iterative methods

• Optimization methods

Page 3: Human Kinematics - gatech.edu

Kinematics

• Forward kinematics

• given a joint configuration, what is the position of an end point on the structure?

• Inverse kinematics

• given the position for an end point on the structure, what angles do the joints need be to achieve that end point?

Page 4: Human Kinematics - gatech.edu

Kinematics

p

θφ

σ

θ, φ, σ = f(p)

p

θφ

σ

p = f(θ, φ, σ)

Which function is inverse kinematics?

Page 5: Human Kinematics - gatech.edu

Why inverse?

• More intuitive control

• Maintain environment constraints

• Calculate desired joint angles for control

Page 6: Human Kinematics - gatech.edu

Motion representationRotational DOFs are widely used in character animation

3 translational DOFs

48 rotational DOFs

Each joint can have up to 3 DOFs

1 DOF: knee 2 DOF: wrist 3 DOF: arm

Page 7: Human Kinematics - gatech.edu

Joint configurations

θthigh,φthigh,σthigh

θknee

θankle,φankle

x, y, z, �,⇤, ⇥

q = x, y, z, �,⇤, ⇥, �th, ⇤th, ⇥th, �kn, · · ·

Page 8: Human Kinematics - gatech.edu

Constraints

Position constraint

C(q) = h(q) − p = 0

h(q)

p

θthigh,φthigh,σthigh

θknee

θankle,φankle

h(q) = T(x, y, z)R(�,⇤, ⇥)T(d0)R(�th, ⇤th, ⇥th)T(d1)R(�kn)T(d2)R(�an, ⇤an)x

a point on foot in local coordinates

a point on foot in world coordinates

d1

d2

x, y, z, �,⇤, ⇥

d0

Page 9: Human Kinematics - gatech.edu

Solutions

• Closed form solutions can only be found for fairly simple mechanisms

• Numerical solutions

• No solution

• Single solution

• Multiple solution

Page 10: Human Kinematics - gatech.edu

Under-specified problem• Multiple solutions

• Mostly bad

• How do we find the optimal solution?

• Heuristics (move the outermost links first)

• Closest to the current configuration

• Energy minimization

• Natural looking motion (whatever it means)

Page 11: Human Kinematics - gatech.edu

• Kinematic representation

• Iterative methods

• Optimization methods

Page 12: Human Kinematics - gatech.edu

Iterative method

• Use inverse of Jacobian to iteratively step all the joint angles towards the goal

• Girard and Maciejewski, Computational modeling for the computer animation of legged figures, SIGGRAPH 85

Page 13: Human Kinematics - gatech.edu

Jacobian matrix

DOF (n)

Con

stra

int (m

)

∂Ci

∂qj

i

j

Jacobian is a m by n matrix that relates differential changes of to changes ofq C

Jacobian maps the velocity in joint space to velocities in Cartesian space

Jacobian depends on current state

Page 14: Human Kinematics - gatech.edu

IK and the Jacobian

J =

∂C

∂q

∂C = J∂q

∂q = J−1∂C

qnew = q + ∆tJ−1∂C Linearize about current q

Page 15: Human Kinematics - gatech.edu

Invert JacobianBut Jacobian is most likely non-squareCompute the pseudo inverse Jacobian J+

∂C = J∂q

JT∂C = JT J∂q

(JT J)−1JT∂C = (JT J)−1JT J∂q

J+∂C = ∂q

J+ = (JT J)�1JT

Page 16: Human Kinematics - gatech.edu

Under-constrainedWhere #DOFs is greater than #constraints, the problem is under-constrained and JTJ is not invertible

@C@qJ =

@q = JT (JJT )�1@C

Page 17: Human Kinematics - gatech.edu

Problems

• Pseudo inverse returns the least square minimum norm solution

• Singularities cause deficient Jacobian

• Linearization about current state causes error

Page 18: Human Kinematics - gatech.edu

• Kinematic representation

• Iterative methods

• Optimization methods

Page 19: Human Kinematics - gatech.edu

Optimization method

• Find a solution that optimizes some numeric metric and satisfies constraints

• Numeric metric

• A function of q that measures the quantity to be minimized

• Also called “objective function”

Page 20: Human Kinematics - gatech.edu

Optimization method

minq

G(q)

C(q) = 0subject to

Solve for joint configuration q

Page 21: Human Kinematics - gatech.edu

Objective functions

• Joint velocity

• Power consumption

• Similarity to the rest pose

• Similarity to the natural pose

Page 22: Human Kinematics - gatech.edu

Constraint derivatives

• What do we need?

• A direction to move joints in such way that the handles move towards the goal

• What do derivatives tell us?

• A direction where constraint handles move if joints move

h(q)

p

C(q) = h(q) − p = 0

∂C(q)

∂q=

∂h(q)

∂q

Page 23: Human Kinematics - gatech.edu

Constraint derivatives

∂C(q)

∂q=

∂h(q)

∂q

h(q)

p

x, y, z, θ0, φ0, σ0

θ1

θ2, φ2

q = [x, y, z, θ0, φ0, σ0, θ1, θ2, φ2]

C(q) = h(q) − p = 0

Need to know how to compute derivatives for each transformation

∂h(q)

∂θ1

= T(x, y, z)R(θ0, φ0, σ0)T∂R(θ1)

∂θ1

TR(θ2, φ2)hk

h(q) = T(x, y, z)R(θ0, φ0, σ0)TR(θ1)TR(θ2, φ2)hk

hk : local coordinate of h

Page 24: Human Kinematics - gatech.edu

Constraint derivatives

h(q)

p

x, y, z, θ0, φ0, σ0

θ1

θ2, φ2

hk : local coordinate of h

What is the most efficient way to compute the ?∂h(q)

∂q

h = T0(x, y, z)R0(θ0, φ0, σ0)T1R1(θ1)T2R2(θ2, φ2)hk

Compute the gradient for the DOF on the outermost link first

Page 25: Human Kinematics - gatech.edu

Unconstrained optimization

• Treat each constraint as a separate metric and minimize weighted sum of all metrics

• Also called penalty methods

• each spring pulls on constraint with force proportional to violation of the constraint

Page 26: Human Kinematics - gatech.edu

Unconstrained optimization

Minimize F (q) = G(q) +∑

i

wiCi(q)2

Move in the direction of

∂F

∂q= −

∂G

∂q− 2

i

wi

∂Ci

∂qCi

Update the state qnew = q − α∂F

∂q

Page 27: Human Kinematics - gatech.edu

compute

update

while F (q) > ✏

q = q� ↵@F

@q

Optimization loop

@F

@q=

@G(q)@q

+ 2X

i

wi(@Ci

@q)T Ci

Page 28: Human Kinematics - gatech.edu

Search and stepFind direction and the step size that move joints closer to constraints

Step size: where minα

F (q + α∆q)α

Direction: ∆q = −

∂F

∂q

qnew = q + α∆q

Page 29: Human Kinematics - gatech.edu

Unconstrained optimization

• Pros:

• simple and fast, no linear system to solve

• near-singular configurations is less of a problem

• Cons:

• can’t maintain constraints exactly

• constraints fight against each other and the objective function

Page 30: Human Kinematics - gatech.edu

Constrained optimization• Treat constraints as “hard constraints”

• Use Lagrangian formulation to solve a nonlinear optimization

L(q, λ) = G(q) − λ · C

minq,λ

L(q, λ)

Page 31: Human Kinematics - gatech.edu

Constrained method

• Pros

• Enforce constraints exactly

• Quadratic convergence

• Cons

• Large system of equations

• Near-singular configurations cause instability

Page 32: Human Kinematics - gatech.edu

• Read: Computational Modeling for Computer Generation of Legged Figures by Girard and Maciejewski, Siggraph 85

• Read: Style-based Inverse Kinematics by Grochow et. al., Siggraph 04