CS-184: Computer Graphics Lecture #19: Forward and Inverse - - PDF document

cs 184 computer graphics
SMART_READER_LITE
LIVE PREVIEW

CS-184: Computer Graphics Lecture #19: Forward and Inverse - - PDF document

CS-184: Computer Graphics Lecture #19: Forward and Inverse Kinematics ! ! ! Prof. James OBrien ! University of California, Berkeley ! ! ! V2015-S-19-1.0 1 19-Kinematics.key - April 13, 2015 Today Forward kinematics ! Inverse


slide-1
SLIDE 1

CS-184: Computer Graphics

Lecture #19: Forward and Inverse Kinematics!

! !

  • Prof. James O’Brien!

University of California, Berkeley!

! !

V2015-S-19-1.0

1 19-Kinematics.key - April 13, 2015

2

Today

  • Forward kinematics!
  • Inverse kinematics!
  • Pin joints!
  • Ball joints!
  • Prismatic joints

2 19-Kinematics.key - April 13, 2015

slide-2
SLIDE 2

3

Forward Kinematics

  • Articulated skeleton!
  • Topology (what’s connected to what)!
  • Geometric relations from joints!
  • Independent of display geometry!
  • Tree structure!
  • Loop joints break “tree-ness”

3 19-Kinematics.key - April 13, 2015

4

Forward Kinematics

  • Root body!
  • Position set by “global” transformation!
  • Root joint!
  • Position!
  • Rotation!
  • Other bodies relative to root!
  • Inboard toward the root!
  • Outboard away from root

4 19-Kinematics.key - April 13, 2015

slide-3
SLIDE 3

5

Forward Kinematics

  • A joint!
  • Joint’s inboard body!
  • Joint’s outboard body

5 19-Kinematics.key - April 13, 2015

6

Forward Kinematics

  • A body!
  • Body’s inboard joint!
  • Body’s outboard joint!
  • May have several outboard joints

6 19-Kinematics.key - April 13, 2015

slide-4
SLIDE 4

7

Forward Kinematics

  • A body!
  • Body’s inboard joint!
  • Body’s outboard joint!
  • May have several outboard joints!
  • Body’s parent!
  • Body’s child!
  • May have several children

7 19-Kinematics.key - April 13, 2015

8

Forward Kinematics

  • Interior joints!
  • Typically not 6 DOF joints!
  • Pin - rotate about one axis!
  • Ball - arbitrary rotation!
  • Prism - translation along one axis

8 19-Kinematics.key - April 13, 2015

slide-5
SLIDE 5

9

Forward Kinematics

  • Pin Joints!
  • Translate inboard joint to local origin!
  • Apply rotation about axis!
  • Translate origin to location of joint on outboard body

9 19-Kinematics.key - April 13, 2015

10

Forward Kinematics

  • Ball Joints !
  • Translate inboard joint to local origin!
  • Apply rotation about arbitrary axis!
  • Translate origin to location of joint on outboard body

10 19-Kinematics.key - April 13, 2015

slide-6
SLIDE 6

11

Forward Kinematics

  • Prismatic Joints !
  • Translate inboard joint to local origin!
  • Translate along axis!
  • Translate origin to location of joint on outboard body

11 19-Kinematics.key - April 13, 2015

12

Forward Kinematics

  • Composite transformations up the hierarchy

12 19-Kinematics.key - April 13, 2015

slide-7
SLIDE 7

13

Forward Kinematics

  • Composite transformations up the hierarchy

13 19-Kinematics.key - April 13, 2015

14

Forward Kinematics

  • Composite transformations up the hierarchy

14 19-Kinematics.key - April 13, 2015

slide-8
SLIDE 8

15

Forward Kinematics

  • Composite transformations up the hierarchy

15 19-Kinematics.key - April 13, 2015

16

Forward Kinematics

  • Composite transformations up the hierarchy

16 19-Kinematics.key - April 13, 2015

slide-9
SLIDE 9

17

Inverse Kinematics

  • Given!
  • Root transformation!
  • Initial configuration!
  • Desired end point location!
  • Find!
  • Interior parameter settings

17 19-Kinematics.key - April 13, 2015

18

Inverse Kinematics

Egon Pasztor

18 19-Kinematics.key - April 13, 2015

slide-10
SLIDE 10

19

Inverse Kinematics

  • A simple two segment arm in 2D

Warning: Z−up Coordinate System

19 19-Kinematics.key - April 13, 2015

20

Inverse Kinematics

  • Direct IK: solve for the parameters

20 19-Kinematics.key - April 13, 2015

slide-11
SLIDE 11

21

Inverse Kinematics

  • Why is the problem hard?!
  • Multiple solutions separated in configuration space

21 19-Kinematics.key - April 13, 2015

22

Inverse Kinematics

  • Why is the problem hard?!
  • Multiple solutions connected in configuration space

22 19-Kinematics.key - April 13, 2015

slide-12
SLIDE 12

23

Inverse Kinematics

  • Why is the problem hard?!
  • Solutions may not always exist

23 19-Kinematics.key - April 13, 2015

24

Inverse Kinematics

  • Numerical Solution!
  • Start in some initial configuration!
  • Define an error metric (e.g. goal pos - current pos)!
  • Compute Jacobian of error w.r.t. inputs!
  • Apply Newton’s method (or other procedure)!
  • Iterate...

24 19-Kinematics.key - April 13, 2015

slide-13
SLIDE 13

25

Inverse Kinematics

  • Recall simple two segment arm:

Warning: Z−up Coordinate System

25 19-Kinematics.key - April 13, 2015

26

Inverse Kinematics

  • We can write of the derivatives

26 19-Kinematics.key - April 13, 2015

slide-14
SLIDE 14

27

Inverse Kinematics

Direction in Config. Space

27 19-Kinematics.key - April 13, 2015

28

Inverse Kinematics

The Jacobian (of p w.r.t. θ)

Example for two segment arm

28 19-Kinematics.key - April 13, 2015

slide-15
SLIDE 15

29

Inverse Kinematics

The Jacobian (of p w.r.t. θ)

29 19-Kinematics.key - April 13, 2015

30

Inverse Kinematics

Solving for and

30 19-Kinematics.key - April 13, 2015

slide-16
SLIDE 16

31

Inverse Kinematics

Solving for and

Is the Jacobian invertible? 31 19-Kinematics.key - April 13, 2015

32

Inverse Kinematics

  • Problems!
  • Jacobian may (will!) not always be invertible!
  • Use pseudo inverse (SVD)!
  • Robust iterative method!
  • Jacobian is not constant!

!

  • Nonlinear optimization, but problem is (mostly) well

behaved

32 19-Kinematics.key - April 13, 2015

slide-17
SLIDE 17

33

Inverse Kinematics

Jacobian is not always invertible!

  • Use pseudo inverse (SVD)!

!

Computing a linear approximation!

  • End effector only locally moves linearly!
  • So iterate (choosing proper step size) and update Jacobian after each step!
  • Choosing step size requires line search at each step!
  • Choose some step size (say 5 degrees) and compute how to update joint parameters!
  • Calculate distance of end effector from goal!
  • If distance decreased take step!
  • Is distance did not decrease set parameters to be half the current change and try again!

!

33 19-Kinematics.key - April 13, 2015

34

Inverse Kinematics

  • More complex systems!
  • More complex joints (prism and ball)!
  • More links!
  • Other criteria (COM or height)!
  • Hard constraints (joint limits)!
  • Multiple criteria and multiple chains

34 19-Kinematics.key - April 13, 2015

slide-18
SLIDE 18

35

Inverse Kinematics

  • Some issues!
  • How to pick from multiple solutions?!
  • Robustness when no solutions!
  • Contradictory solutions!
  • Smooth interpolation !
  • Interpolation aware of constraints!

!

  • Numerical evaluation of Jacobian

35 19-Kinematics.key - April 13, 2015

36

Inverse Kinematics

Prism Joints

} }

36 19-Kinematics.key - April 13, 2015

slide-19
SLIDE 19

37

Inverse Kinematics

Ball Joints

37 19-Kinematics.key - April 13, 2015

38

Inverse Kinematics

Ball Joints (moving axis)

That is the Jacobian for this joint

{

38 19-Kinematics.key - April 13, 2015

slide-20
SLIDE 20

39

Inverse Kinematics

Ball Joints (fixed axis)

That is the Jacobian for this joint

{

39 19-Kinematics.key - April 13, 2015

40

Inverse Kinematics

  • Many links / joints!
  • Need a generic method for building Jacobian

1 2a 3 2b

40 19-Kinematics.key - April 13, 2015

slide-21
SLIDE 21

41

Inverse Kinematics

  • Can’t just concatenate individual matrices

1 2a 3 2b

41 19-Kinematics.key - April 13, 2015

42

Inverse Kinematics

Transformation from body to world Rotation from body to world

42 19-Kinematics.key - April 13, 2015

slide-22
SLIDE 22

43

Inverse Kinematics

Need to transform Jacobians to common coordinate system (WORLD)

2b 3 1 2a 2b 3

43 19-Kinematics.key - April 13, 2015

44

Inverse Kinematics

Note: Each row in the above should be transposed....

44 19-Kinematics.key - April 13, 2015

slide-23
SLIDE 23

45

Suggested Reading

  • Advanced Animation and Rendering Techniques by Watt

and Watt!

  • Chapters 15 and 16

45 19-Kinematics.key - April 13, 2015