第2章 · 原课件与完整中文翻译
上方为英文原页,下方为对应的完整中文翻译,标题、正文、图内文字和公式按原页顺序排列。
页号按PDF顺序。原课件的历史日期、学期、课堂安排和研究结论按原文保留;相关概念与适用条件见教程正文。符号、代码、作者姓名及便于检索的专有名称保留原文。
Lecture 02 · 73页
Lecture 02 · PDF p1
Lecture 02 · PDF p2

| 活动 | 日期与时间 | 主题 | 内容 |
|---|---|---|---|
| 授课 | 2025年2月24日 星期一15:10 | 机器人学基础 I | 刚体和关节物体的运动学 |
| 授课 | 2025年3月3日 星期一15:10 | 机器人学基础 II | 运动规划 |
| 授课 | 2025年3月10日 星期一15:10 | 机器人学基础 III | 控制算法(PD、PID) |
(暂定安排)
完整且最新的安排见 https://pku-epic.github.io/Intro2EAI_2025/schedule/。
Lecture 02 · PDF p3
Lecture 02 · PDF p4
Lecture 02 · PDF p5
Lecture 02 · PDF p6
Lecture 02 · PDF p7
Lecture 02 · PDF p8
Lecture 02 · PDF p9
Lecture 02 · PDF p10
Lecture 02 · PDF p11
Lecture 02 · PDF p12
Lecture 02 · PDF p13

- 形式上,
- \[o_b^{s} = o_s^{s} + t_{s\to b}^{s}\]
- \[[x_b^{s}, y_b^{s}, z_b^{s}] = R_{s\to b}^{s}[x_s^{s}, y_s^{s}, z_s^{s}]\]
- 因为观察者使用 \(F_s\) 记录一切,
- \[o_s^{s} = 0\]
- \[[x_s^{s}, y_s^{s}, z_s^{s}] = I_{3\times 3}\]
- 因此,
- \[t_{s\to b}^{s} = o_b^{s}\]
- \[R_{s\to b}^{s} = [x_b^{s}, y_b^{s}, z_b^{s}] \in \mathbb{R}^{3\times 3}\]
Lecture 02 · PDF p14
Lecture 02 · PDF p15
Lecture 02 · PDF p16
Lecture 02 · PDF p17
Lecture 02 · PDF p18
Lecture 02 · PDF p19

- \[p_{1}^{s} = R_{s\to b}^{s}p_{1}^{b} + t_{s\to b}^{s}\]
- \[p_{2}^{s} = R_{s\to b}^{s}p_{2}^{b} + t_{s\to b}^{s}\]
- 当 \(t_{s\to b}^{s} \ne 0\) 时,\(p_{1}^{s} + p_{2}^{s} \ne R_{s\to b}^{s}(p_{1}^{b} + p_{2}^{b}) + t_{s\to b}^{s}\)。
- 类似地,当 \(t_{s\to b}^{s} \ne 0\) 时,\(\alpha p_{1}^{s} \ne R_{s\to b}^{s}(\alpha p_{1}^{b}) + t_{s\to b}^{s}\)。
- 能将这个变换表示为线性运算吗?
Lecture 02 · PDF p20
Lecture 02 · PDF p21
Lecture 02 · PDF p22

由 \(x^{1} = T_{1\to 2}^{1}x^{2}\),得 \(x^{2} = T_{2\to 1}^{2}x^{1}\) 和 \(x^{3} = T_{3\to 2}^{3}x^{2}\)。
因此,\(x^{3} = T_{3\to 2}^{3}T_{2\to 1}^{2}x^{1}\)。但 \(x^{3} = T_{3\to 1}^{3}x^{1}\)。
- 复合规则:\(T_{3\to 1}^{3} = T_{3\to 2}^{3}T_{2\to 1}^{2}\)。
由 \(x^{1} = T_{1\to 2}^{1}x^{2}\),得 \(x^{2} = (T_{1\to 2}^{1})^{-1}x^{1}\)。
- 改变观察者坐标系:\(T_{2\to 1}^{2} = (T_{1\to 2}^{1})^{-1}\)。
Lecture 02 · PDF p23
Lecture 02 · PDF p24
Lecture 02 · PDF p25
Lecture 02 · PDF p26
Lecture 02 · PDF p27
Lecture 02 · PDF p28
Lecture 02 · PDF p29
Lecture 02 · PDF p30
Lecture 02 · PDF p31
Lecture 02 · PDF p32
Lecture 02 · PDF p33
Lecture 02 · PDF p34
Lecture 02 · PDF p35
Lecture 02 · PDF p36
Lecture 02 · PDF p37

基座 → 末端执行器。
\[T_{0\to 3}^{0} = T_{0\to 1}^{0}T_{1\to 2}^{1}T_{2\to 3}^{2}\]
\[= \begin{bmatrix}\cos \theta _{1} & -\sin \theta _{1} & 0 & -\sin \theta _{1}(l_{2}+l_{3}) \\ \sin \theta _{1} & \cos \theta _{1} & 0 & \cos \theta _{1}(l_{2}+l_{3}) \\ 0 & 0 & 1 & l_{1}-l_{4}+\theta _{2} \\ 0 & 0 & 0 & 1\end{bmatrix}\]
\[= \begin{bmatrix}R_{s\to e}^{s} & t_{s\to e}^{s} \\ 0 & 1\end{bmatrix}\]
Lecture 02 · PDF p38
Lecture 02 · PDF p39
Lecture 02 · PDF p40
Lecture 02 · PDF p41
Lecture 02 · PDF p42
Lecture 02 · PDF p43
Lecture 02 · PDF p44
Lecture 02 · PDF p45
Lecture 02 · PDF p46

- NVIDIA 的 cuRobo 和 cuMotion 软件包实现了无碰撞逆向运动学求解器。https://youtu.be/Ux9tFBRLR-A
- 在 GPU 上使用多个不同种子(初始 \(\theta\))并行求解。
cuRobo:并行化的无碰撞最小加加速度机器人运动生成。
NVIDIA。
Balakumar Sundaralingam*、Siva Kumar Sastry Hari*、Adam Fishman、Caelan Garrett、Karl Van Wyk、Valts Blukis、Alexander Millane、Helen Oleynikova、Ankur Handa、Fabio Ramos、Nathan Ratliff、Dieter Fox。
Lecture 02 · PDF p47
Lecture 02 · PDF p48
Lecture 02 · PDF p49
Lecture 02 · PDF p50
Lecture 02 · PDF p51
Lecture 02 · PDF p52
Lecture 02 · PDF p53
Lecture 02 · PDF p54
Lecture 02 · PDF p55
Lecture 02 · PDF p56
Lecture 02 · PDF p57

- 绕主轴的旋转表示为:
\[R_x(\alpha ) := \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos \alpha & -\sin \alpha \\ 0 & \sin \alpha & \cos \alpha \end{bmatrix}\]
\[R_y(\beta ) := \begin{bmatrix}\cos \beta & 0 & \sin \beta \\ 0 & 1 & 0 \\ -\sin \beta & 0 & \cos \beta \end{bmatrix}\]
\[R_z(\gamma ) := \begin{bmatrix}\cos \gamma & -\sin \gamma & 0 \\ \sin \gamma & \cos \gamma & 0 \\ 0 & 0 & 1\end{bmatrix}\]
- 任意旋转可写为 \(R = R_z(\alpha )R_y(\beta )R_x(\gamma )\)。
Lecture 02 · PDF p58
Lecture 02 · PDF p59

- 例如,当 \(\beta = \frac{\pi}{2}\) 时,
\[R = R_z(\alpha )R_y(\frac{\pi}{2})R_x(\gamma )\]
\[= \begin{bmatrix}0 & 0 & 1 \\ \sin(\alpha +\gamma ) & \cos(\alpha +\gamma ) & 0 \\ -\cos(\alpha +\gamma ) & \sin(\alpha +\gamma ) & 0\end{bmatrix}\]
因为改变 \(\alpha\) 和 \(\gamma\) 会产生相同的效果,所以一个自由度消失了!
Lecture 02 · PDF p60
Lecture 02 · PDF p61
Lecture 02 · PDF p62

- 任意旋转都等价于绕一条固定轴 \(\hat{\omega } \in \mathbb{R}^{3}\)(\(\lVert \hat{\omega }\rVert = 1\))转过正角度 \(\theta\)。
- \(\hat{\omega }\):旋转轴的单位向量。
- \(\theta\):旋转角度。
- \[R \in \mathrm{SO}(3) := \operatorname{Rot}(\hat{\omega }, \theta )\]
图中:\(\omega = \theta \hat{\omega }\)。
给定 \(\hat{\omega }\) 和 \(\theta\text{,}R \in \mathrm{SO}(3)\) 是什么?
Lecture 02 · PDF p63
Lecture 02 · PDF p64

- 可以证明,对任意 \(x \in \mathbb{R}^{3}\),
\[\operatorname{Rot}(\hat{\omega }, \theta )x = x + (\sin \theta )\hat{\omega } \times x + (1 - \cos \theta )\hat{\omega } \times (\hat{\omega } \times x)\]
\[= \{I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\}x\]。(1)
Lecture 02 · PDF p65

- 可以证明,对任意 \(x \in \mathbb{R}^{3}\),
\[\operatorname{Rot}(\hat{\omega }, \theta )x = x + (\sin \theta )\hat{\omega } \times x + (1 - \cos \theta )\hat{\omega } \times (\hat{\omega } \times x)\]
\[= \{I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\}x\]。(1)
- 利用 \(\sin\)、\(\cos\) 的泰勒展开、\([\hat{\omega }]^{3} = -[\hat{\omega }]\) 以及上式,
\[\operatorname{Rot}(\hat{\omega }, \theta )x = (I + \theta [\hat{\omega }] + (\frac{\theta ^{2}}{2!})[\hat{\omega }]^{2} + (\frac{\theta ^{3}}{3!})[\hat{\omega }]^{3} + \cdots)x\]
Lecture 02 · PDF p66

- 可以证明,对任意 \(x \in \mathbb{R}^{3}\),
\[\operatorname{Rot}(\hat{\omega }, \theta )x = x + (\sin \theta )\hat{\omega } \times x + (1 - \cos \theta )\hat{\omega } \times (\hat{\omega } \times x)\]
\[= \{I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\}x\]。(1)
- 利用 \(\sin\)、\(\cos\) 的泰勒展开、\([\hat{\omega }]^{3} = -[\hat{\omega }]\) 以及上式,
\[\operatorname{Rot}(\hat{\omega }, \theta )x = (I + \theta [\hat{\omega }] + (\frac{\theta ^{2}}{2!})[\hat{\omega }]^{2} + (\frac{\theta ^{3}}{3!})[\hat{\omega }]^{3} + \cdots)x\]
- 回顾指数函数的泰勒展开:\(e^{x} = 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \cdots\)。
Lecture 02 · PDF p67

- 可以证明,对任意 \(x \in \mathbb{R}^{3}\),
\[\operatorname{Rot}(\hat{\omega }, \theta )x = x + (\sin \theta )\hat{\omega } \times x + (1 - \cos \theta )\hat{\omega } \times (\hat{\omega } \times x)\]
\[= \{I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\}x\]。(1)
- 利用 \(\sin\)、\(\cos\) 的泰勒展开、\([\hat{\omega }]^{3} = -[\hat{\omega }]\) 以及上式,
\[\operatorname{Rot}(\hat{\omega }, \theta )x = (I + \theta [\hat{\omega }] + (\frac{\theta ^{2}}{2!})[\hat{\omega }]^{2} + (\frac{\theta ^{3}}{3!})[\hat{\omega }]^{3} + \cdots)x\]
- 回顾指数函数的泰勒展开:\(e^{x} = 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \cdots\)。
- 形式上,有 \(\operatorname{Rot}(\hat{\omega }, \theta )x = \exp(\theta [\hat{\omega }]) x\),对所有 \(x \in \mathbb{R}^{3}\)。
Lecture 02 · PDF p68

- 由 \(\operatorname{Rot}(\hat{\omega }, \theta )x = \exp(\theta [\hat{\omega }]) x\),对所有 \(x \in \mathbb{R}^{3}\),得 \(\operatorname{Rot}(\hat{\omega }, \theta ) \equiv \exp(\theta [\hat{\omega }])\)。
- 这里采用如下矩阵指数定义:
\[\exp(\theta [\hat{\omega }]) = I + \theta [\hat{\omega }] + (\frac{\theta ^{2}}{2!})[\hat{\omega }]^{2} + (\frac{\theta ^{3}}{3!})[\hat{\omega }]^{3} + \cdots\]
- 根据上一张幻灯片的式(1),得到 Rodrigues 公式:
\[\exp(\theta [\hat{\omega }]) = I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\]
Lecture 02 · PDF p69
Lecture 02 · PDF p70

- 矩阵指数的定义:
\[\exp(\theta [\hat{\omega }]) = I + \theta [\hat{\omega }] + (\frac{\theta ^{2}}{2!})[\hat{\omega }]^{2} + (\frac{\theta ^{3}}{3!})[\hat{\omega }]^{3} + \cdots\]
- 无穷级数求和?Rodrigues 公式。
- 可以证明 \([\hat{\omega }]^{3} = -[\hat{\omega }]\)。
- 再使用 \(\sin\) 和 \(\cos\) 的泰勒展开。
- \[\exp(\theta [\hat{\omega }]) = I + [\hat{\omega }]\sin \theta + [\hat{\omega }]^{2}(1 - \cos \theta )\]
Lecture 02 · PDF p71

- 第一个问题:存在唯一的参数化吗?
- 不存在:
1. \((\hat{\omega }, \theta )\) 与 \((-\hat{\omega }, -\theta )\) 给出相同的旋转。
2. 当 \(R = I\) 时,\(\theta = 0\text{,}\hat{\omega }\) 可以任取。
3. \((\hat{\omega }, \pi )\) 与 \((-\hat{\omega }, \pi )\) 给出相同的旋转(\(\operatorname{tr}(R) = -1\))。
- 如果限定 \(\theta \in (0, \pi )\),则存在唯一的参数化:
- \[\theta = \arccos(\frac{\operatorname{tr}(R)-1}{2})\text{,}[\hat{\omega }] = \frac{R-R^{T}}{2\sin \theta }\]
Lecture 02 · PDF p72

- 如何度量旋转 \((R_{1}, R_{2})\) 之间的距离?
- 一种自然的观点,是度量将刚体从 \(R_{1}\) 位姿旋转到 \(R_{2}\) 位姿所需的(最小)努力:
因为 \((R_{2}R_{1}^{T})R_{1} = R_{2}\),
所以 \(\operatorname{dist}(R_{1}, R_{2}) = \theta (R_{2}R_{1}^{T}) = \arccos(\frac{\operatorname{tr}(R_{2}R_{1}^{T})-1}{2})\)。
图中坐标轴:X、Y、Z;两个朝向:\(R_{1}\)、\(R_{2}\)。
Lecture 02 · PDF p73























































