Cinemática de cuerpos rígidos en 3D

MT3006 - Robótica 1

¿Qué ocurre en el caso 3D?

Veamos un ejemplo...

{^A}\mathbf{R}_B=\begin{bmatrix} 0.8660 & -0.5000 & 0 \\ 0.4330 & 0.7500 & -0.5000 \\ 0.2500 & 0.4330 & 0.8660 \end{bmatrix}
{^A}\mathbf{o}_B=\begin{bmatrix} 0.5 \\ 1 \\ 2 \end{bmatrix}
{^B}\mathbf{p}=\begin{bmatrix} -1 \\ 2 \\ 5 \end{bmatrix}
\{A\}
\{B\}
{^B}\mathbf{p}
{^A}\mathbf{T}_B=\begin{bmatrix} 0.8660 & -0.5000 & 0 & 0.5 \\ 0.4330 & 0.7500 & -0.5000 & 1 \\ 0.2500 & 0.4330 & 0.8660 & 2 \\ 0 & 0 & 0 & 1 \end{bmatrix}
{^B}\tilde{\mathbf{p}}=\begin{bmatrix} {^B}\mathbf{p} \\ 1 \end{bmatrix}=\begin{bmatrix} -1 \\ 2 \\ 5 \\ 1 \end{bmatrix}
\{A\}
\{B\}
{^B}\mathbf{p}
{^A}\widetilde{\mathbf{p}}={^A}\mathbf{T}_B {^B}\widetilde{\mathbf{p}} \quad \Rightarrow {^A}\mathbf{p} = \begin{bmatrix} -1.3660 \\ -0.4330 \\ 6.9462\end{bmatrix}
\{A\}
\{B\}
{^B}\mathbf{p}
{^A}\mathbf{p}

de nuevo se cumple

{^A}\mathbf{T}_B=\begin{bmatrix} {^A}\mathbf{R}_B & {^A}\mathbf{o}_B \\ \mathbf{0}_{1 \times 3} & 1 \end{bmatrix}

de nuevo se cumple

{^A}\mathbf{T}_B=\begin{bmatrix} {^A}\mathbf{R}_B & {^A}\mathbf{o}_B \\ \mathbf{0}_{1 \times 3} & 1 \end{bmatrix}

transformación homogénea

\in SE(3) \subset \mathbb{R}^{4 \times 4}

de nuevo se cumple

{^A}\mathbf{T}_B=\begin{bmatrix} {^A}\mathbf{R}_B & {^A}\mathbf{o}_B \\ \mathbf{0}_{1 \times 3} & 1 \end{bmatrix}

matriz de rotación

\in SO(3) \subset \mathbb{R}^{3 \times 3}

de nuevo se cumple

{^A}\mathbf{T}_B=\begin{bmatrix} {^A}\mathbf{R}_B & {^A}\mathbf{o}_B \\ \mathbf{0}_{1 \times 3} & 1 \end{bmatrix}

vector de traslación

\in \mathbb{R}^{3}

de nuevo se cumple

{^A}\mathbf{T}_B=\begin{bmatrix} {^A}\mathbf{R}_B & {^A}\mathbf{o}_B \\ \mathbf{0}_{1 \times 3} & 1 \end{bmatrix}

vector de traslación

\in \mathbb{R}^{3}

¿Cuál es la diferencia entonces?

{^A}\mathbf{R}_B:
{^A}\mathbf{o}_B:

2D

2

Incremento de grados de libertad

1

{^A}\mathbf{R}_B:
{^A}\mathbf{o}_B:

2D

3D

2

Incremento de grados de libertad

1

3

3

{^A}\mathbf{R}_B:
{^A}\mathbf{o}_B:

2D

3D

2

Incremento de grados de libertad

1

3

3

???

{^A}\mathbf{R}_B=\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}
{^A}\mathbf{R}_B=\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}
{^A}\mathbf{R}_B=\begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix}
{^A}\mathbf{R}_B=\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}
{^A}\mathbf{R}_B=\begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix}

la matriz de rotación ya no tiene interpretación (única)

Interpretando la matriz de rotación

en 3D

Desde la definición

matriz de rotación ortogonal

columnas vectores ortonormales

\Leftrightarrow
{^A}\mathbf{R}_B=\begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix}= \begin{bmatrix} {^A}\widehat{\mathbf{x}}_B & {^A}\widehat{\mathbf{y}}_B & {^A}\widehat{\mathbf{z}}_B \end{bmatrix}

Desde la definición

matriz de rotación ortogonal

columnas vectores ortonormales

\Leftrightarrow
{^A}\mathbf{R}_B=\begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix}= \begin{bmatrix} {^A}\widehat{\mathbf{x}}_B & {^A}\widehat{\mathbf{y}}_B & {^A}\widehat{\mathbf{z}}_B \end{bmatrix}

Desde la definición

matriz de rotación ortogonal

columnas vectores ortonormales

\Leftrightarrow
{^A}\mathbf{R}_B=\begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix}= \begin{bmatrix} {^A}\widehat{\mathbf{x}}_B & {^A}\widehat{\mathbf{y}}_B & {^A}\widehat{\mathbf{z}}_B \end{bmatrix}

vector que describe el eje \(x\) del marco \(\{B\}\) expresado en las coordenadas del marco \(\{A\}\)

Ejemplo

¿Cuál es la pose de \(\{B\}\) con respecto de \(\{I\}\)?

z
z_B
\{I\}
y_B
y
x_B
\{B\}
x

Ejemplo

¿Cuál es la pose de \(\{B\}\) con respecto de \(\{I\}\)?

{^I}\mathbf{o}_B=\begin{bmatrix} 3 & 3 & 0 \end{bmatrix}^\top
{^I}\mathbf{R}_B=\begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}
z
z_B
\{I\}
y_B
y
x_B
\{B\}
x

Ejemplo

¿Cuál es la pose de \(\{B\}\) con respecto de \(\{I\}\)?

z
z_B
\{I\}
y_B
y
x_B
\{B\}
x
{^I}\mathbf{T}_B=\begin{bmatrix} 0 & -1 & 0 & 3 \\ 1 & 0 & 0 & 3 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}

El teorema de rotación de Euler

primera interpretación

El teorema de rotación de Euler

ángulos de Euler

\mathbf{R}_x(\theta)=\begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{bmatrix}
\mathbf{R}_y(\theta)=\begin{bmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{bmatrix}
\mathbf{R}_z(\theta)=\begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}
Rx = rotx(theta)
Ry = roty(theta)
Rz = rotz(theta)

12 posibles secuencias


Euler (se repite un eje): XYX, XZX, YXY, YZY, ZXZ, ZYZ.

Cardán (no se repiten ejes): XYZ, XZY, YZX, YXZ, ZXY, ZYX.

(\psi)
z
x
y
(\theta)
(\phi)

ZYX | XYZ

ángulos de navegación

(Tait-Bryan)

\mathbf{R}_z(\psi)\mathbf{R}_y(\theta)\mathbf{R}_x(\phi)

las rotaciones son con respecto a los ejes del marco de referencia inicial \(\rightarrow\) rotación pasiva o extrínseca

Interpretando la secuencia

Interpretando la secuencia

\mathbf{R}_z(\psi)\mathbf{R}_y(\theta)\mathbf{R}_x(\phi)

Interpretando la secuencia

\mathbf{R}_z(\psi)\mathbf{R}_y(\theta)\mathbf{R}_x(\phi)
\mathbf{R}_z(\psi)\mathbf{R}_{y'}(\theta)\mathbf{R}_{x''}(\phi)

las rotaciones son con respecto a los ejes (cambiantes) del cuerpo rígido \(\rightarrow\) rotación activa o intrínseca

Interpretando la secuencia

\mathbf{R}_z(\psi)\mathbf{R}_{y'}(\theta)\mathbf{R}_{x''}(\phi)

Interpretando la secuencia

\mathbf{R}_z(\psi)\mathbf{R}_{y'}(\theta)\mathbf{R}_{x''}(\phi)

Interpretando la secuencia

Ejemplo: generación de orientación

Suponga que una cámara se encuentra montada en la posición \((1,0,1)\) respecto al centro de un robot, alineada tal que su eje \(z\) coincide con el eje \(x\) del robot y su eje \(x\) coincide con el eje \(-y\) del robot. Determine la matriz de rotación \({^R}\mathbf{R}_C\) mediante:

  1. La definición de matriz de rotación.
  2. La secuencia ZYZ de ángulos de Euler.
  3. La secuencia roll-pitch-yaw.
  4. La secuencia XYZ de ángulos de Euler.
{^R}\mathbf{R}_C=\begin{bmatrix} 0 & 0 & 1 \\ -1 & 0 & 0 \\ 0 & -1 & 0 \end{bmatrix}

Ejemplo: generación de orientación

z_R
y_R
x_R
z_C
x_C
y_C
\{R\}
\{C\}
{^R}\mathbf{R}_C=\begin{bmatrix} 0 & 0 & 1 \\ -1 & 0 & 0 \\ 0 & -1 & 0 \end{bmatrix}
\mathrm{ZYZ:} \ \ \mathbf{R}_z(0)\mathbf{R}_y(\pi/2)\mathbf{R}_z(-\pi/2)
\mathrm{ZYX:} \ \ \mathbf{R}_z(-\pi/2)\mathbf{R}_y(0)\mathbf{R}_x(-\pi/2)
\mathrm{XYZ:} \ \ \mathbf{R}_x(-\pi/2)\mathbf{R}_y(\pi/2)\mathbf{R}_z(0)
z_R
y_R
x_R
z_C
x_C
y_C
\{R\}
\{C\}

Ejemplo: generación de orientación

{^R}\mathbf{R}_C=\begin{bmatrix} 0 & 0 & 1 \\ -1 & 0 & 0 \\ 0 & -1 & 0 \end{bmatrix}
z_R
y_R
x_R
z_C
x_C
y_C
\{R\}
\{C\}

Ejemplo: generación de orientación

\mathrm{ZYZ:} \ \ \mathbf{R}_z(0)\mathbf{R}_y(\pi/2)\mathbf{R}_z(-\pi/2)
\mathrm{ZYX:} \ \ \mathbf{R}_z(-\pi/2)\mathbf{R}_y(0)\mathbf{R}_x(-\pi/2)
\mathrm{XYZ:} \ \ \mathbf{R}_x(-\pi/2)\mathbf{R}_y(\pi/2)\mathbf{R}_z(0)

>> mt3005_clase2_euler_gen.mlx

Ejemplo: interpretación

Los sensores de un avión retornaron que la pose actual del mismo \(\{B\}\) con respecto del marco de despegue \(\{A\}\) es

¿Cuál es el roll, pitch y yaw del avión?

>> mt3005_clase2_euler_avion.mlx

{^A}\mathbf{T}_B=\begin{bmatrix} 0.3536 & 0.7071 & 0.6124 & 500.0000 \\ 0.1268 & 0.6124 & -0.7803 & -700.0000 \\ -0.9268 & 0.3536 & 0.1268 & 800.0000 \\ 0 & 0 & 0 & 1 \end{bmatrix}

Es más sencillo emplear ángulos de Euler para interpretar la orientación que para generarla

¿Forma práctica para generar orientaciones y poses?

 

Transformaciones elementales

Traslación en \(x\)

\mathbf{T}_x(a)=\begin{bmatrix} 1 & 0 & 0 & a \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
Tx = transl(a, 0, 0)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_x(a)

Traslación en \(y\)

\mathbf{T}_y(a)=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & a \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
Ty = transl(0, a, 0)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_y(a)

Traslación en \(z\)

\mathbf{T}_z(a)=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & a \\ 0 & 0 & 0 & 1 \end{bmatrix}
Tz = transl(0, 0, a)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_z(a)

Rotación en \(x\)

\mathbf{T}_{r_x}(\theta)=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta & 0 \\ 0 & \sin\theta & \cos\theta & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
Trx = trotx(theta)
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_{r_x}(\theta)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}

Rotación en \(y\)

\mathbf{T}_{r_y}(\theta)=\begin{bmatrix} \cos\theta & 0 & \sin\theta & 0 \\ 0 & 1 & 0 & 0 \\ -\sin\theta & 0 & \cos\theta & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
Try = troty(theta)
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_{r_y}(\theta)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}

Rotación en \(z\)

\mathbf{T}_{r_z}(\theta)=\begin{bmatrix} \cos\theta & -\sin\theta & 0 & 0 \\ \sin\theta & \cos\theta & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
Trz = trotz(theta)
{^I}\mathbf{T}_B={^I}\mathbf{T}_A\mathbf{T}_{r_z}(\theta)
\{A\}
x_A
y_A
z_A
x_B
y_B
z_B
\{B\}

¿Cuál es la pose de \(\{B\}\) con respecto de \(\{A\}\)?

>> mt3005_clase2_transel.m

MT3005 - Lecture 2 (2025)

By Miguel Enrique Zea Arenales

MT3005 - Lecture 2 (2025)

  • 117