Self-assessment guide: These exercises cover the mathematical foundations of rotation, rigid-body motion, and optimization on non-Euclidean spaces — the backbone of modern robotics state estimation. Complete them in order; later exercises build directly on earlier results.
Difficulty key: ⭐ Foundational | ⭐⭐ Intermediate | ⭐⭐⭐ Advanced | ⭐⭐⭐⭐ Challenge
A1. ⭐ Verify whether $(\mathbb{R}^{2 \times 2}, \cdot)$ — all $2 \times 2$ real matrices under multiplication — forms a group. Check each axiom: 1. Closure 2. Associativity 3. Identity element 4. Inverse element
Which axiom fails? What minimal restriction on the set fixes it?
Closure: Product of two $2 \times 2$ matrices is $2 \times 2$. ✓
Associativity: Matrix multiplication is associative for all matrices. ✓
Identity: $I_2 = \begin{pmatrix}1&0\\0&1\end{pmatrix}$ satisfies $AI = IA = A$. ✓
Inverse: Fails. The zero matrix $0_{2\times 2}$ has no inverse. More generally, any singular matrix ($\det A = 0$) has no inverse.
Fix: Restrict to $\text{GL}(2, \mathbb{R}) = \{A \in \mathbb{R}^{2\times 2} \mid \det A \neq 0\}$, the general linear group. Now every element has an inverse since $A^{-1} = \frac{1}{\det A}\text{adj}(A)$ exists. Closure holds because $\det(AB) = \det(A)\det(B) \neq 0$.
A2. ⭐ Consider the set of $2\times 2$ rotation matrices $\text{SO}(2)$. Every element has the form:
1. Composition:
Using the angle addition formulas for sine and cosine. ✓
2. Identity: $R(0) = I_2$, since $\cos 0 = 1$, $\sin 0 = 0$.
3. Inverse: $R(\theta)^{-1} = R(-\theta) = R(\theta)^T$. This follows from $R(\theta)R(-\theta) = R(0) = I$.
4. Isomorphism: $\text{SO}(2) \cong (\mathbb{R}/2\pi\mathbb{Z}, +)$ — the additive group of angles modulo $2\pi$. Also isomorphic to $U(1)$, the unit complex numbers under multiplication via $e^{i\theta} \mapsto R(\theta)$.
A3. ⭐⭐ Prove that $\text{O}(n) = \{Q \in \mathbb{R}^{n\times n} \mid Q^T Q = I\}$ is a subgroup of $\text{GL}(n, \mathbb{R})$.
Then prove that $\text{SO}(n) = \{Q \in \text{O}(n) \mid \det Q = +1\}$ is a subgroup of $\text{O}(n)$.
$\text{O}(n) \leq \text{GL}(n)$: Use the one-step subgroup test ($H \leq G$ iff $\forall a,b \in H: ab^{-1} \in H$).
So $AB^{-1} = AB^T \in \text{O}(n)$. ✓ ∎
$\text{SO}(n) \leq \text{O}(n)$:
Group hierarchy: $\text{SO}(n) \leq \text{O}(n) \leq \text{GL}(n, \mathbb{R})$. Each is a normal subgroup of the next ($\text{SO}(n)$ has index 2 in $\text{O}(n)$).
A4. ⭐⭐ Let $\mathfrak{so}(3) = \{\Omega \in \mathbb{R}^{3\times 3} \mid \Omega^T = -\Omega\}$ be the set of $3\times 3$ skew-symmetric matrices.
1. Dimension: A $3\times 3$ skew-symmetric matrix has the form:
with 3 free parameters $(\omega_1, \omega_2, \omega_3)$. So $\dim \mathfrak{so}(3) = 3$.
Basis:
These are the generators of $\text{SO}(3)$.
2. Hat map: $\omega = (\omega_1, \omega_2, \omega_3)^T \mapsto [\omega]_\times = \omega^\wedge$ as above. It is linear: $(\alpha\omega + \beta\eta)^\wedge = \alpha\omega^\wedge + \beta\eta^\wedge$ (direct computation). Injective: $\omega^\wedge = 0 \implies \omega = 0$. Surjective: every skew-symmetric matrix has this form. Since $\dim \mathbb{R}^3 = \dim \mathfrak{so}(3) = 3$, it is a linear isomorphism. ✓
3. Cross-product equivalence:
A5. ⭐⭐⭐ The matrix groups $\text{GL}(n)$, $\text{O}(n)$, $\text{SO}(n)$, $\text{SL}(n)$ all have manifold structure.
1. $\text{GL}(n)$ is defined by $\det A \neq 0$, which is an open condition. $\dim \text{GL}(n) = n^2$.
2. $Q^T Q = I$ gives $\frac{n(n+1)}{2}$ independent scalar constraints (the product is symmetric, so the upper triangle gives the constraints). Thus:
3. - $\dim \text{SO}(3) = \frac{3 \cdot 2}{2} = 3$ (same as $\text{O}(3)$, since the $\det = +1$ constraint selects a connected component, not reducing dimension). - $\dim \text{SE}(3) = \dim \text{SO}(3) + 3 = 6$ (3 rotation + 3 translation).
4. This is a topological obstruction. $\text{SO}(3)$ is diffeomorphic to $\mathbb{RP}^3$ (real projective 3-space), which is compact and non-contractible. Any smooth map $\mathbb{R}^3 \to \text{SO}(3)$ that is locally a diffeomorphism must have singularities — this is the hairy ball theorem generalization. Euler angles hit gimbal lock; no 3-parameter representation avoids this. Quaternions use 4 parameters with one constraint ($\|q\| = 1$).
B1. ⭐ Compute the following compositions in $\text{SO}(3)$. Use the axis-angle interpretation.
1. Using the elementary rotation matrices:
This is a 120° rotation about the axis $\frac{1}{\sqrt{3}}(1,1,1)^T$ (cyclic permutation of axes).
2.
This is a 120° rotation about $\frac{1}{\sqrt{3}}(1,-1,-1)^T$.
3. They are not equal. $\text{SO}(3)$ is a non-abelian group — rotation order matters. This is in contrast to $\text{SO}(2)$, which is abelian ($R(\alpha)R(\beta) = R(\alpha+\beta) = R(\beta)R(\alpha)$).
B2. ⭐⭐ Derive Rodrigues’ rotation formula. Given axis $\hat{n}$ ($\|\hat{n}\| = 1$) and angle $\theta$, show that:
Hint: Decompose any vector $v$ into components parallel and perpendicular to $\hat{n}$.
Decomposition: For any vector $v$: - Parallel component: $v_\parallel = (\hat{n}^T v)\hat{n} = \hat{n}\hat{n}^T v$ - Perpendicular component: $v_\perp = v - v_\parallel = (I - \hat{n}\hat{n}^T) v$
Rotation only affects $v_\perp$. The rotated $v_\perp$ in the plane perpendicular to $\hat{n}$ is:
The full rotated vector:
Now use the identity $\hat{n}\hat{n}^T = I + [\hat{n}]_\times^2$ (verify: $[\hat{n}]_\times^2 = \hat{n}\hat{n}^T - I$ for $\|\hat{n}\|=1$):
Therefore:
B3. ⭐⭐ Unit quaternion $q = (w, x, y, z)$ with $\|q\| = 1$ represents a rotation. Given $q_1 = \frac{1}{\sqrt{2}}(1, 0, 0, 1)$ and $q_2 = \frac{1}{2}(1, 1, 1, 1)$:
1. For $q = (w, x, y, z)$, the angle is $\theta = 2\arccos(w)$ and axis is $\hat{n} = \frac{1}{\sin(\theta/2)}(x, y, z)^T$.
For $q_1 = \frac{1}{\sqrt{2}}(1, 0, 0, 1)$: $w = \frac{1}{\sqrt{2}}$, so $\theta = 2\arccos\frac{1}{\sqrt{2}} = 2 \cdot 45° = 90°$.
Axis: $\hat{n} = \frac{1}{\sin 45°}(0, 0, 1)^T = \frac{1}{1/\sqrt{2}}(0,0,1)^T = (0,0,1)^T$. So $q_1$ represents a 90° rotation about $z$.
2. Quaternion product (Hamilton product):
With $q_1 = \frac{1}{\sqrt{2}}(1,0,0,1)$ and $q_2 = \frac{1}{2}(1,1,1,1)$:
Wait, let’s redo carefully: $\frac{1}{2\sqrt{2}}(0, 0, 2, 2) = (0, 0, \frac{2}{2\sqrt{2}}, \frac{2}{2\sqrt{2}}) = (0, 0, \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$.
3. Norm: $\|q_1 q_2\| = \sqrt{0 + 0 + \frac{1}{2} + \frac{1}{2}} = 1$ ✓
This is a general property: the product of unit quaternions is always a unit quaternion.
B4. ⭐⭐⭐ Prove the double cover property: the map $\phi: S^3 \to \text{SO}(3)$ defined by $q \mapsto R(q)$ satisfies $\phi(q) = \phi(-q)$.
Then explain why this matters for interpolation in robotics. (AMR connection: AMR heading representation.)
Proof: The rotation matrix from a quaternion $q = (w, x, y, z)$ is:
Every entry is quadratic in $(w,x,y,z)$. Replacing $q$ with $-q$ (i.e., $w\to -w, x\to -x, y\to -y, z\to -z$) does not change any entry, since $(-w)(-z) = wz$, $(-y)^2 = y^2$, etc.
Therefore $R(q) = R(-q)$: two antipodal quaternions map to the same rotation. The map is exactly 2-to-1.
Robotics implication: When interpolating (SLERP) between quaternions $q_0$ and $q_1$, you must check the sign: if $q_0 \cdot q_1 < 0$, negate one quaternion first, otherwise SLERP will take the long path around $S^3$ (a 270° rotation instead of 90°). On the AMR, heading is stored as a quaternion $(w, 0, 0, z)$ in the $z$-plane. Failing to handle the sign ambiguity can cause the robot to spin 270° instead of 90° during a turn command — a real bug class in AMR navigation.
B5. ⭐⭐⭐ Implement SLERP (Spherical Linear Interpolation) between two quaternions. Given $q_0, q_1$ and $t \in [0,1]$:
where $\cos\Omega = q_0 \cdot q_1$.
1. When $\Omega \approx 0$, $\sin\Omega \approx 0$ causing division by zero. For small $\Omega$, SLERP degenerates to LERP: $\text{SLERP} \approx (1-t)q_0 + t\,q_1$, then renormalize.
2. Python implementation:
import numpy as np
def slerp(q0, q1, t):
"""Spherical linear interpolation between unit quaternions."""
q0 = np.asarray(q0, dtype=float)
q1 = np.asarray(q1, dtype=float)
dot = np.dot(q0, q1)
# Handle double cover: ensure shortest path
if dot < 0:
q1 = -q1
dot = -dot
dot = np.clip(dot, -1.0, 1.0)
# For nearly identical quaternions, use linear interpolation
if dot > 0.9995:
result = q0 + t * (q1 - q0)
return result / np.linalg.norm(result)
omega = np.arccos(dot)
sin_omega = np.sin(omega)
s0 = np.sin((1 - t) * omega) / sin_omega
s1 = np.sin(t * omega) / sin_omega
return s0 * q0 + s1 * q1
3. $q_0 = (1,0,0,0)$, $q_1 = (0,0,0,1)$. $\cos\Omega = 0$, so $\Omega = \pi/2$.
This is a 90° rotation about $z$ — exactly the midpoint between 0° and 180°. ✓
C1. ⭐ Compute $\exp(\theta\, e_3^\wedge)$ where $e_3 = (0,0,1)^T$, i.e., find $\exp\begin{pmatrix}0&-\theta&0\\\theta&0&0\\0&0&0\end{pmatrix}$ by direct series expansion.
Let $\Omega = \theta\,e_3^\wedge = \theta\begin{pmatrix}0&-1&0\\1&0&0\\0&0&0\end{pmatrix}$.
Observe the powers: - $\Omega^2 = \theta^2\begin{pmatrix}-1&0&0\\0&-1&0\\0&0&0\end{pmatrix}$ - $\Omega^3 = \theta^3\begin{pmatrix}0&1&0\\-1&0&0\\0&0&0\end{pmatrix} = -\theta^2 \Omega$ - $\Omega^4 = \theta^4\begin{pmatrix}1&0&0\\0&1&0\\0&0&0\end{pmatrix} = -\theta^2 \Omega^2$
The pattern repeats with period 4 (up to sign and power of $\theta$). Grouping the series:
The $(1,1)$ entry: $1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots = \cos\theta$
The $(1,2)$ entry: $-\theta + \frac{\theta^3}{3!} - \cdots = -\sin\theta$
The $(3,3)$ entry: $1 + 0 + 0 + \cdots = 1$
This confirms: the exponential map sends Lie algebra elements to Lie group elements. Rotation about $z$ by angle $\theta$ corresponds to the algebra element $\theta\, e_3^\wedge$.
C2. ⭐⭐ The closed-form exponential map for $\text{SO}(3)$ is:
where $\theta = \|\omega\|$. Show that this is equivalent to Rodrigues’ formula (Exercise B2).
Write $\omega = \theta\hat{n}$ where $\hat{n} = \omega/\|\omega\|$ is the unit axis and $\theta = \|\omega\|$.
Then $\omega^\wedge = \theta\,[\hat{n}]_\times$, and $(\omega^\wedge)^2 = \theta^2 [\hat{n}]_\times^2$.
Substituting:
This is exactly Rodrigues’ formula from B2. ✓
Key insight: Rodrigues’ formula is the exponential map for $\text{SO}(3)$, expressed in terms of the unit axis $\hat{n}$ and angle $\theta$. The Lie algebra parametrization $\omega \in \mathbb{R}^3$ is the axis-angle vector (axis direction encodes the rotation axis, magnitude encodes the angle).
C3. ⭐⭐⭐ Derive the logarithmic map for $\text{SO}(3)$: given $R \in \text{SO}(3)$, find $\omega$ such that $\exp(\omega^\wedge) = R$.
1. Angle extraction: From Rodrigues: $R = I + \sin\theta\,[\hat{n}]_\times + (1-\cos\theta)[\hat{n}]_\times^2$.
Taking the trace: $\text{tr}(R) = 3 + 0 + (1-\cos\theta)\text{tr}([\hat{n}]_\times^2)$.
Since $\text{tr}([\hat{n}]_\times^2) = -2\|\hat{n}\|^2 = -2$:
2. Axis extraction: The skew-symmetric part of $R$:
Since $[\hat{n}]_\times$ is skew: $[\hat{n}]_\times^T = -[\hat{n}]_\times$, and $[\hat{n}]_\times^2$ is symmetric: $([\hat{n}]_\times^2)^T = [\hat{n}]_\times^2$.
3. Special cases:
$\theta = 0$: $R = I$, so $\omega = 0$. Trivial.
$\theta = \pi$: $\sin\theta = 0$, formula breaks. Here $R = I + 2[\hat{n}]_\times^2 = 2\hat{n}\hat{n}^T - I$. The axis $\hat{n}$ can be extracted from the eigenvector of $R$ with eigenvalue $+1$, or from the column of $R + I$ with largest norm (then normalize). Note: $\hat{n}$ has a sign ambiguity at $\theta = \pi$.
C4. ⭐⭐⭐ The Baker-Campbell-Hausdorff (BCH) formula gives the composition in the Lie algebra:
where $[A,B] = AB - BA$ is the Lie bracket.
1. Let $A = \omega_1^\wedge$, $B = \omega_2^\wedge$. Using the identity for skew-symmetric matrices:
For $3\times 3$ skew matrices, this equals $(\omega_1 \times \omega_2)^\wedge$. (This can be verified by expanding the matrix product component-wise.)
Physical meaning: The Lie bracket of two infinitesimal rotations is an infinitesimal rotation about the cross-product axis. This is why angular velocities compose via cross products.
2. First-order BCH says $R_1 R_2 \approx \exp((\omega_1 + \omega_2)^\wedge)$. This neglects the commutator $\frac{1}{2}[\omega_1^\wedge, \omega_2^\wedge]$. For large rotations, this commutator can be significant — e.g., two 90° rotations about different axes compose to something far from a simple sum (recall B1: the result was 120°, not $90° + 90° = 180°$).
3. For the AMR at typical update rates (100–200 Hz), per-timestep rotations are $< 1°$ ($< 0.02$ rad). The commutator term is $O(\delta\theta^2) \approx O(10^{-4})$ rad, which is negligible compared to sensor noise ($\sim 10^{-2}$ rad). So first-order BCH is safe at high IMU rates but would fail for low-rate updates or aggressive maneuvers.
C5. ⭐⭐⭐⭐ Write a numerically stable Python function that computes both $\exp: \mathfrak{so}(3) \to \text{SO}(3)$ and $\log: \text{SO}(3) \to \mathfrak{so}(3)$, handling all edge cases ($\theta \approx 0$, $\theta \approx \pi$). Verify round-trip accuracy on 10,000 random rotations.
import numpy as np
def hat(omega):
"""R^3 -> so(3): vector to skew-symmetric matrix."""
return np.array([
[0, -omega[2], omega[1]],
[omega[2], 0, -omega[0]],
[-omega[1], omega[0], 0]
])
def vee(Omega):
"""so(3) -> R^3: skew-symmetric matrix to vector."""
return np.array([Omega[2,1], Omega[0,2], Omega[1,0]])
def so3_exp(omega):
"""Exponential map: R^3 -> SO(3)."""
theta = np.linalg.norm(omega)
if theta < 1e-10:
# First-order Taylor: exp(Ω) ≈ I + Ω
return np.eye(3) + hat(omega)
K = hat(omega) / theta # unit skew matrix
return (np.eye(3)
+ np.sin(theta) * K
+ (1 - np.cos(theta)) * K @ K)
def so3_log(R):
"""Logarithmic map: SO(3) -> R^3."""
cos_theta = np.clip((np.trace(R) - 1) / 2, -1.0, 1.0)
theta = np.arccos(cos_theta)
if theta < 1e-10:
# Near identity: log(R) ≈ R - I (skew part)
return vee(0.5 * (R - R.T))
if np.abs(theta - np.pi) < 1e-6:
# Near 180°: extract axis from R + I
M = R + np.eye(3)
# Pick column with largest norm
col_norms = np.linalg.norm(M, axis=0)
k = np.argmax(col_norms)
n_hat = M[:, k] / col_norms[k]
return theta * n_hat
# General case
skew = (R - R.T) / (2 * np.sin(theta))
return theta * vee(skew)
# Verification
errors = []
for _ in range(10000):
omega = np.random.randn(3) * np.pi * np.random.rand()
R = so3_exp(omega)
omega_recovered = so3_log(R)
R_recovered = so3_exp(omega_recovered)
errors.append(np.linalg.norm(R - R_recovered, 'fro'))
print(f"Max round-trip error: {max(errors):.2e}") # Should be < 1e-12
print(f"Mean round-trip error: {np.mean(errors):.2e}")
Expected output: max error $\sim 10^{-14}$, confirming numerical stability across all rotation magnitudes.
D1. ⭐ The group $\text{SE}(2)$ represents rigid-body motion in the plane. Its elements are:
1. Composition:
The rotation composes multiplicatively; the translation is $t_1$ plus $t_2$ rotated into frame 1.
2. Inverse:
Verify: $T T^{-1} = \begin{pmatrix}RR^T & -RR^Tt + t \\ 0 & 1\end{pmatrix} = \begin{pmatrix}I & 0 \\ 0 & 1\end{pmatrix}$. ✓
3. The world-frame position is:
This is the standard body-to-world transformation used in every AMR localization system.
D2. ⭐⭐ The Lie algebra $\mathfrak{se}(3)$ represents twists (infinitesimal rigid motions). A twist $\xi = (\omega, v)^T \in \mathbb{R}^6$ maps to:
1. $\dim \mathfrak{se}(3) = 6$: 3 for angular velocity $\omega$ + 3 for linear velocity $v$.
2. For $\xi = (0, 0, \omega_z, v_x, v_y, 0)^T$:
This is planar motion — rotation about $z$ plus translation in the $xy$-plane. The full $\text{SE}(3)$ twist reduces to an $\text{SE}(2)$ twist when $\omega_x = \omega_y = v_z = 0$.
3. The AMR moves in the ground plane. In body frame, forward is $+x$ (or $+y$ depending on convention). For forward speed $v$ and yaw rate $\omega$:
This is a screw motion: pure rotation about a point offset from the robot (the instantaneous center of rotation, at distance $r = v/\omega$ from the robot center).
D3. ⭐⭐⭐ The left Jacobian of $\text{SO}(3)$ appears when differentiating the exponential map:
Its closed form is:
1. As $\theta = \|\omega\| \to 0$: - $\frac{1-\cos\theta}{\theta^2} \to \frac{1}{2}$ (L’Hôpital or Taylor) - $\frac{\theta-\sin\theta}{\theta^3} \to \frac{1}{6}$
But $\omega^\wedge \to 0$ and $(\omega^\wedge)^2 \to 0$, so all correction terms vanish: $J_l(0) = I$. ✓
Near identity, the exponential map behaves like the identity map — small rotations in the algebra correspond directly to small rotations in the group.
2. $J_r(\omega) = J_l(-\omega)$:
Replace $\omega$ with $-\omega$: $\theta$ stays the same ($\|-\omega\| = \|\omega\|$), $(-\omega)^\wedge = -\omega^\wedge$, $(-\omega^\wedge)^2 = (\omega^\wedge)^2$.
3. In optimization, we perturb a rotation $R$ by a small increment $\delta\phi \in \mathbb{R}^3$:
or $R' = \exp(\delta\phi^\wedge) \cdot R$ (left perturbation). When computing Jacobians of residuals $r(R)$ w.r.t. $\delta\phi$, the chain rule picks up a factor of $J_l$ or $J_r$:
Without these Jacobians, the Gauss-Newton update direction would be incorrect, causing poor convergence or divergence in pose-graph SLAM.
D4. ⭐⭐⭐ The adjoint representation of $\text{SE}(3)$ is the $6\times 6$ matrix:
for $T = (R, t) \in \text{SE}(3)$.
1. This is the defining property of the adjoint. Starting from $T\exp(\xi^\wedge)$, we want to “move” the perturbation to the left:
The adjoint maps the algebra element: $T \xi^\wedge T^{-1} = (\text{Ad}_T \xi)^\wedge$.
Explicitly for $T = (R,t)$ and $\xi = (\omega, v)$:
The angular part is simply rotated. The linear part includes both the rotated velocity and the velocity induced by rotating about an offset point $t$.
2. Pure translation $T = (I, t)$:
Angular velocity unchanged; linear velocity gains a $[t]_\times \omega$ term (like $v = \omega \times t$).
3. Pure rotation $T = (R, 0)$:
Both angular and linear velocity are rotated by $R$. This is a pure frame rotation.
D5. ⭐⭐⭐⭐ Derive the perturbation model for a point observation in $\text{SE}(3)$. A camera at pose $T = (R, t)$ observes a 3D point $p$. The observation function is:
Compute $\frac{\partial h}{\partial \delta\xi}$ using the left perturbation model $T' = \exp(\delta\xi^\wedge) T$.
The perturbed observation:
where $R' = \exp(\delta\phi^\wedge)R$ and $t' = \exp(\delta\phi^\wedge)t + J_l(\delta\phi)\delta\rho$.
For small $\delta\xi = (\delta\phi, \delta\rho)^T$:
Substituting:
Using $[\delta\phi]_\times q = -[q]_\times \delta\phi$:
Therefore:
This Jacobian is essential for visual SLAM, where each landmark observation contributes a row to the system Jacobian. The left perturbation model keeps the Jacobian in a consistent global frame.
E1. ⭐ In Euclidean optimization, we update $x \gets x + \Delta x$. Explain why this fails for $R \in \text{SO}(3)$, and describe the retraction-based update:
Why does this stay on the manifold?
Why additive update fails: If $R \in \text{SO}(3)$ and $\Delta R \in \mathbb{R}^{3\times 3}$, then $R + \Delta R$ is generically not in $\text{SO}(3)$: it won’t satisfy $R^T R = I$ or $\det R = 1$. The rotation matrices form a curved surface (manifold) in $\mathbb{R}^{3\times 3}$; straight-line steps leave the surface.
Retraction-based update: $\exp(\delta\phi^\wedge) \in \text{SO}(3)$ for any $\delta\phi \in \mathbb{R}^3$. Since $\text{SO}(3)$ is a group, $R \cdot \exp(\delta\phi^\wedge) \in \text{SO}(3)$. The update:
This is a retraction — a map from the tangent space back to the manifold. The exponential map is the canonical retraction for Lie groups. Alternative cheaper retractions exist (e.g., Cayley map), but $\exp$ is geometrically exact.
E2. ⭐⭐ Formulate a simple rotation averaging problem. Given $N$ noisy rotation measurements $\tilde{R}_i \approx R_{\text{true}}$, find:
1. Residual: $r_i(R) = \log(R^{-1}\tilde{R}_i)^\vee \in \mathbb{R}^3$ (the rotation error in the tangent space).
The cost is $f(R) = \sum_i \|r_i\|^2$.
2. Right perturbation: $R' = R\exp(\delta\phi^\wedge)$. Then:
Using the BCH first-order approximation for small $\delta\phi$.
The Jacobian w.r.t. $\delta\phi$: $\frac{\partial r_i}{\partial \delta\phi} = -J_r^{-1}(r_i)$.
Gauss-Newton: Stack residuals $r = (r_1, \ldots, r_N)^T$ and Jacobians $J$:
Update: $R \gets R\exp((\delta\phi^*)^\wedge)$.
For small residuals ($R$ close to $\tilde{R}_i$), $J_r^{-1} \approx I$, and the update simplifies to the Riemannian mean:
3. Geometric interpretation: The cost measures the sum of squared geodesic distances on $\text{SO}(3)$ from $R$ to each measurement $\tilde{R}_i$. The solution $R^*$ is the Fréchet mean — the rotation that minimizes total squared geodesic distance, the manifold analogue of the Euclidean centroid.
E3. ⭐⭐⭐ (AMR connection) Solve a small 2D pose-graph SLAM problem on $\text{SE}(2)$. Given:
Set up the cost function and Jacobian structure. Describe (but don’t fully solve) one Gauss-Newton iteration.
State: $x = (x_1, y_1, \theta_1, x_2, y_2, \theta_2)^T \in \mathbb{R}^6$ (pose 0 is fixed).
Residuals: For each edge $(i,j)$ with measurement $\Delta_{ij}$:
This is the difference between the predicted relative pose $T_i^{-1} T_j$ and the measured $\Delta_{ij}$, expressed in the tangent space.
Cost: $f(x) = \sum_{(i,j)} r_{ij}^T \Omega_{ij} r_{ij}$ where $\Omega_{ij}$ is the information matrix (inverse covariance) of each measurement.
Jacobian structure ($9 \times 6$ system, 3 edges × 3 residual each, 2 free poses × 3 DOF):
Wait — let me write this correctly. With perturbation model $T_i' = T_i \exp(\delta\xi_i^\wedge)$:
The Jacobians are $3\times 3$ blocks:
Gauss-Newton update:
where $\Omega = \text{blkdiag}(\Omega_{01}, \Omega_{12}, \Omega_{02})$.
Solve the $6\times 6$ system for $\delta\xi = (\delta\xi_1, \delta\xi_2)$, then update:
This is the core algorithm of every pose-graph SLAM solver (g2o, GTSAM, Ceres). The AMR uses this structure for fusing wheel odometry and lidar scan-matching constraints.
E4. ⭐⭐⭐⭐ Compare the convergence behavior of manifold Gauss-Newton vs. naive Euler-angle parametrization near gimbal lock. Consider estimating a rotation near $R_{\text{true}} = R_y(89°)$:
1. In $ZYX$ Euler angles $(\alpha, \beta, \gamma)$, the angular velocity maps via:
At $\beta = 90°$, $\cos\beta = 0$, and the matrix becomes rank-2. The Jacobian $\partial r / \partial(\alpha,\beta,\gamma)$ becomes rank-deficient. The Hessian $H = J^TJ$ is singular, and the Gauss-Newton system has no unique solution. Practically: the solver diverges or oscillates.
2. The Lie algebra perturbation $R' = R\exp(\delta\phi^\wedge)$ works in the tangent space at the current estimate. The Jacobian $\partial r / \partial \delta\phi$ is always full-rank (3×3 and invertible) as long as the problem is locally observable. There is no special configuration analogous to gimbal lock — every rotation has a well-defined tangent space of dimension 3.
3. Experiment design:
# Setup: estimate R from 100 noisy rotation measurements near R_y(89°)
# Method A: Gauss-Newton in Euler angles (α, β, γ)
# Method B: Gauss-Newton with SO(3) exponential map perturbation
#
# For each method:
# - Initialize at R_y(88°)
# - Run 50 iterations
# - Track cost and step size per iteration
#
# Expected results:
# - Method A: cost oscillates or diverges after ~5 iterations
# (Hessian condition number > 10^10 near β=89°)
# - Method B: converges in 3-5 iterations to correct solution
# (Hessian condition number ~ 10^1)
#
# Vary β from 0° to 89.99° and plot condition number of H
# to show gimbal lock is a parametrization artifact.
The key insight: gimbal lock is not a property of rotations — it is a singularity in the parametrization. The manifold $\text{SO}(3)$ is perfectly smooth everywhere.
E5. ⭐⭐⭐⭐ Prove that the Gauss-Newton method on $\text{SO}(3)$ with the exponential map retraction has local quadratic convergence under standard assumptions (small residuals, full-rank Jacobian).
Hint: Show that the retraction $R \cdot \exp(\delta\phi^\wedge)$ is a second-order approximation to the geodesic, and apply the standard Gauss-Newton convergence theory in the tangent space.
Setup: Let $f(R) = \frac{1}{2}\|r(R)\|^2$ where $r: \text{SO}(3) \to \mathbb{R}^m$ is a smooth residual function. We use the right perturbation model.
Step 1: Retraction quality. The exponential map is a second-order retraction, meaning:
where $\gamma_R$ is the geodesic from $R$ in direction $\delta\phi$. This is because $\exp$ is the Riemannian exponential for the bi-invariant metric on $\text{SO}(3)$.
Step 2: Local model. In the tangent space $T_R\text{SO}(3) \cong \mathbb{R}^3$, define:
where $J = \frac{\partial r}{\partial \delta\phi}\big|_{\delta\phi=0}$.
Step 3: GN update. The Gauss-Newton step $\delta\phi^* = -(J^TJ)^{-1}J^T r$ minimizes $\|\hat{r}_{\text{lin}}\|^2$. Standard GN theory in $\mathbb{R}^3$ gives:
when the residual at the solution is small ($\|r(R^*)\| \approx 0$) and $J$ is full rank.
Step 4: Manifold transfer. Because the exponential retraction is second-order, the error introduced by mapping back to the manifold is $O(\|\delta\phi\|^3)$, which does not degrade the quadratic rate. Therefore:
where $d(\cdot, \cdot)$ is the geodesic distance.
Conclusion: Manifold Gauss-Newton inherits the local quadratic convergence of Euclidean GN, provided: 1. The retraction is second-order (exponential map qualifies) 2. Residuals at the optimum are small 3. The Jacobian is full rank
This result extends to $\text{SE}(3)$ and other Lie groups, and is the theoretical foundation for solvers like GTSAM and g2o.
F1. ⭐⭐ (AMR connection) The AMR navigation estimator fuses wheel encoders (providing $\Delta\text{SE}(2)$ increments) with an IMU gyroscope (providing angular rate $\omega_z$). The discrete-time state update is:
where $\xi_k = (0, 0, \omega_z, v_x, 0, 0)^T$.
1. For planar motion, the $\text{SE}(2)$ exponential map with $\phi = \omega_z \Delta t$ and $\rho = (v_x \Delta t, 0)^T$:
where $V = \frac{1}{\phi}\begin{pmatrix}\sin\phi & -(1-\cos\phi) \\ 1-\cos\phi & \sin\phi\end{pmatrix}$.
2. Closed form: With $\phi = \omega_z \Delta t$ and $d = v_x \Delta t$:
This is the exact circular arc: the robot traces an arc of radius $r = v_x/\omega_z$ through angle $\phi$.
3. Limit $\omega_z \to 0$: As $\phi \to 0$: - $\frac{\sin\phi}{\phi} \to 1$, $\frac{1-\cos\phi}{\phi} \to 0$ - $R(\phi) \to I$
Pure forward translation by $d = v_x \Delta t$. The circular arc degenerates to a straight line, as expected. ✓
This is why the exponential map formulation is superior to naive Euler integration ($x += v\cos\theta\,\Delta t$, $y += v\sin\theta\,\Delta t$): the exact arc model has zero integration error for constant velocity, regardless of timestep.
F2. ⭐⭐⭐ Hand-eye calibration finds the unknown rigid transform $X \in \text{SE}(3)$ satisfying $AX = XB$ where $A, B$ are known motions. Given $n$ pairs $(A_i, B_i)$:
Hmm, let’s use a cleaner approach. Show that for each pair, $(\alpha_i + \beta_i)$ must lie in a known relationship determined by $R_X$.
1. Decoupling: From $AX = XB$ in homogeneous form:
Rotation block: $R_A R_X = R_X R_B$, hence $R_X = R_A R_X R_B^{-1}$ — depends only on rotations. ✓
Translation block: $R_A t_X + t_A = R_X t_B + t_X$, i.e., $(R_A - I)t_X = R_X t_B - t_A$. This is linear in $t_X$ once $R_X$ is known.
2. Axis-angle formulation (Tsai-Lenz approach): From $R_A R_X = R_X R_B$, using the modified Rodrigues vectors $a_i = 2\sin(\alpha_i/2)\hat{n}_{A_i}$ and similarly for $b_i$, we obtain the linear system:
where $\hat{n}_X$ is the axis of $R_X$. Each pair $(A_i, B_i)$ gives 3 equations (but rank 2). This is a linear system that can be solved by stacking multiple pairs.
3. Minimum pairs: Each pair provides 2 independent rotation constraints (rank of $[a+b]_\times$ is 2). We need 3 independent constraints for $R_X$ (3 DOF), so at least 2 pairs with non-parallel rotation axes. For $t_X$ (3 more DOF), we need $R_A - I$ to have sufficient rank, requiring at least 2 pairs with non-trivial rotation. In practice, 3+ pairs with diverse motion directions are needed for a robust solution.
F3. ⭐⭐⭐ Design a trajectory interpolation scheme on $\text{SE}(3)$. Given keyframe poses $T_0, T_1, \ldots, T_N$ at times $t_0 < t_1 < \cdots < t_N$:
1. SE(3) SLERP: Between $T_a$ and $T_b$ at parameter $s \in [0,1]$:
This interpolates along the geodesic on $\text{SE}(3)$. The relative transform $\Delta = T_a^{-1} T_b$ is mapped to the Lie algebra, scaled by $s$, and applied incrementally.
2. Cubic B-spline on $\text{SE}(3)$: Given control poses $T_{i-1}, T_i, T_{i+1}, T_{i+2}$, the cumulative B-spline formulation:
where $\Omega_k = \log(T_{k-1}^{-1} T_k)$ are the inter-control-point increments in the Lie algebra, and $\tilde{B}_j(s)$ are cumulative cubic B-spline basis functions.
This produces $C^2$-continuous poses on $\text{SE}(3)$ — smooth position, velocity, and acceleration — which is critical for motion planning.
3. Advantages over Euler angle interpolation:
F4. ⭐⭐⭐⭐ IMU preintegration on $\text{SO}(3)$. An IMU provides angular velocity $\omega_k$ at each timestep $\Delta t$. The preintegrated rotation between keyframes $i$ and $j$ is:
where $b_g$ is the gyroscope bias.
1. Why preintegrate? Direct integration puts the IMU measurements into the world frame, which depends on the (unknown, being-optimized) poses $T_i$ and $T_j$. Every time the optimizer updates these poses, the entire IMU integration must be redone.
Preintegration computes the relative motion $\Delta R_{ij}$ in the body frame, which is independent of world-frame poses. When the optimizer updates $T_i$, only the residual computation changes — the preintegrated measurement is fixed. This avoids $O(N_{\text{imu}})$ re-integration per optimization iteration.
2. First-order bias correction:
The preintegrated rotation at the nominal bias $\bar{b}_g$:
Perturbing the bias by $\delta b_g$, each factor becomes:
using the BCH approximation for small $\delta b_g$. Accumulating through the product and using first-order BCH repeatedly:
3. Bias Jacobian:
This can be computed incrementally during the forward integration pass:
This is exactly the approach used in GTSAM’s PreintegratedImuMeasurements and in ORB-SLAM3’s IMU initialization.
F5. ⭐⭐⭐⭐ (AMR connection) Design a mini visual-inertial odometry (VIO) pipeline for the AMR. The robot has: - A forward-facing camera (10 Hz) - An IMU (200 Hz) - Wheel encoders (50 Hz)
Describe the state vector, the Lie group structure of each component, the residual types, and the factor graph. Your answer should address:
1. Keyframe state (at time $t_k$):
Total DOF per keyframe: $6 + 3 + 3 + 3 = 15$.
Plus a set of 3D landmarks $\{l_j \in \mathbb{R}^3\}$.
2. Factors between keyframes $k$ and $k+1$:
| Factor | Type | Residual dimension | Lie group |
|---|---|---|---|
| IMU preintegration | $\Delta R, \Delta v, \Delta p$ vs preintegrated | 9 | $\text{SO}(3) \times \mathbb{R}^6$ |
| Wheel odometry | $T_k^{-1}T_{k+1}$ vs encoder $\Delta$ | 3 (SE(2) only) | $\text{SE}(2) \subset \text{SE}(3)$ |
| Visual reprojection | $\pi(T_k^{-1} l_j)$ vs pixel | 2 per feature | — |
| Bias random walk | $b_{k+1} - b_k \sim \mathcal{N}(0, \Sigma_b \Delta t)$ | 6 | Euclidean |
3. Wheel vs IMU formulation:
where $\Pi_{xy}$ projects to the ground plane. This constrains only 3 DOF ($x, y, \theta$).
The IMU constrains all 6 pose DOF plus velocity.
4. Computational complexity:
With $K$ keyframes, $L$ landmarks, and $M$ total observations:
For a sliding window of $K = 10$ keyframes with $L = 200$ landmarks: - Reduced system: $150 \times 150$ — trivially solvable - Each GN iteration: $\sim 1\text{ms}$ on modern hardware
This is the architecture used by VINS-Mono, OKVIS, and similar VIO systems. For the AMR, the wheel encoder factor provides a strong prior on planar motion, making the system more robust in feature-poor warehouse environments than pure visual-inertial systems.
| Section | Topic | Exercises | Key Concepts |
|---|---|---|---|
| A | Group Theory Foundations | A1–A5 | Axioms, subgroups, dimension counting, hat map |
| B | SO(2) and SO(3) | B1–B5 | Rodrigues, quaternions, SLERP, double cover |
| C | Exponential/Logarithmic Maps | C1–C5 | exp/log derivation, BCH, numerical stability |
| D | SE(2)/SE(3) and Jacobians | D1–D5 | Twists, left/right Jacobians, adjoint, perturbation |
| E | Manifold Optimization | E1–E5 | Retraction, rotation averaging, pose-graph SLAM, convergence |
| F | Applications | F1–F5 | IMU preintegration, hand-eye calibration, VIO pipeline |
Difficulty distribution: ⭐ ×6 (A1, A2, B1, C1, D1, E1) | ⭐⭐ ×8 (A3, A4, B2, B3, C2, D2, E2, F1) | ⭐⭐⭐ ×10 (A5, B4, B5, C3, C4, D3, D4, E3, F2, F3) | ⭐⭐⭐⭐ ×6 (C5, D5, E4, E5, F4, F5)
Warehouse-robotics exercises: B4 (heading double cover), D1 (body-to-world transform), E3 (pose-graph SLAM), F1 (odometry integration), F5 (VIO pipeline design).