1
CS 231
Inverse KinematicsIntro to Motion Capture
CS 231CS 231
Inverse KinematicsInverse KinematicsIntro to Motion CaptureIntro to Motion Capture
3D characters3D characters
RepresentationRepresentation
1)1) SkeletonSkeletonOrigin (root)Origin (root)Joint centers/Joint centers/bones lengthsbones lengths
2) 2) KeyframesKeyframesPos/Rot Root (x)Pos/Rot Root (x)Joint Angles (q)Joint Angles (q)
2
Kinematics Kinematics –– study of static movementstudy of static movement
easy to computeeasy to compute intuitive to controlintuitive to controlpositioning hand/feetpositioning hand/feethigherhigher--level goalslevel goals
Forward: Forward: xx = = f(f()) Inverse: Inverse: = f= f--11((xx))
xx
)sin()sin()sin(
)cos()cos()cos(
332211
332211
llly
lllx
?
Base
1
2End Effector
3
1l2l
3l
Forward Kinematics
3
What is it?What is it?
BaseBase
12 3
End End EffectorEffector
Inverse Kinematics (IK)Inverse Kinematics (IK)
Solving IK Solving IK
KinematicKinematic equations equations
)sin()sin()sin(
)cos()cos()cos(
332211
332211
llly
lllx
Number of equation : 2Number of equation : 2Unknown variables : 3Unknown variables : 3
Infinite number of solutions !Infinite number of solutions !
4
RedundancyRedundancy
System DOF > End System DOF > End EffectorEffector DOFDOF
)sin()sin()sin(
)cos()cos()cos(
332211
332211
llly
lllx
System DOF = 3System DOF = 3End End EffectorEffector DOF = 2DOF = 2
Redundancy in humans?Redundancy in humans?
A redundant system has infinite number of A redundant system has infinite number of solutionssolutions
Human skeleton has 70 DOFHuman skeleton has 70 DOFSuper redundantSuper redundant
How to solve highly redundant system?How to solve highly redundant system?
5
Some intuition: NaturalnessSome intuition: Naturalness
Based on observation of natural human Based on observation of natural human posture posture
NeurophysiologicalNeurophysiological/ / biomechbiomech experimentsexperiments
ExampleExampleHybrid/analytical solution for human armHybrid/analytical solution for human armComfort poseComfort posePlanningPlanning
Inverse Kinematics SolversInverse Kinematics Solvers
Analytical Analytical -- only for simplest systems only for simplest systems Optimization Optimization -- requires performance criteriarequires performance criteriaHybrid Hybrid -- combine heuristic and optimizationcombine heuristic and optimization
6
Nonlinear OptimizationNonlinear Optimization
Optimization ProblemOptimization Problem
)( minimize θGoal
Available Optimization PackagesAvailable Optimization PackagesMATLAB, MATLAB, Numerical RecipesNumerical RecipesEtc...Etc...
BaseBase
12 3
End End EffectorEffector
GoalGoal
distancedistance
2
eg pp Position GoalPosition Goal
Goal Potential FunctionGoal Potential Function
7
JacobianJacobian
JacobianJacobian MatrixMatrixLinearly relates endLinearly relates end--effectoreffector change to joint change to joint
angle changeangle change
)(θx f θJx
xJθ 1 θ
J
f
Differential KinematicsDifferential Kinematics
33--link arm examplelink arm example
332211
332211
2
1
sinsinsin
coscoscos
)(
)(
lll
lll
f
f
y
x
θ
θ
3
2
1
J
y
x
3
2
2
2
1
2
3
1
2
1
1
1
)()()(
)()()(
θθθ
θθθ
Jfff
fff
332211
332211
coscoscos
sinsinsin
lll
lll
8
Differential KinematicsDifferential Kinematics
J is not always invertibleJ is not always invertible
Remedy : Pseudo InverseRemedy : Pseudo Inverse
1TT )(JJJJ
xJθ
Gaussian EliminationGaussian Elimination
(use MATLAB, etc.)(use MATLAB, etc.)
Calculating Pseudo Inverse?Calculating Pseudo Inverse?
Problems with IKProblems with IK
Will G(Will G() be always zero?) be always zero?
No : Unreachable WorkspaceNo : Unreachable Workspace
Will the solution be always found?Will the solution be always found?
No : Local Minima/Singular ConfigurationNo : Local Minima/Singular Configuration
Will the solution be always unique?Will the solution be always unique?
No : RedundancyNo : Redundancy
9
Apply to arms and legsApply to arms and legs
Lee and Chen '99Lee and Chen '99
oo
end end effectoreffector
lengthlength
Hybrid SolutionsHybrid Solutions
Constrained optimization with fewer variablesConstrained optimization with fewer variables--oneone--variable parameterization for arms and legsvariable parameterization for arms and legs
Hybrid SolutionsHybrid Solutions
10
““EElbowlbow CircleCircle””[[KoreinKorein and and BadlerBadler 82]82]
Hybrid SolutionsHybrid Solutions
coscos ((qqelbowelbow) = (L) = (L22 –– LL1122 -- LL22
2 2 ) / 2 L) / 2 L11 LL22Still must choose Still must choose ““swivel angleswivel angle””
Hybrid SolutionsHybrid Solutions
oo
end end effectoreffector
lengthlength
11
Hybrid solution: IKANHybrid solution: IKAN
““Inverse Kinematics using Inverse Kinematics using ANalyticalANalytical MethodsMethods”” IK for an IK for an anthropomorphic arm or leganthropomorphic arm or leg
Combination of analytic and numerical methods to solve Combination of analytic and numerical methods to solve generalized inverse kinematics problems generalized inverse kinematics problems
Results faster and more reliable than conventional inverse Results faster and more reliable than conventional inverse jacobianjacobian and optimization based techniques.and optimization based techniques.
Download IKAN from Download IKAN from SourceForgeSourceForge
12
Motion Capture Animation TechnologiesMotion Capture Animation TechnologiesMotion Capture Animation Technologies
Motivation Motivation
13
What is motion capture?What is motion capture?
Recording data from the Recording data from the real world and using it to animatereal world and using it to animate
Usually, one of a few specific Usually, one of a few specific technologies used to capture a technologies used to capture a human actor in order to animate human actor in order to animate a charactera character
Got its start in biomechanicsGot its start in biomechanics
Why use motion capture?Why use motion capture?
Captures realistic movements, can beCaptures realistic movements, can bespecific to individuals, good for specific to individuals, good for athletics and physical activitiesathletics and physical activities
Can capture Can capture alotalot of data reasonably quicklyof data reasonably quickly
Can capture onCan capture on--thethe--fly for realfly for real--time time performance and interactivityperformance and interactivity
14
Where is motion capture used? Many games, capture celebrities, lifelike motion
What are the issues? What are the issues?
Recording the data accurately and quicklyRecording the data accurately and quickly--types of technologiestypes of technologies--running a motion capture shootrunning a motion capture shoot
Applying the data to the characterApplying the data to the character--filtering the datafiltering the data--fitting to a skeletonfitting to a skeleton
Editing motion data postEditing motion data post--mortemmortem--changing and concatenatingchanging and concatenating--generalized motion from a generalized motion from a
databasedatabase
15
Types of technologies Types of technologies -- Optical SystemsOptical Systems
ViconVicon (also Motion Analysis)(also Motion Analysis)
Types of technologies Types of technologies -- Optical SystemsOptical Systems
1010--24 cameras 24 cameras 1000 frames/sec at 1280x1024 resolution (!)1000 frames/sec at 1280x1024 resolution (!)4mm size marker @ 10m within < 1mm4mm size marker @ 10m within < 1mmCost: $30Cost: $30--150K+150K+
Plus: High data ratePlus: High data rateBest motion in the industry!Best motion in the industry!
Minus: Expense Minus: Expense OcclusionOcclusionRelies on software for data resolutionRelies on software for data resolution
AlternativeAlternative-- Rent a day in the studio: $10Rent a day in the studio: $10--20K20K
16
Types of technologies Types of technologies -- Active Optical SystemsActive Optical Systems
Ascension's Reactor (Ascension's Reactor (OptotrakOptotrak, , PhaseSpacePhaseSpace))
Types of technologies Types of technologies -- Active Optical SystemsActive Optical Systems
540 cameras540 cameras900 measures/second (up to 60 frames/sec)900 measures/second (up to 60 frames/sec)
Capture region: 3x4meters Capture region: 3x4meters Cost: ~$70K Cost: ~$70K
Plus: Minimal data loss after occlusion rePlus: Minimal data loss after occlusion re--identifiesidentifiesNo environment restrictionsNo environment restrictionsReasonably priced ?Reasonably priced ?
Minus: Low capture rate, small regionMinus: Low capture rate, small region
17
Types of technologies Types of technologies -- Electromagnetic SystemsElectromagnetic Systems
Ascension (Ascension (PolhemusPolhemus) ) –– tethered and tethered and tetherlesstetherless
Types of technologies Types of technologies -- Electromagnetic SystemsElectromagnetic Systems
18 sensors six 18 sensors six dof'sdof's120 frames/sec120 frames/sec<1 cm/~1degree accuracy<1 cm/~1degree accuracy3m circular capture area3m circular capture areaCost: ~$50KCost: ~$50K
Plus: No occlusionPlus: No occlusionOrientation information recordedOrientation information recorded
Minus: Environment restrictionsMinus: Environment restrictionsCan be bulky Can be bulky
18
Types of technologies Types of technologies -- Mechanical SystemsMechanical Systems
ExoskeletonsExoskeletonsJoint sensors plus a gyroscope Joint sensors plus a gyroscope
Types of technologies Types of technologies -- Mechanical SystemsMechanical Systems
500 samples/second500 samples/secondNo range limits/Wired systemNo range limits/Wired systemCost: ~40KCost: ~40K
Plus: Fits a rigid body skeleton wellPlus: Fits a rigid body skeleton wellHigh data rateHigh data rate
Minus: TetheredMinus: TetheredNot accurate in body location/orientationNot accurate in body location/orientation
19
Types of technologies Types of technologies -- Mechanical SystemsMechanical Systems
Monkeys and other input devices Monkeys and other input devices
The PipelineThe Pipeline
BodenheimerBodenheimer et al 97et al 97
20
On limbs On limbs vsvs joints joints –– neither is idealneither is ideal
Over tight clothing or thin skinOver tight clothing or thin skin
In repeatable 'landmarks'In repeatable 'landmarks'
Using standard marker setsUsing standard marker sets
Marker placementMarker placement
Marker placementMarker placement
MagneticMagnetic OpticalOptical
21
Using marker data Using marker data -- mappingmapping
Problems: no perfect match, jointProblems: no perfect match, joint--center and rigidcenter and rigid--body assumptions, body assumptions, limits on ranges of motion, aesthetic and production requiremlimits on ranges of motion, aesthetic and production requirementsents
Using marker data Using marker data -- skeleton estimationskeleton estimation
OO’’Brien et al 99Brien et al 99
22
Sources of noiseSources of noise
Outliers Outliers
Joints are approximated as pivotsJoints are approximated as pivots
Simplifications (like a rigid back)Simplifications (like a rigid back)
Markers move on the skin, clothingMarkers move on the skin, clothing
Errors may accumulateErrors may accumulate
FilteringFiltering
Gets rid of outliersGets rid of outliers
Smoothes dataSmoothes data
But removes important details!But removes important details!
All data is filteredAll data is filtered
23
Some notes about IK and Some notes about IK and mocapmocap
FullFull--body IK starting from rootbody IK starting from rootplaces feet on the ground places feet on the ground –– assumes bodyassumes bodyroot is correct, (foot slide becomes a new root is correct, (foot slide becomes a new problem)problem)
FrameFrame--toto--frame coherence achievedframe coherence achievedby initializing frame with previousby initializing frame with previous
Known problems with the dataKnown problems with the data
Correcting errors Correcting errors
Modifying data to fit your characterModifying data to fit your character
Edit the data to do something newEdit the data to do something new
Connecting data sequencesConnecting data sequences
Generalize a pool of dataGeneralize a pool of data
Top Related