Frames & the rotation matrix
To write the energy of a real arm we first need to say exactly where each link is. It starts with one tool: a matrix that turns a vector by an angle.
Source: course notes, Week 3 (robot geometry); Spong, Lynch & Park.
Before you start
What you need first
- Coordinates as a vector \(\begin{bmatrix}x\\y\end{bmatrix}\), and the joint angle \(\theta\) as a generalized coordinate.
- \(\sin,\cos\) and the angle-addition rules.
What you'll be able to do
- Describe a point as a position vector and tell frames apart.
- Build the rotation matrix \(R(\theta)\) and use it to turn a vector.
- Know its two handy properties.
Why geometry now?
The energy method (Theme 3) needs the position of every mass (for \(V=mgh\)) and its velocity (for \(T=\tfrac12 mv^2\)). For a robot, both depend on the joint angles \(q\).
A point is a position vector
A point in the plane is two numbers — its coordinates — written as a column vector from the origin:
Coordinate frames
A frame is a set of axes we measure from. A robot uses many: one fixed to the ground, and one riding on each link.
- Ground frame — fixed to the base; the "world" we report answers in.
- Link frame — glued to a moving link; simple for a point on that link.
The core move
Rotating a point by an angle \(\theta\)
Take a point \(\mathbf{p}=(x,y)\) and spin it about the origin by \(\theta\). It moves to \(\mathbf{p}'=(x',y')\) at the same distance \(r\), just turned. We want a formula for \((x',y')\).
Derivation
Build the rotation formula
The rotation matrix \(R(\theta)\)
Write those two lines as one matrix multiply:
| Symbol | Meaning | SI unit |
|---|---|---|
| \(R(\theta)\) | the rotation matrix (turns a vector by \(\theta\)) | — |
| \(\theta\) | rotation angle (positive = counter-clockwise) | rad |
| \((x,y)\) | original point | m |
| \((x',y')\) | rotated point | m |
Rotate the point \((3,1)\) by \(30^\circ\)
Find the new coordinates after turning \((3,1)\) about the origin by \(\theta=30^\circ\) (\(\cos 30^\circ=0.866,\ \sin 30^\circ=0.5\)).
Two handy facts about \(R(\theta)\)
Its columns are the new axes
Column 1 is where the old \(x\)-axis points after turning; column 2 is the new \(y\)-axis.
Undo with the transpose
\(R(-\theta)=R(\theta)^{\mathsf T}\) — rotating back is just swapping rows and columns.
✏️ Try it yourself
Rotate the point \((4,0)\) by \(\theta=60^\circ\) about the origin (\(\cos 60^\circ=0.5,\ \sin 60^\circ=0.866\)).
Common mistakes to avoid
| Mistake | Fix |
|---|---|
| Sign slip in \(R(\theta)\) | The top-right entry is \(-\sin\theta\); bottom-left is \(+\sin\theta\). |
| Rotating with degrees in the matrix | Put numeric \(\cos,\sin\) values in — they don't care about deg/rad, but your calculator must be in the right mode. |
| Swapping rows and columns of the point | The point is a column \(\begin{bmatrix}x\\y\end{bmatrix}\); \(R\) multiplies it from the left. |
| Expecting the length to change | A pure rotation keeps \(r\) the same — a good sanity check. |
Recap — the whole topic on one screen
| Idea | What you own now |
|---|---|
| Point as a vector | \(\mathbf{p}=\begin{bmatrix}x\\y\end{bmatrix}\) from the origin |
| Frames | Ground (fixed) vs link (rides the link) |
| Rotation matrix | \(R(\theta)\) turns any vector by \(\theta\) |
| Two facts | Columns = new axes; \(R(-\theta)=R^{\mathsf T}\) |