kinematics - seoul national...

Post on 19-Aug-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Kinematics

Jehee LeeSeoul National University

Kinematics

• How to animate skeletons (articulated figures)

• Kinematics is the study of motion without regard to the forces that caused it

Hierarchical Models

• Tree structure of joints and links– The root link can be chosen arbitrarily

• Joints– Revolute (hinge) joint allows rotation about a fixed axis– Prismatic joint allows translation along a line– Ball-and-socket joint allows rotation about an arbitrary axis

Human Joints• Human joints are actually much more complicated

Forward and Inverse Kinematics

1q

2q

)F(),( iq=qp ),(F 1 qp-=iqForward Kinematics Inverse Kinematics

1q

2q

Forward Kinematics: A Simple Example

• A simple robot arm in 2-dimensional space– 2 revolute joints– Joint angles are known– Compute the position of the end-effector

)sin(sin)cos(cos

21211

21211

qqqqqq

++=++=

llyllx

e

e2q

1q1l

2l

),( ee yx

3D Position and Orientation

• The position and orientation of an object is represented as a rigid transformation

• Vector & 3x3 Matrix

• 4x4 Matrix

• Vector & Quaternion

pqvq +-1

pRv +

÷÷ø

öççè

æ÷÷ø

öççè

æ=

11v

0pR

Tv

X ¢Y ¢

X

Y

Forward Kinematics: A Simple Example

• Forward kinematics map as a coordinate transformation– The body local coordinate system of the end-effector was initially

coincide with the global coordinate system– Forward kinematics map transforms the position and orientation

of the end-effector according to joint angles

2q

1q1l

X ¢Y ¢

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ=

÷÷÷

ø

ö

ççç

è

æ

100

1Ty

x

e

e2l

X

Y

A Chain of Transformations

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ=

÷÷÷

ø

ö

ççç

è

æ

100

1Ty

x

e

e

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

2q

1q1l

X ¢Y ¢

2l

X

Y

Thinking of Transformations

• In a view of body-attached coordinate system

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

X

Y

X ¢Y ¢

X

Y

Thinking of Transformations

• In a view of body-attached coordinate system

1qX ¢

Y ¢

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

Thinking of Transformations

• In a view of body-attached coordinate system

1q1L

X ¢Y ¢

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

2q

1q1L

X ¢Y ¢

Thinking of Transformations

• In a view of body-attached coordinate system

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

2q

1q1L

X ¢Y ¢

2L

Thinking of Transformations• In a view of body-attached coordinate system

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

Thinking of Transformations

• In a view of global coordinate system

X

Y

X ¢Y ¢

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

Thinking of Transformations

• In a view of global coordinate system

X ¢

Y ¢

2L

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

2q

X ¢Y ¢

2L

Thinking of Transformations

• In a view of global coordinate system

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

Thinking of Transformations

• In a view of global coordinate system

2q1L

X ¢Y ¢

2L

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

Thinking of Transformations• In a view of global coordinate system

2q

1q1L

X ¢Y ¢

2L

X

Y

( ) ( ) ( ) ( )

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -

÷÷÷

ø

ö

ççç

è

æ

÷÷÷

ø

ö

ççç

è

æ -=

=

100010

01

1000cossin0sincos

100010

01

1000cossin0sincos 2

22

221

11

11

2211

lltranslrottranslrotT

qqqq

qqqq

qq

How to Handle Ball-and-Socket Joints ?

• Three revolute joints whose axes intersect at a point (equivalent to Euler angles), or

• 3D rotation about an arbitrary axis

( ) ( ) ( )( ) ( )

!!

÷÷÷÷÷

ø

ö

ççççç

è

æ -

÷÷÷÷÷

ø

ö

ççççç

è

æ

-÷÷÷÷÷

ø

ö

ççççç

è

æ-

=

=

1000010000cossin00sincos

10000cos0sin00100sin0cos

10000cossin00sincos00001

21

zz

zz

yy

yy

xx

xx

zyx translrotrotrottranslT

qqqq

qq

qq

qqqq

qqq

Floating Base

• The position and orientation of the root segment are added

1q

2q

3q( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )221100 qqqq rottranslrottranslrottransltranslrotT rr=

X

Y

Joint & Link Transformations• Each segment has its own coordinate frame• Forward kinematics map is an alternating multiple of

– Joint transformations : represents joint movement– Link transformations : defines a frame relative to its parent

1L

3L

2L3322110 JLJLJLJT =

The position and orientation of the root segment

1st link transformation

1st joint transformation

Joint & Link Transformations

• Both are rigid transformations in general– Joint transformations may include translation

• Human joints are not ideal hinges– Link transformations may include rotation

• Some links are twisted

Denavit-Hartenberg Notation

),(),(),(),( 11 iiiii ZRotdZTransaXTransXRotL qa ×××= --

iiii

iiii

iiii

iiii

ZXXZXXdXZZ

XZZa

about measured and between angle the along measured to from distance the

about measured and between angle the along measured to from distance the

1

1

1

1

-

-

+

+

====

q

a

Link Transformations• How do you compute the link transform for the ith joint if

you know the position and orientation of the ith joint as well as its parent’s position and orientation at the neutral pose ?

1-iT

iL

iTiii

iii

TTLTLT11

1--

-

=

=

Representing Hierarchical Models• A tree structure

– A node contains a joint transformation– A arc contains a link transformation

0J

1J

2J

3J

1L

2L

3L

Depth-First Tree Traversal• Draw graphics needs to compute the position and

orientation of all links• OpenGL’s matrix stack is useful

0J

1J

2J

3J

1L

2L

3L

Summary• Kinematics is the study of motion of articulated figures

– Kinematics does not consider physics (forces, mass, …)

• Forward kinematics is straightforward– Forward kinematics map can be considered as a coordinate

transformation

• The next lecture: How to solve the inverse problem

Programming Assignment #1• Create a tree-structured hierarchical model of human

figures– You have to compute the forward kinematics map of your model– You may use a matrix stack to build the forward kinematics map

incrementally

• The model may be displayed using three-dimensional primitives such as polygons, boxes, cylinders, and spheres

• The joints are either revolute or ball-and-sockets

Programming Assignment #1• Animate the model to demonstrate the hierarchical

structure– For example, use sin/cos functions to make it walk and run

• Implement a scene 3D viewer– You should be able to change the viewpoint (scene

rotation/translation)– The viewer will be used in all the other programming assignment

• Submit a report of at most three A4 pages– Describe the tree-structure, joints, and geometric primitives– Describe how the joints are animated

top related