Skeletal Motion, Inverse Kinematics

Slides:



Advertisements
Similar presentations
Jason Clark Inverse Kinematics Jason Clark
Advertisements

COMP Robotics: An Introduction
Inverse Kinematics Professor Nicola Ferrier ME 2246,
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Forward and Inverse Kinematics CSE 3541 Matt Boggus.
Solving Linear Systems (Numerical Recipes, Chap 2)
Inverse Kinematics Set goal configuration of end effector
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
1Notes  Handing assignment 0 back (at the front of the room)  Read the newsgroup!  Planning to put 16mm films on the web soon (possibly tomorrow)
1Notes  Assignment 0 marks should be ready by tonight (hand back in class on Monday)
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
Motion Analysis (contd.) Slides are from RPI Registration Class.
Character Animation CSE 191A: Seminar on Video Game Programming Lecture 5: Character Animation UCSD, Spring, 2003 Instructor: Steve Rotenberg.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
IK: Choose these angles!
3D orientation.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi Most slides courtesy.
Forward Kinematics.
Kinematics. ILE5030 Computer Animation and Special Effects2 Kinematics The branch of mechanics concerned with the motions of objects without regard to.
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
CSCE 689: Forward Kinematics and Inverse Kinematics
Rotation and Orientation: Affine Combination Jehee Lee Seoul National University.
Inverse Kinematics Jacobian Matrix Trajectory Planning
1cs426-winter-2008 Notes  SIGGRAPH crunch time - my apologies :-)
Introduction to ROBOTICS
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
Advanced Graphics (and Animation) Spring 2002
Definition of an Industrial Robot
February 21, 2000Robotics 1 Copyright Martin P. Aalund, Ph.D. Computational Considerations.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chap 5 Kinematic Linkages
Key Frame Animation and Inverse Kinematics
Lecture 2: Introduction to Concepts in Robotics
Inverse Kinematics.
Simulation and Animation
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
Robotics Chapter 5 – Path and Trajectory Planning
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Inverting the Jacobian and Manipulability
Review: Differential Kinematics
CS-378: Game Technology Lecture #13: Animation Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Kinematic Redundancy A manipulator may have more DOFs than are necessary to control a desired variable What do you do w/ the extra DOFs? However, even.
1cs426-winter-2008 Notes  Will add references to splines on web page.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
COMP322/S2000/L111 Inverse Kinematics Given the tool configuration (orientation R w and position p w ) in the world coordinate within the work envelope,
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Fundamentals of Computer Animation
Robotics Chapter 3 – Forward Kinematics
Velocity Propagation Between Robot Links 3/4 Instructor: Jacob Rosen Advanced Robotic - MAE 263D - Department of Mechanical & Aerospace Engineering - UCLA.
CSCE 441: Computer Graphics Forward/Inverse kinematics
IK: Choose these angles!
IK: Choose these angles!
Trajectory Generation
Character Animation Forward and Inverse Kinematics
CPSC 641: Computer Graphics Rotation Representation and Interpolation
Inverse Manipulator Kinematics
INVERSE MANIPULATOR KINEMATICS
Mobile Robot Kinematics
CSCE 441: Computer Graphics Forward/Inverse kinematics
Manipulator Dynamics 2 Instructor: Jacob Rosen
Computer Animation Algorithms and Techniques
Outline: 5.1 INTRODUCTION
KINEMATIC CHAINS & ROBOTS (I)
Computer Graphics Lecture 15.
Rotation and Orientation: Affine Combination
Chapter 4 . Trajectory planning and Inverse kinematics
Robotics 1 Copyright Martin P. Aalund, Ph.D.
Presentation transcript:

Skeletal Motion, Inverse Kinematics Ladislav Kavan kavanl@cs.tcd.ie http://isg.cs.tcd.ie/kavanl/IET

Animating Skeleton Character animation decomposed to skinning (skin deformation) previous lesson animation of the skeleton this lesson We consider only rotational joints n ... the number of joints joint rotations described by matrices T(0), ..., T(n) The task: Acquire T(0), ..., T(n) for each frame of the animation Ladislav Kavan

Summary of Animation Methods direct control of rotations (forward kinematics) tedious work - only key postures designed others computed automatically indirect control: inverse kinematics specify a goal, rotations computed automatically more intuitive to use motion capture records a real motion difficult to control (but possible!) forward dynamics physics engines Ladislav Kavan

Keyframe Animation very old concept (Disney's studios) Idea: specify only important (key) frames others given by interpolation of key frames Anything can be controlled via keyframes (not only rotation of joints) variety of interpolation curves piecewise constant, linear, polynomial (spline) For rotation: good interpolation of rotations essential! SLERP (recall quaternions) SQUAD (Spherical QUADratic interpolation) Ladislav Kavan

Forward Kinematics (FK) used for keyframe design originated in robotics kinematic chain: a chain (path) of joints base: the fixed part of a kinematic chain end-effector: the moving part of a kinematic chain Assume (wlog): each joint rotates only about one fixed axis (... only 1-DOF) Replace the 3-DOF joints by three 1-DOF joints (with the same origin) Ladislav Kavan

Forward Kinematics (FK) Input: state vector  = (1, ..., k)T - joint rotations k is the number of DOFs of the kinematic chain Task: compute position (and orientation) of the end-effector: x = f() only position: 3-DOF end-effector, xR3 position and orientation: 6-DOF, xR6 first three coordinates: translation second three coordinates: rotation in scaled axis representation (unit axis multiplied by angle of rotation) Solution: f is concatenation of transformations computed in the part about skinning: matrix F Ladislav Kavan

Inverse Kinematics (IK) Input: the end-effector (goal) x is given typically 3 to 6-DOFs Task: compute state vector  = (1, ..., k)T such that f() = x, i.e.  = f-1(x) Problems: sometimes no solution (example?) solution may not be defined uniquely (example?) infinite number of solutions (example?) f is non-linear because of the sin and cos in rotations Ladislav Kavan

IK: Analytical Solution Idea: solve the system of equations f() = x for  very difficult for longer kinematic chains used only for 6/7-DOF manipulators usually the fastest method (if possible) Example: Human Arm Like (HAL) chain 7 DOFs: 3 shoulder, 1 elbow, 3 wrist fast analytic solution for given position and orientation - IKAN library 1 DOF remains: parametric solution the parameter is a "swivel angle" Ladislav Kavan

IK: Non-linear Optimization Idea: minimize function E() = f() - x solved by non-linear optimization (programming) Advantages easy to incorporate joint limits add conditions li  i  hi, where li and hi are the limits allows more general goals (planar, half-space, ...) Disadvantages non-linear optimization can give a local minimum (instead of the global one) slow for real-time applications Ladislav Kavan

IK: Numerical Solutions Solve the problem for velocities (small displacements) local approximation of f by linear function - called Jacobian k ... number of joints (DOFs) d ... dimension of goal (end-effector, usually 3-6) Ladislav Kavan

IK: Jacobian Methods Typically: d=6 and f = (Px, Py, Pz, Ox, Oy, Oz) (Px, Py, Pz) ... position (Ox, Oy, Oz) ... scaled rotation axis Then Ji, the i-th column of Jacobian is computed as where i is the axis or rotation of the i-th joint ri is the end-effector vector w.r.t. the i-th joint Ladislav Kavan

IK: Jacobian Inversion Original equation: x = f() Using Jacobian:  x = J()  Jacobian maps small  changes to small x changes Assume the Jacobian can be inverted:  = J()-1x IK algorithm Input: current posture , goal xg, current end-effector position xc Repeat until xc close to xg: x = k(xg - xc) // k ... small constant compute J()-1  =  + J()-1 x xc = f() Ladislav Kavan

IK: Jacobian Inversion Problems with inversion of J(): J() rectangular (square only if k=d) J() singular (rank-defficient) Ad 1) (Moore-Penrose) pseudo-inversion compute from Singular Value Decomposition (SVD) Ad 2) serious problem: configuration  singular Example: fully outstretched kinematic chain near singularity: large velocities & oscilation SVD detects singularity Ladislav Kavan

Singular Value Decomposition (SVD) Theorem: Any real mn matrix M can be written out as M = UDVT, where U ... mn with orthonormal columns D ... nn diagonal (singular values) V ... mm orthonormal Properties: M regular iff D contains no zeroes if Di is D with non-zero elements inverted, then UDiVT is the pseudo-inverse matrix efficient and robust algorithms for SVD exist implemented for example in LAPACK Ladislav Kavan

IK: Jacobian Transpose Idea: force acts on the end-effector and pushes it to the goal configuration Principle of virtual work: work = force  distance, work = torque  angle FTx =T (work = work) x = J() (Jacobian approximation) FT J() =T (putting together) FT J()=T  = J()TF (transposing) Ladislav Kavan

IK: Jacobian Transpose Instead of  = J()-1x use simply  = J()Tx interpret  as , and F as x The algorithm: the same as Jacobian Inverse, just use transpose instead of inversion Comparison with the Jacobian Inverse: (pseudo-)inversion more accurate - less iterations transposition faster to compute transposition: physically based intuitive control (rubber band) Ladislav Kavan

IK: Cyclic Coordinate Descent (CCD) Idea: change only one joint angle i per step others constant: analytical solution possible Input: Pc - current end-effector position Pg - goal end-effector position (u1c, u2c, u3c) - orthonormal matrix: curr. orientation (u1g, u2g, u3g) - orthonormal matrix: goal orientation Objective: minimize Ladislav Kavan

IK: Cyclic Coordinate Descent (CCD) IK: Cy In the i-th step: 1, ..., i-1, i+1..., k constant Minimize E() = E(1, ..., k) only w.r.t. i Pic - current end-effector position w.r.t. joint i Pig - goal end-effector position w.r.t. joint i Pic'(i) - Pic rotated about joint i's axis with angle i Minimization of w.r.t. i equivalent to Maximization of g1(i) = Ladislav Kavan

IK: Cyclic Coordinate Descent (CCD) (u1c'(i), u2c'(i), u3c'(i)) orthonormal matrix of the current orientation rotated by angle i about the i-th joint's axis Minimization of w.r.t. i equiv. to Maximization of Position and rotation together: g(i) = wpg1(i) + wog2(i) wp resp. wo is weight of position resp. orientation goal Ladislav Kavan

IK: Cyclic Coordinate Descent (CCD) The function g(i) can be maximized analytically (complicated formulas, but fast to evaluate) CCD Algorithm: i = 1; Repeat until E() close to zero: compute i giving maximal g(i) i = (i % k) + 1 CCD has no problems with singularities converges well in practice Ladislav Kavan

IK: Modern Trends Character animation: joint limits important First idea: impose limits on individual DOFs (angles) too simple to express real joint range Advanced joint limits quaternion field boundaries: human motion recorded using motion-capture rotations of joint (shoulder) converted to quaternions boundaries expressed on unit quaternion sphere Ladislav Kavan