Assignment 2: Inverse Kinematics

Similar documents
Computer Animation. Lecture 2. Basics of Character Animation

Interactive Computer Graphics

Metrics on SO(3) and Inverse Kinematics

This week. CENG 732 Computer Animation. Challenges in Human Modeling. Basic Arm Model

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

Simulation of Trajectories and Comparison of Joint Variables for Robotic Manipulator Using Multibody Dynamics (MBD)

Kinematical Animation

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau

animation animation shape specification as a function of time

Animations in Creo 3.0

CS 4204 Computer Graphics

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Welcome to Harcourt Mega Math: The Number Games

Scripted Operator Shoulder

Project 2: Character Animation Due Date: Friday, March 10th, 11:59 PM

Tutorial: Biped Character in 3D Studio Max 7, Easy Animation

Typical Linear Equation Set and Corresponding Matrices

animation shape specification as a function of time

Today. Keyframing. Procedural Animation. Physically-Based Animation. Articulated Models. Computer Animation & Particle Systems

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy

IMD4003 3D Computer Animation

Maya 2014 Basic Animation & The Graph Editor

Character Animation Tutorial

High Accuracy Articulated Robots with CNC Control Systems

INSTRUCTOR WORKBOOK Quanser Robotics Package for Education for MATLAB /Simulink Users

LEGO NXT-based Robotic Arm

Using Autodesk HumanIK Middleware to Enhance Character Animation for Games

ME 115(b): Solution to Homework #1

Design-Simulation-Optimization Package for a Generic 6-DOF Manipulator with a Spherical Wrist

SimFonIA Animation Tools V1.0. SCA Extension SimFonIA Character Animator

Using MyMathLab. Features

CS 4620 Practicum Programming Assignment 6 Animation

Lecture 2 Mathcad Basics

MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2

Operational Space Control for A Scara Robot

Rigging Characters for Animation

3D Modeling, Animation, Compositing, and Special Effects ITP 215x (2 Units)

GAME SYSTEM MANUAL PITTSBURGH MODULAR SYNTHESIZERS

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

CALIBRATION OF A ROBUST 2 DOF PATH MONITORING TOOL FOR INDUSTRIAL ROBOTS AND MACHINE TOOLS BASED ON PARALLEL KINEMATICS

ART 269 3D Animation Fundamental Animation Principles and Procedures in Cinema 4D

Chapter 1. Introduction. 1.1 The Challenge of Computer Generated Postures

PARCC Technology Skills: Grades 6-8

Finite Element Method (ENGC 6321) Syllabus. Second Semester

Dev eloping a General Postprocessor for Multi-Axis CNC Milling Centers

Physics 235 Chapter 1. Chapter 1 Matrices, Vectors, and Vector Calculus

Cabri Geometry Application User Guide

Project 2: Bejeweled

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

Computing Euler angles from a rotation matrix

User Guide Installing the 3D Studio plug-ins

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS Instructor: Michael Gelbart

A PAIR OF MEASURES OF ROTATIONAL ERROR FOR AXISYMMETRIC ROBOT END-EFFECTORS

[1] Diagonal factorization

VRayPattern also allows to curve geometry on any surface

After that you can log in and start creating games or playing existing games.

Least-Squares Intersection of Lines

Computational Models Lecture 8, Spring 2009

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

4.1. Title: data analysis (systems analysis) Annotation of educational discipline: educational discipline includes in itself the mastery of the

Tutorial for Assignment #2 Gantry Crane Analysis By ANSYS (Mechanical APDL) V.13.0

CARTOON BUILDER. Character animation the art of. Creating animated characters with Blender KNOW-HOW. Pulling Strings

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Mathematics (Project Maths Phase 1)

Rotational Motion and Torque

Constraint satisfaction and global optimization in robotics

The Basics of FEA Procedure

Basic Components of an LP:

4.5 Linear Dependence and Linear Independence

LS.6 Solution Matrices

4VATARS PROJECT. Standard avatar specification for content creation in RealXtend

CNCTRAIN OVERVIEW CNC Simulation Systems

SIGNAL PROCESSING & SIMULATION NEWSLETTER

INTRODUCTION. Robotics is a relatively young field of modern technology that crosses traditional

Lecture 3: Coordinate Systems and Transformations

Finite Element Formulation for Beams - Handout 2 -

Solving Systems of Equations Using Mathcad Charles Nippert Solving A System of Equations By Symbolically Figure 1 After Step 1

Exploring Geometric Transformations in a Dynamic Environment Cheryll E. Crowe, Ph.D. Eastern Kentucky University

On-line trajectory planning of robot manipulator s end effector in Cartesian Space using quaternions

Quick Tour of Mathcad and Examples

Figure 1.1 Vector A and Vector F

Triangle Trigonometry and Circles

Lecture 3: Models of Spatial Information

A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Figure Cartesian coordinate robot

The Force Table Vector Addition and Resolution

3D Modeling, Animation, and Special Effects ITP 215x (2 Units)

THE problem of visual servoing guiding a robot using

College Credit Plus Dual Enrollment

Basic CAD/CAM. CHAPTER 5: Geometric Transformation

How To Calculate Kinematics Of A Parallel Robot

TEACHER S GUIDE TO RUSH HOUR

Truman College-Mathematics Department Math 209-ABC: Calculus and Analytic Geometry III Course Syllabus Spring 2012

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Republic Polytechnic School of Information and Communications Technology C391 Animation and Visual Effect Automation.

Fusion's runtime does its best to match the animation with the movement of the character. It does this job at three different levels :

Tuesday, October 18. Configuration Management (Version Control)

Affine Transformations

Math Content by Strand 1

Contents. Sample worksheet from

Transcription:

Assignment 2: Inverse Kinematics Release Date: Tuesday, September 15, 2009 Due Date: Thursday, October 1, 2009, 11:59pm Grading Value: 15% Overview: Kinematics describes the motion of a hierarchical skeleton structure, animations can be thought of as driving the kinematics in a game. While forward kinematics computes world space geometric descriptions based on joint DOF values, inverse kinematics could help us compute the vector of joint DOFs that will cause the end effector to reach some desired goal state. In this assignment, you are required to implement two ways (Cyclic-Coordinate Descent and Pseudoinverse of Jacobian) of doing inverse kinematics for an articulated character and create a demonstration that clearly shows the differences between the two techniques. We will also examine how IK works in Maya. Requirement: Implement Cyclic-Coordinate Descent Method. Implement Pseudoinverse of Jacobian Method. Compare those two methods and report the difference you observe in your presentation slides/website. Load.asf file into Maya and try to add IK to the skeleton s legs and/or arms. Play with the IK handles you added. Report your observation of the difference of Maya s IK to the methods of your implementation. Deliverables: You are required to submit your code and documentation of how to run it, the features you have implemented and the ones you have not. Please make sure your code could run on one of the 5336 machines. You need to submit one video of your animation (two methods of IK from your code). The video should contain the incremental movement the character makes to a target. You need to submit a.mb file with the skeleton you load from.asf file and the IKs you add to it. You also need to prepare a 10 minutes presentation and submit your slides or website to describe your goals, techniques you used, as well as your results. Your handin directory is at /afs/cs.cmu.edu/academic/class/15464-f09-users/andrewid/assign2. Note that you will be randomly selected to demo/discuss at least 1 of your 3 projects in class during the semester. Implementation: We will use the vector: to represent the array of M joint DOF values, and the vector to represent an array of N DOFs that describes the end effector in world space. If you are using.asf skeleton file, the size of will depends on the joints you choose, and the size of e will be 3 since we are only concerned with the end effector position.

The forward kinematics f() computes the world space end effector DOFs from the joint DOFS: Our goal of inverse kinematics is to compute the inverse of it: 1. Cyclic-Coordinate Descent (CCD) CCD is a simple way to solve inverse kinematics. CCD deals with each joint individually. Although it is not as mathematically grouned as Jacobian, it s much simpler to implement and less expensive. You can read these two articles Oh My God, I Inverted Kine! and Making Kine More Flexible for a thorough explanation of this method. 2. Pseudoinverse of the Jacobian. A Jacobian is a vector derivative respect to another vector. Assume represents the current joint DOFs and represents the current end effector DOFs, the forward kinematics function is It maps a vector to another vector. Forward kinematics is nonlinear; it involves sin s and cos s of the input variables. Jacobian is a linear approximation of f(), it is a matrix of partial derivatives one partial derivative for each combination of components of the vectors. We can only use the Jacobian as an approximation that is valid near the current configuration. So we must repeat the process of computing a Jacobian and taking a small step towards the goal until we get close enough. Let s use to represent the goal DOFs, here is the algorithm we can use to compute inverse kinematics: while ( is too far from ){ compute the Jacobian matrix J compute the pseudoinverse of the Jacobian matrix compute change in joint DOFs: apply the change to DOFs, move a small step of : } Computing the Jacobian Matirx: For any given joint pose vector, we can explicitly compute the individual components of the Jacobian matrix. We are just concerned with the end effector position. Therefore, is just a 3D vector representing the end effector position in world space. The Jacobian will be a 3 N matrix (N is the number of DOFs). Let s examine one column in the Jacobian matrix.

We can fill this column numerically: Add small to. (Don t forget to call angles.to_pose() after this change.) Get the change of the end effector in world space:. (You can use the WorldBone class now.) So we have: Note: The columns of the Jacobian matrix could also be solved analytically. See more about this in the Extra Credit section. Computing the Pseudoinverse of the Jacobian Matrix: Now we have our Jacobian matrix and the equation If we can have the inverse of the Jacobian matrix, we can solve from : But sometimes the Jacobian matrix is not invertable, so we need to use the Pseudoinverse of the Jacobian Matrix : Now we should be able to follow the algorithm provided at the beginning to solve inverse kinematics. There is also some explanation in Rick Parent s Computer Animation book, Section 5.3. You will need to find some way of inverting a matrix. You can use the safe matrix inversion code in this directory: /afs/cs.cmu.edu/academic/class/15464-f09/asst2/ Here s an example of how to use it: #include matrix.hpp matrix *m1 = new matrix(2, 3); m1->setvalue(1.0, 0, 0); m1->setvalue(2.0, 0, 1); m1->setvalue(3.0, 0, 2); m1->setvalue(4.0, 1, 0); m1->setvalue(5.0, 1, 1); m1->setvalue(6.0, 1, 2); matrix *m1_pinv = new matrix(3, 2);

int r = m1->invertmatrix(m1_pinv, SVD_TOL); matrix *res = new matrix(2, 2); m1->computematrixmul(m1_pinv, res); res->printmatrix(); std::cout << std::endl; delete m1; m1 = NULL; delete m1_pinv; m1_pinv = NULL; delete res; res = NULL; One Last Thing: A numerical solution to IK is not very desirable in any implementation as it should be much slower than an analytical solution. However, it is always a good first cut to make sure that you have the math right in an analytical approach. 3. IK in Maya Set Maya back to Y-up. You can follow the instruction from this link http://mocap.cs.cmu.edu/asfamcmel/asfamcmel.php to load the skeleton from.asf file into Maya. Click the box at the right side of IK Handle Tool Change Current solver to ikrpsolver if it s not your default solver. (The single chain IK handle's end effector tries to reach the position and the orientation of its IK handle, whereas the rotate

plane IK handle's end effector only tries to reach the position of its IK handle.) Here s an example of how to set IK to a skeleton: Go to side view from the viewport, select the joints of the knees, use the move tool to move them forward before we set IK. (We need to bend the knees a little bit so Maya could know which way it should bend). You can press d while moving, so you can move only the knee joints other than the whole hierarchy under those two joints.

You can go back to perspective view and select IK Handle Tool, click one thigh joint, then click its corresponding ankle joint. Now you should have your IK handle set up for one leg. Grading: This assignment will be graded more on your implementation. Please make sure you are doing the right math. Your video, report and presentation will also be a part of your grade. Tips: Start early. This assignment is much more code and math-intensive than our 1 st assignment. Extra Credit: 1. Interactive interface: Create a click-and-drag environment so the user can drag the target points. The character s pose updates continuously to match the targets. 2. Compute the Jacobian Matrix analytically: is the rotation axis of this DOF in world space, is the DOF s world space offset. The axis along with the dof in the asf file specify the number of joints and their axis directions. To compute the rotation axis in world space you will need this information. You need to transform them by their parent joint s world matrix.

3. Allow user to click on any part of the character. 4. Anything else that makes posing the character more intuitive!