Key Frame Animation and Inverse Kinematics

Slides:



Advertisements
Similar presentations
Inverse Kinematics Professor Nicola Ferrier ME 2246,
Advertisements

Links and Joints.
John C. Hart CS 318 Interactive Computer Graphics
Manipulator’s Inverse kinematics
CS B659: Principles of Intelligent Robot Motion Rigid Transformations.
Kinematics & Grasping Need to know: Representing mechanism geometry Standard configurations Degrees of freedom Grippers and graspability conditions Goal.
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.
Trajectory Generation
Computer graphics & visualization Key frame Interpolation.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
1Notes  Assignment 0 marks should be ready by tonight (hand back in class on Monday)
Introduction to Robotics
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
Ch. 7: Dynamics.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
Ch. 3: Forward and Inverse Kinematics
Ch. 4: Velocity Kinematics
3D orientation.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi Most slides courtesy.
Ch. 3: Forward and Inverse 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.
ME Robotics DIFFERENTIAL KINEMATICS Purpose: The purpose of this chapter is to introduce you to robot motion. Differential forms of the homogeneous.
CSCE 689: Forward Kinematics and Inverse Kinematics
Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Inverse Kinematics Jacobian Matrix Trajectory Planning
Introduction to ROBOTICS
An Introduction to Robot Kinematics
More details and examples on robot arms and kinematics
Advanced Graphics (and Animation) Spring 2002
Definition of an Industrial Robot
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chap 5 Kinematic Linkages
Manipulator Motion (Jacobians) Professor Nicola Ferrier ME 2246,
Inverse Kinematics.
Simulation and Animation
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
1 Fundamentals of Robotics Linking perception to action 2. Motion of Rigid Bodies 南台科技大學電機工程系謝銘原.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
CS 551/645 Fall 2000 Parameterized Rotations, Curves, and Surfaces.
What is Kinematics. Kinematics studies the motion of bodies.
Just a quick reminder with another example
Trajectory Generation
CS 551/651 Advanced Graphics Technical Background.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
Fundamentals of Computer Animation
Kinematics 제어시스템 이론 및 실습 조현우
CSCE 441: Computer Graphics Forward/Inverse kinematics
Trajectory Generation
Character Animation Forward and Inverse Kinematics
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
Computer Animation cgvr.korea.ac.kr.
CHAPTER 2 FORWARD KINEMATIC 1.
Mobile Robot Kinematics
CSE4421/5324: Introduction to Robotics
CSCE 441: Computer Graphics Forward/Inverse kinematics
Skeletal Motion, Inverse Kinematics
VIRTUAL ENVIRONMENT.
Chapter 4 . Trajectory planning and Inverse kinematics
Presentation transcript:

Key Frame Animation and Inverse Kinematics

Introduction Key frame animation requires an artist to build a character in various poses Each pose is called a key frame Each key frame changes the local positions and local orientations of the nodes in the hierarchy To animate the character, the poses at the times between key frames are computed using interpolation. Character Models are rich, complex hair, clothes (particle systems), muscles, skin (FFD’s etc.) Focus is rigid-body, joint angles

Key-frame animation Kinematics: how the positions of the parts vary as a function of the joint angles. Dynamics: how the positions of the parts vary as a function of applied forces. Each joint specified at various key frames (not necessarily the same as other joints) System does interpolation or in-betweening Doing this well requires: A way of smoothly interpolating key frames: splines A good interactive system A lot of skill on the part of the animator

Key-frame animation To specify a pose, we specify the joint-angle rotations Each joint can have up to three rotational DOFs Kinematics: how the positions of the parts vary as a function of the joint angles. 1 DOF: knee 2 DOF: wrist 3 DOF: arm

Key-frame animation Links and Joints An articulated figure is a construction made of links and joints. A link can be thought of as a solid rod. A joint can be thought of as a connection between two neighboring links. A joint might have several degrees of freedom, i.e., it might rotate around one, two, or three axes, or it might translate along one, two, or three axes Links and joints can be numbered from 1, …,N

Key-frame animation Paired Joints Coordinates An articulated figure can be described using the pared joint coordinates method [R. Featherstone, Robot Dynamics Algorithms,1998] For each link three coordinate systems are associated: Body frame (BFi), associated with the center of mass of linki Inner frame (IFi), associated with jointi Outer frame (OFi), associated with jointi+1

BFiTIFi = TIFi (rIFi) RIFi (IFi,uIFi) Key-frame animation The Transformation BFiTIFi The problem is: given a point p = [x,y,z]T in inner frame coordinates, determine its coordinates in the body frame. In homogeneous coordinates the transformation from the inner frame to the body frame is given by a matrix BFiTIFi = TIFi (rIFi) RIFi (IFi,uIFi) The translation and rotation matrices are as follows TIFi (rIFi) = RIFi (IFi,uIFi) = where the symbol 1 denotes a 3x3 identity matrix, and the vectors IIFi, jIFi, kIFi,and 0 are 3x1 column vectors

Forward and Inverse Kinematics Euler angles - An Euler angle is a rotation about a single Cartesian axis - Create multi-DOF rotations by concatenating Eulers Singularities in Euler Angles - Cannot be avoided (occur at 0° or 90°) - Difficult to work around What is a singularity? - continuous subspace of parameter space all of whose elements map to same rotation Why is this bad? - induces gumball lock - two or more axes align, results in loss of rotational DOFs (i.e. derivatives)

Forward and Inverse Kinematics Kinematics is the study of motion without considerations of mass or forces. Given a planar polyline consisting of a sequence of line segments, with each segment starting at Pi, having a unit-length direction Ui, and length Li for 0  i < n, and last segment terminating at Pn The forward kinematics problem is to compute Pn in terms of the known direction vectors and lengths

Forward and Inverse Kinematics The final point of each segment is related to its starting point by Pi = Pi + Li Ui for 0  i < n. Summing over all i and canceling the common terms leads to the end effector formula Pn = Pn + Li Ui Each direction vector can be viewed as an incremental rotation of the previous direction Ui = (cos( j), sin( j)).

Pn()= P0 + Li(cos( j),sin( j)). Inverse Kinematics The angles i are called the joint angles of the manipulator. Using notation  = (0, …, n-1), the end effector can be written as a function Pn()= P0 + Li(cos( j),sin( j)). The inverse kinematics problem is to select the position G for the end effector and determine joint angles so  that Pn() = G. The point G is called the goal and might not always be attainable.

Inverse Kinematics Numerical Solution by Jacobian Methods Closed-form solutions are usually not possible and numerical methods are better choice for attempting to find solutions Consider a manipulator that is a polyline with a single end effector.

Inverse Kinematics Numerical Solution by Jacobian Methods Let the end effector be written as P = F() The derivative of the end effector position with respect to each joint parameter be used to determine an incremental step in joint space that will (hopefully) move the end effector closer to the goal. If the position of the end effector is a function of time t, the derivatives are dP/dt = DFd/dt DF is the Jacobian of F, the matrix of first-order partial derivatives

G – P = G - F() as an approximation, Inverse Kinematics Numerical Solution by Jacobian Methods If G is the goal and if dP/dt is replaced by G – P = G - F() as an approximation, then the numerical method is to use G - F() = DF()d/dt to update  from its current value. The Jacobian matrix is (usually) not square, so its inverse is not defined.

d/dt = DF+()(G - F()) Inverse Kinematics Numerical Solution by Jacobian Methods Given a nonsquare matrix M, its pseudoinverse is defined to be M+ =Mt (MM t) -1, where M+M = I, the identity matrix. Applying the pseudoinverse of the Jacobian yields d/dt = DF+()(G - F()) Given a current value of , this equation allows an update by using a forward difference operator to approximate the time derivative of the joint angles.

Inverse Kinematics Numerical Solution by Jacobian Methods The scheme is applied iteratively until some stopping criterion is met. This approach is not always the best one since computing the pseudoinverse is expensive, moreover, sometimes the Jacobian is singular on its domain or ill-conditioned, so numerical problems arise in the inversion. More general approach is to use already existing algorithms for optimization. The idea is to minimize a quadratic function of the error E() = G - F()2 with respect to .

Motion Interpolation Key-Framing In practice, it is not easy for animator to specify all the joint parameters as functions of time, that is, 1, 2,…, n A helpful tool is to specify the joint parameters by using what is known as key-frames. The animator only has to specify the most important configurations of the articulated figure and also at what time ti they occur, see Figure.

Motion Interpolation Key Frames Having specified the key-frames, that is, the joint parameters at some discrete times ti, the joint parameters at the key-frames can be plotted on timeline, see Figure.

Motion Interpolation Key Frames: Linear Interpolation If linear interpolation is used, the functions that represent the joint parameters are look like the ones shown in Figure.

Motion Interpolation Key Frames: Spline Interpolation In order to ger a smooth function for the joint parameters, we use the parametrs at the key-frames as points that must be interpolated.

Motion Interpolation Key Frames: Spline Interpolation How much the spline bends and wiggles depends on which type of spline and how many control points are use.

Interpolating the local translations Kochanek-Bartels splines Given an ordered list of points {pi}ni=0, the KBS provide a cubic interpolation between each pair pi and pi+1 with varying properties specified at the end points. These properties are tension , which controls how sharply the curve bends at a control point; continuity , which provides a smooth visual variation in the continuity at a control point; and a bias , which controls the direction of the path at a control point.

Interpolating the local translations Kochanek-Bartels splines use Hermite interpolation basis H0(t) = 2t3 – 3t2 + 1, H1(t) = -2t3 – 3t2 , H2(t) = t3 – 2t2 + t, and H3(t) = t3 – t2 . A parametric cubic curve passing through points pi and pi+1 with tangent vectors Ti and Vi+1, respectively, is xi(t) = H0(t) pi + H1(t) pi+1 + H2(t) Ti + H3(t) Ti+1, where 0  t  1.

Interpolating the local translations Kochanek-Bartels splines Parameters  = 0,  = 0,  = 0. fish8_tr.avi

Key frame animation: Quaternions A quaternion invented by Sir William Rowan Hamilton in 1843 is given by q = w + xi + yj +zk, where w, x, y, z are real numbers and i, j, k are primitive elements. Multiplication for them is defined by i2 = j2 = k2 = -1, ij = -ji = k, jk = -kj = i, and ki = -ik = j. A unit quaternion is a quaternion q for which the norm of the quaternion N(q) = w2 + x2 + y2 + z2 = 1. A unit quaternion can be represented by q = cos + usin, where u = u0i + u1j + u2k and vector (u0,u1,u2) has length 1. It is possible to define the logarithm of a unit quaternion, log(q) = log(cos + usin) = log*exp(u) = u. A unit quaternion q = cos + usin represents the rotation of 3D vector v by an angle 2 about the 3D axis u

Key frame animation Spherical Linear Interpolation Given two distinct points on a unit sphere in 3D space, it is possible to interpolate between them by sampling along a great arc containing the two points. To constrain the formula , let q0 and q1 be distinct unit vectors on a hypersphere. An interpolation is required of the form q(t) = c0(t)q0 + c1(t)q1, 0  t  1, where c0(t) and c1(t) are real-valued functions and q(t) is always a unit vector.