Coordinate frames and transforms
Also available in: Català · Castellano
The idea
A frame is an origin plus a set of axes. The cup is in one place, but its numbers depend on who is measuring. A robot arm is a chain of frames.
Changing frame (2D)
p_world = R(θ) · p_robot + t
R(θ) = [[cosθ, −sinθ], [sinθ, cosθ]]: how much the robot is rotated.t: where its origin is in the world.
It can be written as a single 3×3 matrix (rotation + translation); in 3D, 4×4 matrices.
Chaining
T(base → gripper) = T1 · T2 · … · Tn. Order matters. This is what a URDF describes: the file with the chain of links and joints that simulators and visualisers read.
Hand-eye
The camera sees the object in its own frame; the arm needs it in the base frame. A calibration error of a few degrees grows with distance: error ≈ distance × tan(angle). 3° at 0.5 m is about 26 mm.
In the demo
Drag the robot’s frame: the same cup has different numbers in each frame. In the chain tab, switch on the wrong multiplication order and see how the result changes.
Interactive demo
Related concepts
Forward and inverse kinematics
FK: from angles to hand position, always one answer. IK: from position to angles; there can be two solutions (elbow up or down) or none if the point is out of reach.
The Jacobian
The Jacobian maps joint velocities to hand velocity (v = J·ω). When its determinant is zero, the arm is at a singularity and loses a direction of motion.
Lidar and SLAM
Counting wheel turns accumulates error (drift). A lidar measures distances in many directions at once; SLAM builds the map and locates itself in it by aligning each scan, which corrects the drift.