190 likes | 438 Views
Translation, Rotation, and Transformation. Translations (Simple, Linear, Commutative). D y. D x. Rotations Differ from Translations. Rotations are non-Euclidean like travelling on a globe vs. a grid Rotations are not commutative
E N D
Rotations Differ from Translations • Rotations are non-Euclidean • like travelling on a globe vs. a grid • Rotations are not commutative • x-rotate, y-rotate is not equal y-rotate, x-rotate etc. • Rotations are non-linear
j j é ù cos -sin 0 ê ú = j j R sin cos 0 ê ú z ê ú 0 0 1 ë û Basic Rotation about Z-axis
Rotation Parameterization • Represent rotation space in Euclidean R3 • e.g. Euler angles • Pros • three parameters for three DOFs • Cons • singularities, potentially poor interpolation
Euler angles(φ,θ,ψ) • An Euler angle is a rotation about a single Cartesian axis • Create multi-DOF rotations by concatenating Eulers • R = Rψ RθRφ • 3 DOFs can be obtained by concatenating:
j j é ù cos -sin 0 é ù 1 0 0 y y é ù cos -sin 0 ê ú ê ú = j j R sin cos 0 ê ú = q q R 0 cos -sin ê ú j = y y ê ú R sin cos 0 q ê ú y ê ú 0 0 1 q q ê ú ë û 0 sin cos ë û ê ú 0 0 1 ë û X-Convention • Most commonly used • The rotation given by Euler angles(φ,θ,ψ), where the first rotation is by an angle φ about the z-axis, the second is by an angle θ about the x-axis, and the third is by an angle ψ about the z-axis (again). • R = Rψ RθRφ
é ù 1 0 0 q q j j é ù cos 0 sin é ù cos -sin 0 ê ú ê ú ê ú = y y R 0 cos -sin = j j = R sin cos 0 R 0 1 0 ê ú y ê ú ê ú j q y y ê ú 0 sin cos ë û ê ú q q ê ú 0 0 1 -sin 0 cos ë û ë û Yaw-Pitch-Roll Convention
Singularities • More than one sets of parameters can create the same rotation matrix. • Gimbal lock - two or more axes align, results in loss of rotational DOFs • For Yaw-Pitch-Roll Convention
Rotation Axis + Angle • Euler’s Rotation Theorem: • all rotations can be expressed as axis/angle
Rotation Matrix V = (1-Cos[q]) C = Cos[q] S = Sin[q] For given axis U(unit length) = {u1, u2, u3}T and rotation angle q u1u 2V – u3 S u12 V + C u1u3V + u 2S R = u 2u1V + u3 S u 2u3V – u1 S u 22 V + C u32 V + C u3u1V – u2 S u3u 2V + u1 S
Solution of Axis and Angle Sin[q] = ½{(R32-R23)2+(R13-R31)2+(R21-R12)2}(1/2) Cos[q] = (Trace[R]-1) / 2 q = Atan2(Sin[q], Cos[q]) -p < q < p y u1 = (R32-R23) / (2 Sin[q]) All Sine u2 = (R13-R31) / (2 Sin[q]) x Cosine Tan u3 = (R21-R12) / (2 Sin[q])
TransformationAP = ATBBP B BP A AP
Example: ATB = zA 5 xB yA yB xA zB
Cube of Sides 2 ATB = yB xB yA xA
Multiple Transformations AP = ATB BTC CTDDP Also DTA = (ATD)T
EOM’s • Newton SF=ma, SM=Ia I L SM=Ia - m g L Sin[q] = I a m g L Sin[q] + I a = 0 q mg
EOM’s • Lagrangian L = K – P (kinetic and potential energy) L q mg