Chapter 02 · Turn the maths into robot motion
Today in the field story
One problem, then the next
Position and orientation are now separately correct, but the Camera-Crane Recovery still passes them through different code paths. Build one SE(3) transform, apply it to marked camera points with homogeneous coordinate one, and apply it to free directions with coordinate zero. Check that pairwise distances survive and that translation never changes a direction vector.
- Why now
The crane needs one inspectable operation for a rigid 3D pose before link transforms can be chained.
- Ignore today
Ignore calibration fitting and noisy measurements; use a known rigid placement.
- Unlocks next
Serial-arm forward kinematics and later camera extrinsic calibration.
Understand
Build the physical picture first
SE(3) is a rigid moving box with a three-axis compass attached. One 4×4 table stores how the box is turned and where its origin is, so the same operation can move every point fixed to the box.
A rigid 3D pose needs a 3×3 rotation R and a 3D translation t. A homogeneous transform collects them as T=[[R,t],[0,0,0,1]]. The set of all valid rigid transforms is called SE(3). Valid transforms can be composed, have valid inverses, and preserve distances between points.
The extra fourth coordinate makes rotation and translation work in one matrix multiplication. A physical point is written [x,y,z,1]ᵀ, so the translation column is included. A free direction or displacement is written [x,y,z,0]ᵀ, so translation contributes nothing. Rotation affects both.
Frame labels still govern the calculation. If T_AB maps B coordinates to A coordinates, then p_A=T_AB p_B. Composition T_AB T_BC maps C to A. Its inverse uses Rᵀ and -Rᵀt. A 4×4 matrix with the right shape is not automatically in SE(3); its R block must be a proper rotation and its last row must have the homogeneous form.
SE(3) solves representation, not calibration. A perfectly valid matrix can still contain a wrong camera offset, an old timestamp, swapped frames, or metres interpreted as millimetres. Verify one known point, one direction, pairwise distance preservation, and an inverse round trip before trusting a pose in a robot task.
Words you need
Name each idea precisely
- SE(3)
The set of rigid 3D transformations containing proper rotation and translation.
Physical example:Every collision-free pose of a solid camera body can be represented by an SE(3) matrix.
- Homogeneous transform
A 4×4 matrix combining a 3D rotation and translation.
Physical example:One matrix places every model point of a gripper into the robot base frame.
- Homogeneous point
A 3D point extended with w=1 so translation affects it.
Physical example:A marked corner on a moving box changes position when the box is carried.
- Direction vector
A free direction extended with w=0 so translation does not shift it.
Physical example:The camera's forward arrow changes with rotation but not with where the camera is placed.
- Rigid invariant
A quantity such as distance or angle that a rigid transform must preserve.
Physical example:The distance between two bolts on a gripper remains fixed in every pose.
Math, one line at a time
Work through today’s relationship
Prerequisite rescue · optionalStart at zero: turns, triangles, and pose chains
A joint turn becomes a tool position only after we define the angle, split a link into horizontal and vertical parts, and follow frame order.
- θ
- theta: the amount a joint has turnedUnit: degrees (°) or radians (rad)
- cos θ, sin θ
- horizontal and vertical fractions of a turned unit linkUnit: no unit
- Tᴬ_B
- position and direction of frame B described by frame AUnit: unitless rotation + metres
A full turn is 360° = 2π rad, so 90° × π/180 = π/2 rad. π is about 3.1416.
For a 1 m link at 90°, x = 1 cos 90° = 0 m and y = 1 sin 90° = 1 m.
For several frames, follow the physical path in order. Multiply transforms only when the touching frame names match, then verify by reversing the path.
Like nested UI transforms, each child inherits its parent's transform; unlike UI, the order can move metal into an obstacle.
What are x and y for a 2 m link at 0 rad?
x = 2 cos 0 = 2 m; y = 2 sin 0 = 0 m.
A rigid pose is
With and , the point becomes . The direction stays because blocks translation. means no rotation.
Transform one point and one direction
Use a +90° z rotation and translation t=(1,2,0) m. The local point is p=(0.5,0,0), and a local direction is d=(0.5,0,0).
Build Rz(90°)=[[0,-1,0],[1,0,0],[0,0,1]].
Place R and t into T=[[R,t],[0,0,0,1]].
Extend the point as p_h=(0.5,0,0,1).
Multiply: rotation gives (0,0.5,0), then w=1 adds t, producing (1,2.5,0,1).
Extend the direction as d_h=(0.5,0,0,0).
Multiply again: rotation gives (0,0.5,0), and w=0 blocks translation, producing (0,0.5,0,0).
The point moves to (1,2.5,0) m, while the direction becomes (0,0.5,0) without being shifted.
The fourth coordinate distinguishes a location from a free direction while using the same transform matrix.
Physical examples
Where this appears in real life
Wrist-mounted camera
A camera is bolted to a gripper. The arm changes both the camera origin and viewing direction.
Camera image rays use w=0; reconstructed scene points use w=1. Both rotate, but only the points receive translation.
Crate on a conveyor turntable
A rigid crate turns 90° and shifts to a new station while three corner markers remain fixed to it.
One SE(3) transform moves all marker coordinates, and every pairwise marker distance stays constant.
Hands-on exercise
Make the idea observable
Use a small box, three labelled corner stickers, a paper x-y-z triad, a ruler, and graph paper.
Attach the local triad and record all three sticker coordinates in the box frame.
Choose a simple quarter-turn and translation and write the corresponding R and t.
Build the 4×4 homogeneous transform with bottom row [0,0,0,1].
Predict each sticker's new coordinates using w=1.
Transform the box's forward arrow using w=0.
Place the box as specified, measure the predicted positions, and compare all three pairwise distances before and after.
Every attached point receives the same rigid placement; their mutual geometry is unchanged. The direction arrow turns but does not inherit the box origin.
Three point predictions agree within measurement tolerance, the direction calculation excludes translation, and all pairwise distances are preserved.
Build today
Extend the browser notebook into a two-link arm visualizer with frame composition, forward kinematics, and a bounded numerical IK trace.
Evidence to save
DONE when a comparison table for “SE(3): one 3D pose matrix” contains the test condition, metric, result, and justified engineering decision.
Common mistakes
Catch the wrong mental model
Using w=1 for a velocity, normal, or direction.
Use w=0 for a free direction so translation cannot change it.
Assuming any 4×4 numeric matrix is a rigid pose.
Validate RᵀR≈I, det(R)≈1, and the homogeneous bottom row.
Negating t without rotating it when inverting T.
Use T⁻¹=[[Rᵀ,-Rᵀt],[0,0,0,1]].
Treating a valid pose as proof of correct calibration.
Test known physical points, distances, frames, units, and timestamps.
Job connection
How this becomes employable evidence
Calibration and motion code exchange SE(3) poses for cameras, tools, bases, and targets. An engineer validates the rotation block, units, frame direction, and known fixture points before enabling motion.
Relevant target roles
- Robotics Deployment, Integration & Validation Engineer
- Robotics Application / ROS 2 Integration Engineer
- Robotics Software Engineer — ROS 2 / AMR
Chapter 02 interview drill
Interview questions: SE(3): one 3D pose matrix
Practise a 60–90 second answer: define the idea, connect it to a physical robot, state assumptions, frames, and units when relevant, then finish with the failure signal or evidence you would inspect.
Primary interview scenario
Why are points represented with w=1 and directions with w=0? Show what translation does to each and name two checks for an incoming 4×4 pose.
Answer shape: clarify the situation → trace the physical and software path → test the most likely boundaries → name the evidence that would confirm the result.
Technical follow-up questions
Q1What four blocks make up a homogeneous transform?
A 3×3 proper rotation R, a 3×1 translation t, a 1×3 zero row, and bottom-right value 1.
Q2What does p_A=T_AB p_B mean?
The same physical point described in frame B is converted into coordinates in frame A.
Q3Name one numerical and one physical check for T.
Numerically check the SO(3) rotation and bottom row; physically check a known point, distance, or inverse round trip.