Robotics. Why Robotics? Practice Promise Why Robotics? Vibrant field.
CS I400/B659: Intelligent Robotics
description
Transcript of CS I400/B659: Intelligent Robotics
![Page 1: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/1.jpg)
CS I400/B659: Intelligent RoboticsTransformations and Matrix Algebra
![Page 2: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/2.jpg)
Agenda• Principles, Ch. 3.5-8
![Page 3: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/3.jpg)
Rigid Objects
![Page 4: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/4.jpg)
Biological systems, virtual characters
![Page 5: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/5.jpg)
Articulated Robot
• Robot: usually a rigid articulated structure
• Geometric CAD models, relative to reference frames
• A configuration specifies the placement of those frames
q1
q2
![Page 6: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/6.jpg)
reference point
Rigid Transformation in 2D
• Robot R0R2 given in reference frame T0
• Located at configuration q = (tx,ty,q) with q [0,2p)
tx
tyq
robot reference direction
workspaceFrame T0
![Page 7: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/7.jpg)
reference point
Rigid Transformation in 2D
• Robot R0R2 given in reference frame T0
• Located at configuration q = (tx,ty,q) with q [0,2p)
• Point P on the robot (e.g., a camera) has coordinates in frame T0.• What are the coordinates of P in the workspace?
tx
tyq
robot reference direction
workspaceFrame T0
PP
![Page 8: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/8.jpg)
Rigid Transformation in 2D
• Robot at configuration q = (tx,ty,q) with q [0,2p)• Point P on the robot (e.g., a camera) has coordinates in
frame T0.• What are the coordinates of P in the workspace?
• Think of 2 steps: 1) rotating about the origin point by angle q, then 2) translating the reference point to (tx,ty)
![Page 9: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/9.jpg)
• X axis of T0 gets coords , Y axis gets
Rotations in 2D
q
cos q
sin q
-sin q
cos q
![Page 10: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/10.jpg)
• X axis of T0 gets coords , Y axis gets
• gets rotated to coords
Rotations in 2D
q
cos q
sin q
-sin q
cos q
px
py 𝑝 𝑦 ⋅ �⃗� 𝑝𝑥 ⋅ �⃗�
![Page 11: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/11.jpg)
• X axis of T0 gets coords , Y axis gets
• gets rotated to coords
Rotations in 2D
q
cos q
sin q
pxcos q -pysin q
cos q
px
py 𝑝 𝑦 ⋅ �⃗� 𝑝𝑥 ⋅ �⃗�pxsin q +pycos q
-sin q
![Page 12: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/12.jpg)
Dot product
• For any P=(px,py) rotated by any q, we have the new coordinates
• We can express each element as a dot product:
• Definition: • In 3D, • Key properties:
• Symmetric• 0 only if and are perpendicular (orthogonal)
![Page 13: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/13.jpg)
Properties of the dot product• In 2D: • In 3D: • In n-D:• Key properties:
• Symmetric• 0 only if and are perpendicular (orthogonal)
![Page 14: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/14.jpg)
Properties of the dot product• In 2D: • In 3D: • In n-D:• Key properties:
• Symmetric• 0 only if and are perpendicular (orthogonal)
𝑣
�⃗� If is a unit vector () then is the length of the projection of onto .
![Page 15: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/15.jpg)
Properties of the dot product• In 2D: • In 3D: • In n-D:• Key properties:
• Symmetric• 0 only if and are perpendicular (orthogonal)
𝑦
�⃗� If and are unit vectors with inner angle then =
𝜃
cos𝜃
![Page 16: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/16.jpg)
Matrix-vector multiplication
• For any P=(px,py) rotated by any q, we have the new coordinates
• We can express this as a matrix-vector product:
![Page 17: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/17.jpg)
Matrix-vector multiplication
• For any P=(px,py) rotated by any q, we have the new coordinates
• We can express this as a matrix-vector product:
• Or, for A a 2x2 table of numbers• Each entry of is the dot product between the corresponding
row of A and
![Page 18: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/18.jpg)
Matrix-vector multiplication
• For any P=(px,py) rotated by any q, we have the new coordinates
• We can express this as a matrix-vector product:
• Or, for A a 2x2 table of numbers• Each entry of is the dot product between the corresponding
row of A and
![Page 19: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/19.jpg)
Matrix-vector multiplication
• For any P=(px,py) rotated by any q, we have the new coordinates
• We can express this as a matrix-vector product:
• Or, for A a 2x2 table of numbers• Each entry of is the dot product between the corresponding
row of A and
![Page 20: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/20.jpg)
Matrix-vector product examples
![Page 21: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/21.jpg)
General equations
• A has dimensions m x n, has m entries, has n entries• for each i=1,…,m
![Page 22: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/22.jpg)
Matrix-vector product examples
![Page 23: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/23.jpg)
Multiple rotations• Define the 2D rotation matrix • We know that the new coordinates of a point rotated by is
given by • What if we rotate again by ? What are the new coordinates ?
![Page 24: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/24.jpg)
Multiple rotations• Define the 2D rotation matrix • We know that the new coordinates of a point rotated by is
given by • What if we rotate again by ? What are the new coordinates ?
![Page 25: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/25.jpg)
Multiple rotations• Define the 2D rotation matrix • We know that the new coordinates of a point rotated by is
given by • What if we rotate again by ? What are the new coordinates ?
![Page 26: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/26.jpg)
Multiple rotations• Define the 2D rotation matrix • We know that the new coordinates of a point rotated by is
given by • What if we rotate again by ? What are the new coordinates ?
Is it possible to define matrix-matrix multiplication so that ?
![Page 27: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/27.jpg)
Matrix-matrix multiplication• so must be 2x2
![Page 28: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/28.jpg)
Matrix-matrix multiplication• so must be 2x2
Entry (1,1) Row 1 Column 1
![Page 29: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/29.jpg)
Matrix-matrix multiplication• so must be 2x2
Entry (1,2) Row 1 Column 2
![Page 30: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/30.jpg)
Matrix-matrix multiplication• so must be 2x2
Entry (2,1) Row 2
Column 1
![Page 31: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/31.jpg)
Matrix-matrix multiplication• so must be 2x2
Entry (2,2) Row 2
Column 2
![Page 32: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/32.jpg)
Matrix-matrix multiplication• so must be 2x2
![Page 33: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/33.jpg)
Matrix-matrix multiplication• so must be 2x2
• Verify that
![Page 34: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/34.jpg)
Rotation matrix-matrix multiplication• so must be 2x2
![Page 35: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/35.jpg)
Rotation matrix-matrix multiplication• so must be 2x2
![Page 36: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/36.jpg)
Rotation matrix-matrix multiplication• so must be 2x2
• So,
![Page 37: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/37.jpg)
General definition• If A and B are m x p and p x n matrices, respectively, then the
matrix-matrix product is given by the m x n matrix C with entries
![Page 38: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/38.jpg)
Other Fun Facts• An nxn identity matrix has 1’s on its diagonals and 0s
everywhere else• for all vectors • for all nxm matrices • for all mxn matrices
• If A and B are square matrices such that , then B is called the inverse of A (and A is the inverse of B)• Not all matrices are invertible
• The transpose of a matrix mxn matrix is the nxm matrix formed swapping its rows and columns. It is denoted .• i.e.,
![Page 39: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/39.jpg)
Consequence: rotation inverse• Since …• (the identity matrix)
• But • …so a rotation matrix’s inverse is its transpose.
![Page 40: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/40.jpg)
Rigid Transformation in 2D• q = (tx,ty,q) with q [0,2p)
• Robot R0R2 given in reference frame T0
• What’s the new robot Rq? {Tq(x,y) | (x,y) R0}
• Define rigid transformation Tq(x,y) : R2 R2
Tq(x,y) = cos θ -sin θsin θ cos θ
xy
tx
ty+
2D rotation matrix Affine translation
![Page 41: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/41.jpg)
Note: transforming points vs directional quantities• Rigid transform q = (tx,ty,q)
• A point with coordinates (x,y) in T0 undergoes rotation and affine translation
• Directional quantities (e.g., velocity, force) are not affected by the affine translation!
Tq(x,y) = cos θ -sin θsin θ cos θ
xy
tx
ty+
Rq(vx,vy) = cos θ -sin θsin θ cos θ
vx
vy
![Page 42: CS I400/B659: Intelligent Robotics](https://reader035.fdocuments.net/reader035/viewer/2022062411/56816764550346895ddc437e/html5/thumbnails/42.jpg)
Next Lecture• Optional: A Mathematical Introduction to Robotic
Manipulation, Ch. 2.1-3• http://www.cds.caltech.edu/~murray/mlswiki/?title=First_edition