CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

Similar documents
Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Lecture «Robot Dynamics»: Kinematic Control

Jacobian: Velocities and Static Forces 1/4

animation projects in digital art animation 2009 fabio pellacini 1

Articulated Characters

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Jacobian: Velocities and Static Forces 1/4

To Do. History of Computer Animation. These Lectures. 2D and 3D Animation. Computer Animation. Foundations of Computer Graphics (Spring 2010)

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

A Detailed Look into Forward and Inverse Kinematics

Jacobians. 6.1 Linearized Kinematics. Y: = k2( e6)

Animation Lecture 10 Slide Fall 2003

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Kinematics. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Inverse Kinematics Programming Assignment

CS-184: Computer Graphics. Today. Forward kinematics Inverse kinematics. Wednesday, November 12, Pin joints Ball joints Prismatic joints

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Why animate humans? Why is this hard? Aspects of the Problem. These lectures. Animation Apreciation 101

Inverse Kinematics of 6 DOF Serial Manipulator. Robotics. Inverse Kinematics of 6 DOF Serial Manipulator

Humanoid Robotics. Inverse Kinematics and Whole-Body Motion Planning. Maren Bennewitz

animation computer graphics animation 2009 fabio pellacini 1 animation shape specification as a function of time

animation computer graphics animation 2009 fabio pellacini 1

4 Kinematic Linkages. Chapter 4. Kinematic Linkages. Department of Computer Science and Engineering 4-1

Computer Animation. Courtesy of Adam Finkelstein

Applications. Human and animal motion Robotics control Hair Plants Molecular motion

MTRX4700 Experimental Robotics

Computer Animation. Rick Parent

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Keyframe Animation. Computer Animation. Outline. Computer Animation. Keyframe Animation. Keyframe Animation

autorob.github.io Inverse Kinematics UM EECS 398/598 - autorob.github.io

Maths in Motion. Danny Chapman Cumberland Lodge - February Version for distribution. Procedural animation in video games

Animation. CS 465 Lecture 22

Serial Manipulator Statics. Robotics. Serial Manipulator Statics. Vladimír Smutný

Humanoid Robotics. Inverse Kinematics and Whole-Body Motion Planning. Maren Bennewitz

Last Time? Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

A New Algorithm for Measuring and Optimizing the Manipulability Index

COMP 175 COMPUTER GRAPHICS. Lecture 10: Animation. COMP 175: Computer Graphics March 12, Erik Anderson 08 Animation

Game Programming. Bing-Yu Chen National Taiwan University

Inverse Kinematics II and Motion Capture

10/25/2018. Robotics and automation. Dr. Ibrahim Al-Naimi. Chapter two. Introduction To Robot Manipulators

Animation and Quaternions

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

CS545 Contents IX. Inverse Kinematics. Reading Assignment for Next Class. Analytical Methods Iterative (Differential) Methods

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

Advanced Graphics and Animation

Industrial Robots : Manipulators, Kinematics, Dynamics

Kinematics, Kinematics Chains CS 685

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Robotics I. March 27, 2018

Interactive Computer Graphics

Character animation Christian Miller CS Fall 2011

Kinematics Analysis of Free-Floating Redundant Space Manipulator based on Momentum Conservation. Germany, ,

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

CS 231. Inverse Kinematics Intro to Motion Capture

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

A New Algorithm for Measuring and Optimizing the Manipulability Index

CS 231. Inverse Kinematics Intro to Motion Capture. 3D characters. Representation. 1) Skeleton Origin (root) Joint centers/ bones lengths

Robotics kinematics and Dynamics

Homework 2 Questions? Animation, Motion Capture, & Inverse Kinematics. Velocity Interpolation. Handing Free Surface with MAC

Motion Capture. Motion Capture in Movies. Motion Capture in Games

Control of industrial robots. Kinematic redundancy

Maya Lesson 8 Notes - Animated Adjustable Desk Lamp

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

Kinematical Animation.

An idea which can be used once is a trick. If it can be used more than once it becomes a method

Chapter 3 : Computer Animation

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

Interlude: Solving systems of Equations

Quaternions and Rotations

Spacecraft Actuation Using CMGs and VSCMGs

Chapter 2 Kinematics of Mechanisms

METR 4202: Advanced Control & Robotics

CS 231. Basics of Computer Animation

02/22/02. Assignment 1 on the web page: Announcements. Test login procedure NOW!

Robot mechanics and kinematics

Chapter 5.2 Character Animation

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Advanced Computer Graphics Transformations. Matthias Teschner

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

Animation by Adaptation Tutorial 1: Animation Basics

Singularity Handling on Puma in Operational Space Formulation

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

CNM 190 Advanced Digital Animation Lec 10 : Inverse Kinematics & Automating Animation

EE613 Machine Learning for Engineers LINEAR REGRESSION. Sylvain Calinon Robot Learning & Interaction Group Idiap Research Institute Nov.

Computer Animation II

Motion Control Methods for Skeleton Daniel Thalmann

CS 4620 Program #2: Character Animation

Quaternions & Rotation in 3D Space

Lecture VI: Constraints and Controllers

Lecture 18 Kinematic Chains

Trajectory Optimization

CS4610/CS5335: Homework 1

Announcements: Quiz. Animation, Motion Capture, & Inverse Kinematics. Last Time? Today: How do we Animate? Keyframing. Procedural Animation

Quaternions and Rotations

Animation. Traditional Animation Keyframe Animation. Interpolating Rotation Forward/Inverse Kinematics

Transcription:

CS 775: Advanced Computer Graphics Lecture 3 : Kinematics

Traditional Cell Animation, hand drawn, 2D Lead Animator for keyframes http://animation.about.com/od/flashanimationtutorials/ss/flash31detanim2.htm

Traditional, hand drawn animation Lead Animator for keyframes and many secondary animators for the in-betweens http://animation.about.com/od/flashanimationtutorials/ss/flash31detanim2.htm

Traditional, hand drawn animation Keyframing @24fps how many drawings for a 2 hour movie? http://animation.about.com/od/flashanimationtutorials/ss/flash31detanim2.htm

Computer assisted keyframing Keyframes created/posed by hand In-betweens interpolated by the semi-automatic techniques How is this done? Luxo Jr, PIXAR, 1986

Interpolating Position and Orientation parameters and animating (rigid) transformations. Linear interpolation, spline interpolation, quaternions. How is this done? Luxo Jr, PIXAR, 1986

Creating the keyframe pose for the lamp Modify the joint angles at each internal joint Modify global position and orientation

Kinematics Study of motion of objects by studying the change in their orientation and position. The cause of the motion, i.e., the forces are not studied. Dynamics Study of motion of objects in relation to the forces and torques that cause the motion.

Kinematics Forward and Inverse Kinematics used for posing characters and interpolation in keyframed animation. Faster to compute, easier to control Dynamics Physically-based animation used for animations involving simulations of real world physics, for e.g., collisions. Harder to compute and control, more realistic (if modelled correctly), Can automatically adjust to changes in the environment.

Terminology Links or Bones End effector Internal Joints Root Joint Kinematic Chain

Terminology Joint DoF (parameters) 1 2 0, 0, 0, t x,t y, t z Root DoF

Forward Kinematics Given the joint parameters, find the position of the end effector. Position of the root is given as a global transformation. Joint parameters are given as relative rotations (local transformations). We already know how to solve this! (from CS475/CS675)

Inverse Kinematics Given the desired end effector position, compute the joint parameters. More interesting and easier to animate actions like reaching, walking, grabbing. Much harder to solve. Why? Demo

Inverse Kinematics l2 2 l1 1 P x, y Given the link lengths l 1 and l 2 the desired position of the end effector, find the joint P parameter 1 and 2 that will make the end effector reach the goal.

Inverse Kinematics 2 l2 l1 1 x P x, y y x =l 1 cos 1 l 2 cos 1 2 y=l 1 sin 1 l 2 sin 1 2

Inverse Kinematics P x, y IK a hard problem because it is an ill posed problem.

Posing the Kinematics problem Forward X = f Inverse = f 1 X X is the vector of end-effector position and orientation. is the vector of joint parameters. f is the mapping between the two.

Assumptions The mapping f is usually non-linear in the general case. However, we linearize the problem by localizing around the current position and use the Jacobian, i.e., d X = J d d =J 1 d X Note that the Jacobian is always a function of the current set of joint parameters so it has to recalculated everytime they change!

Assumptions We will attempt to solve the Inverse Kinematics problems under the following assumptions: All joints are hinge joints. All links are rigid and do not change in length. Note that these assumptions are not there because the method we will use to solve the Jacobian require these assumptions but instead to simplify our discussion a bit.

Steps: Construct the Jacobian Invert the Jacobian Iterate Detect singularities and avoid ill-conditioning

Steps: Construct the Jacobian Invert the Jacobian Iterate Detect singularities and avoid ill-conditioning

Forming a kinematic chain (Hierarchical modelling revisit) {0 } {2 } { j 1 } {1} Given a kinematic chain with links (local coordinate frames) numbered from {1} to { j-1}. The position and orientation of the root is known in the global coordinate frame, {0}. Each has its local x-axis oriented along the length of the link and the local z-axis as the axis of rotation about the joint.

Forming a kinematic chain {0 } {2 } { j 1 } {1} Then the jth link can be added as follows: Translating along the local x-axis by the length of link { j-1}, l j 1

Forming a kinematic chain {0 } {2 } {1} { j 1 } { j} Then the jth link can be added as follows: Translating along the local x-axis by the length of link { j-1}, l j 1 Rotating at the new joint origin so that the local x-axis lies along the length of the new link.

Forming a kinematic chain {0 } {2 } {1} { j 1 } { j} So if this the transformation between the { j} and { j-1} frame is given by j 1 M j Any point p j in the frame { j} can be moved to a j 1 corresponding point p j 1 in frame { j-1} as p j 1= M j p j Therefore, the coordinates of the point in the global frame is given by p0 = M 0. 0 M 1 j 2 M j 1. j 1 M j p j

Moving to global coordinates {0 } {2 } { j 1 } {1} { j} The transformation from any local frame { j} to the global frame is thus, given by T j =0 M 1 j 2 M j 1. j 1 M j [ r 11 r 12 r 13 r r r T j = 21 22 23 r 31 r 32 r 33 0 0 0 t1 t2 t3 1 ]

Constructing the Jacobian d X = J d X = J The Jacobian relates the end-effector velocities to velocities of the joint parameters. [ ][ f1 1 f1 n 1 ][ ] 1 2 V nx 0 V ny 0 fi V nz = 0 j nx 0 ny f6 f 6 0 nz n 2 1 n 1 n 1 0

Constructing the Jacobian Known d X = J d Unknown X = J The Jacobian relates the end-effector velocities to velocities of the joint parameters. Simplifying Notation [ ][ f1 1 f1 n 1 ][ ] 1 2 V nx V ny fi V nz = nx j ny f6 f 6 nz n 2 1 n 1 n 1

Constructing the Jacobian The functions f 1, f 2, f 3 relate the joint parameter angular velocities to the linear velocity of the end-effector. The functions f 4 f 5, f 6 relate the joint parameter angular velocities to the angular velocity of the end-effector. The velocities of the end-effector are known in the global coordinate system. So the Jacobian has to be formed in the global coordinate system.

Constructing the Jacobian The jth column of the Jacobian relates the jth joint parameter angular velocity to the velocity of the endeffector. J = [ f1 1 f6 1 f1 n 1 fi j f6 n 1 ]

Constructing the Jacobian {0 } { j 1 } j {n 1 } { j} zj For the angular velocity, j =z j j The contribution of this angular velocity to the angular velocity of the end-effector (in global coordinates) is given by 0 j =T j z j j =u j j So f4 f5 f6 = T j z j x =u jx = T j z j y =u jy = T j z j z =u jz j j j

On Constructing the Jacobian {0 } { j 1 } j zj {n 1 } Oj For the angular velocity, j =z j j The contribution of this angular velocity to the linear velocity of the end-effector (in global coordinates) is given by 0V j = T j z j P n P j j =v j j So f1 =v jx j f2 f3 =v jy =v jz j j where P j =T j O j P n=t n O n

Steps: Construct the Jacobian Invert the Jacobian Iterate Detect singularities and avoid ill-conditioning

Inverting the Jacobian To solve IK, we must invert the Jacobian d =J 1 d X =J 1 X Note that the Jacobian is a fat matrix, i.e., it has more columns than rows. So the system is underconstrained there is more than one possible solution. We choose the simplest solution, i.e., one of minimum norm: Find the unique for which we have: min 2 s.t. X =J

Linear Least Squares (Digression) For the system AX =B If A has full row rank then the unique X for which we get 2 min X is given by s.t. AX =B X = AT AAT 1 B= A + B To see how this is so, solve the Lagrangian, L= X 2 T AX B

Linear Least Squares (Digression) For the system AX =B If A has full row rank then the unique X for which we get 2 min X is given by s.t. AX =B X = AT AAT 1 B= A + B Moore Penrose Pseudoinverse To see how this is so, solve the Lagrangian, L= X 2 T AX B

Singular Value Decomposition (Digression) Any rectangular, real, mxn matrix A can be decomposed as: T A=U V where U is a m m orthogonal matrix is a m n diagonal matrix V is a n n orthogonal matrix The pseudoinverse can be computed from the SVD as A+ =V + U T where + is formed by transposing and taking a reciprocal of every non-zero singular value

Inverting the Jacobian So we solve d =J 1 d X By computing the pseudoinverse of the Jacobian using the SVD r J =V U = i v i ui + + T -1 T i=1 where r=m if the Jacobian has full row rank

Steps: Construct the Jacobian Invert the Jacobian Iterate Detect singularities and avoid ill-conditioning

Starting the IK solver and iterating 1 2 G j n 1 E Initialize the linear velocity components of the end-effector to dx 1..3=G E, compute the Jacobian, invert, update the joints parameters and iterate. If dx is too large then due to local nature of the solution, tracking errors will occur, given by J d dx So sometimes we go from E to G in by taking smaller steps in the G E direction.

Starting the IK solver and iterating 1 2 G j n 1 E Iterate only a fixed number of times and check whether G E has fallen below some tolerance. Also check after a few iterations whether the arm has become fully extended, is parallel to G E and the goal is still out of reach. What about the angular velocity components of the endeffector?

Steps: Construct the Jacobian Invert the Jacobian Iterate Detect singularities and avoid ill-conditioning

Detect singularities and avoid ill-conditioning The Jacobian becomes singular when it loses rank. This is detectable using the condition number, C = max min of the Jacobian matrix.

Detect singularities and avoid ill-conditioning The solution also becomes ill-conditioned near a singulartiy, resulting in very high joint space velocities. d 1 dx dx d 1

Detect singularities and avoid ill-conditioning To prevent ill-conditioning we damp the joint space velocities by searching for a solution that minimizes the sum: J d dx 2 2 d 2 The solution to this is given by d =J T J J T 2 I 1 dx =V T T 2 I 1 U T dx r = i=1 i 2 i T v u dx 2 i i This is known as the damped least squares solution.