20
Lecture 05: Exponential Coordinates & Homogeneous Transformations Prof. Katie Driggs-Campbell Co-Teaching with Prof. Belabbas September 7, 2021

Lecture 05: Exponential Coordinates & Homogeneous

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 05: Exponential Coordinates & Homogeneous

Lecture 05:Exponential Coordinates &

Homogeneous TransformationsProf. Katie Driggs-Campbell

Co-Teaching with Prof. Belabbas

September 7, 2021

Page 2: Lecture 05: Exponential Coordinates & Homogeneous

The First Friendly Robot

• In 1923, Prof. Makoto Nishimura saw R.U.R., who became deeply troubled with the idea that humans would struggle against artificial life • He was likely influenced by the increasingly popular automata,

mechanical figures that would exhibit autonomous behaviors

• He feared that humanity would be “destroyed by the pinnacle of its creation”

• Nishimura decided to create a different kind of artificial human that would celebrate nature, called Gakutensoku• Nishimura refused to call his creation a robot. He named it

Gakutensoku, meaning “learning from the rules of nature”

• Disappeared after touring through Japan, China, and Korea

• Gakutensoku had a longstanding impact on Japanese robotics: many robot makers believe that machines are not in opposition to nature but rather part of it

https://spectrum.ieee.org/robotics/humanoids/the-short-strange-life-of-the-first-friendly-robot

This enlightened deity would be revealed “seated on agilded pedestal with its eyes closed, seemingly lost inthought. In its left hand, it holds an electric light with acrystal-shaped bulb, which it slowly lifts into the air. … Thelightbulb illuminates, the giant opens its eyes, as if having arealization. Seemingly pleased with its eureka moment, itsmiles. Soon, it shifts its attention to a blank piece of paperlying in front of it and begins to write, eagerly recording itsnewfound insights.”

Page 3: Lecture 05: Exponential Coordinates & Homogeneous

Administrivia

• Homework 2 is due Friday 9/10 at 8pm

• Project Update 0 will be due 9/11 at midnight

Page 4: Lecture 05: Exponential Coordinates & Homogeneous

Angular Velocities

Page 5: Lecture 05: Exponential Coordinates & Homogeneous

Angular Velocities in Reference Frame

Page 6: Lecture 05: Exponential Coordinates & Homogeneous

Some useful properties and relations

Given any 𝜔 ∈ ℝ3 and 𝑅 ∈ 𝑆𝑂 3 , the following holds: 𝑅 𝜔 𝑅⊤ = 𝑅𝜔

Now recall: 𝜔𝑠 = ሶ𝑅𝑅⊤

If 𝑅 is 𝑅𝑠𝑏, we have that 𝜔𝑠 = 𝑅𝜔𝑏 ⇔ 𝜔𝑏 = 𝑅⊤𝜔𝑠

𝜔𝑏 = 𝑅⊤𝜔𝑠 = 𝑅⊤ ሶ𝑅𝑅⊤ 𝑅 = 𝑅⊤ ሶ𝑅 = 𝑅−1 ሶ𝑅

This gives us: 𝜔𝑠 = ሶ𝑅𝑅⊤ and 𝜔𝑏 = 𝑅⊤ ሶ𝑅

Page 7: Lecture 05: Exponential Coordinates & Homogeneous

Introducing Exponential Coordinates

Page 8: Lecture 05: Exponential Coordinates & Homogeneous

Recall the Matrix Exponential

If ሶ𝑥 𝑡 = 𝐴𝑥 𝑡 , 𝑥 0 = 𝑥0, where 𝑥 ∈ ℝ𝑛, 𝐴 ∈ ℝ𝑛×𝑛, the solution to the ODE is:

𝑥 𝑡 = 𝑒𝐴𝑡𝑥0The matrix exponential / the exponential function can be expanded:

𝑒𝐴𝑡 = 𝐼 + 𝐴𝑡 +1

2𝐴2𝑡2 +

1

3!𝐴3𝑡3 +⋯

Properties:

1.𝑑

𝑑𝑡𝑒𝐴𝑡 = 𝐴𝑒𝐴𝑡 = 𝑒𝐴𝑡𝐴

2. If 𝐴 = 𝑃𝐷𝑃−1, then 𝑒𝐴𝑡 = 𝑃𝑒𝐷𝑡𝑃−1

3. If 𝐴𝐵 = 𝐵𝐴, then 𝑒𝐴𝑒𝐵 = 𝑒𝐵𝑒𝐴 = 𝑒𝐴+𝐵

4. Invertible: 𝑒𝐴𝑡 −1 = 𝑒−𝐴𝑡

Page 9: Lecture 05: Exponential Coordinates & Homogeneous

Exponential Coordinate Representation• Instead representing orientation as a rotation matrix, we introduce a three-

parameter representation: exponential coordinates

• Recall: ෝ𝜔 rotation axis, 𝜃 angle of rotation

• Then ෝ𝜔𝜃 ∈ ℝ3gives the exponential coordinate representation

• A new interpretation for a frame coincident with 𝑠 :• A rotation for 1 second around ෝ𝜔 at angular velocity 𝜃, then the resulting frame is 𝑅

• A rotation for 𝜃 seconds around ෝ𝜔 at angular velocity 1, then the resulting frame is 𝑅

Page 10: Lecture 05: Exponential Coordinates & Homogeneous

Exponential Coordinates of Rotations

Page 11: Lecture 05: Exponential Coordinates & Homogeneous

Matrix Logarithm

• Given rotation matrix 𝑅, we need to take the logarithm to find the exponential coordinates:

• If we expand Rodrigues formula:Rot ෝ𝜔, 𝜃 = 𝐼 + sin 𝜃 ෝ𝜔 + 1 − cos 𝜃 ෝ𝜔 2

Rot ෝ𝜔, 𝜃

=

𝑐𝜃 + ෝ𝜔12(1 − 𝑐𝜃) ෝ𝜔1 ෝ𝜔2(1 − 𝑐𝜃) − ෝ𝜔3𝑠𝜃 ෝ𝜔1 ෝ𝜔3 1 − 𝑐𝜃 + ෝ𝜔2𝑠𝜃

ෝ𝜔1 ෝ𝜔2(1 − 𝑐𝜃) + ෝ𝜔3𝑠𝜃 𝑐𝜃 + ෝ𝜔22 1 − 𝑐𝜃 ෝ𝜔2 ෝ𝜔3(1 − 𝑐𝜃) − ෝ𝜔1𝑠𝜃

ෝ𝜔1 ෝ𝜔3(1 − 𝑐𝜃) − ෝ𝜔2𝑠𝜃 ෝ𝜔2 ෝ𝜔3(1 − 𝑐𝜃) + ෝ𝜔1𝑠𝜃 𝑐𝜃 + ෝ𝜔32 1 − 𝑐𝜃

exp: ෝ𝜔 𝜃 ∈ 𝑠𝑜(3) → 𝑅 ∈ 𝑆𝑂(3)

log: 𝑅 ∈ 𝑆𝑂(3) → ෝ𝜔 𝜃 ∈ 𝑠𝑜(3)

Page 12: Lecture 05: Exponential Coordinates & Homogeneous

Matrix Logarithm Method

• If we take the trace of the matrix, we can solve for 𝜃:• 𝑡𝑟 𝑅 ≔ 𝑟11 + 𝑟22 + 𝑟33 = 1 + 2 cos 𝜃

• If we compute 𝑅⊤ − 𝑅, we get:• 𝑟32 − 𝑟23 = 2ෝ𝜔1 sin 𝜃

• 𝑟13 − 𝑟31 = 2ෝ𝜔2 sin 𝜃 ෝ𝜔 =1

2 sin 𝜃𝑅⊤ − 𝑅

• 𝑟21 − 𝑟12 = 2ෝ𝜔3 sin 𝜃

• But what if sin 𝜃 = 0? (called singularities)• If 𝜃 = 2𝑘𝜋, we have rotated by 360 degrees

• If 𝜃 = (2𝑘 + 1)𝜋, then Rodrigues formula is 𝑅 = 𝐼 + 2 ෝ𝜔 2, which gives:

ෝ𝜔𝑖 = ±𝑟𝑖𝑖+1

2and 2ෝ𝜔𝑖 ෝ𝜔𝑗 = 𝑟𝑖𝑗 for 𝑖 ≠ 𝑗

Page 13: Lecture 05: Exponential Coordinates & Homogeneous

Homogeneous Transformations: SE(3)

The special Euclidean group 𝑺𝑬(𝟑) is the set of 4 × 4 matrices of the form:

𝑇 = 𝑇 𝑅, 𝑝 =𝑅 𝑝0 1

• The inverse of 𝑇 is 𝑇−1 = 𝑅⊤ −𝑅⊤𝑝0 1

∈ 𝑆𝐸(3)

• If 𝑇1 and 𝑇2 ∈ 𝑆𝐸(3), then 𝑇1𝑇2 ∈ 𝑆𝐸(3)

• 𝑇 satisfies: 𝑇𝑥 − 𝑇𝑦 = 𝑥 − 𝑦 and

𝑇𝑥 − 𝑇𝑧 ⊤ 𝑇𝑦 − 𝑇𝑧 = 𝑥 − 𝑧 ⊤ 𝑦 − 𝑧

Page 14: Lecture 05: Exponential Coordinates & Homogeneous

Representing a configuration with SE(3)

Each frame can represent a body frame in a multi-link mechanism

As before:

𝑇𝑎𝑏𝑇𝑏𝑐 = 𝑇𝑎𝑐𝑇𝑎𝑏𝑣𝑏 = 𝑣𝑎

Page 15: Lecture 05: Exponential Coordinates & Homogeneous

Displacing Frames (1)

Page 16: Lecture 05: Exponential Coordinates & Homogeneous

Example Displacement (1)

Page 17: Lecture 05: Exponential Coordinates & Homogeneous

Displacing Frames (2)

Page 18: Lecture 05: Exponential Coordinates & Homogeneous

Example Displacement (2)

Page 19: Lecture 05: Exponential Coordinates & Homogeneous

Mobile arm example• Robot arm mounted on wheeled platform.

Camera fixed to ceiling.

• {b} is body frame, {c} end-effector frame, {e} frame of object, and {a} is fixed frame.

• We assume the camera position and orientation in {a} is given.

• From camera measurements, you can evaluate the position and orientation of the body and the object in the camera frame.

• Since we designed our robot and have joint-angle estimates, we can obtain the end-effector position and orientation in the body frame.

• To pick up the object, we need the object position and orientation in the frame of our end-effector.

Page 20: Lecture 05: Exponential Coordinates & Homogeneous

Summary

• Introduced exponential coordinates that allow us to parameterize rotations by the rotation axis ෝ𝜔 and the angle of rotation 𝜃

• Walked through the matrix logarithm method, which tells us how to recover the exponential coordinates from a rotation matrix

• Started discussing homogeneous transformations where we not only look at rotations, but also translations in a single operation