One point, many addresses: coordinate frames
The gripper's camera says the cup is 10 cm ahead. The base says it is 52 cm to the right. They are both correct. How?
About 30 min · 3 goals · Checked by automated tests
1.Why should I care?
A robot has a frame for the world, one for its base, one for each link and one for each sensor. Each sensor reports in its own frame. Before the robot can act, it must translate every measurement into one common frame. Most real-world robot bugs are not bad maths but a number used in the wrong frame.
- ◇ Define a coordinate frame as an origin plus a set of axes.
- ◇ Attach frames to parts of a robot and say which frame a point is expressed in.
- ◇ Explain why the same point has different coordinates in different frames.
2.Discover
In the robot-arm lab, the readout gives the hand position in the base frame. Pick a pose and write it down. Now imagine sticking a frame on the elbow, with its x axis along link 2. What are the hand's coordinates in that elbow frame? (Hint: they never change, whatever the angles.)
Explorer 01 — Robotic kinematics
From joint angles to a position, and back again
Forward kinematics turns joint angles into an end-effector position. Inverse kinematics asks the harder question: which angles put the tip where I want it?
Fig. — 2-link planar arm · units cm · y up
Joint angles (relative)
Arm geometry
- End x
- 15.1 cm
- End y
- 26.4 cm
- Distance r
- 30.4 cm
- workspace 5.0–35.0 cm
- |sin θ2|
- 0.87
- well-conditioned
- Tip angle φ
- 95.0°
State
Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).
Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).
How to read this
The base sits at the centre (grid squares are 10 cm). Each thick bar is a link; circles are joints J1, J2. The shaded ring is the workspace: every point the tip can reach with unlimited joint travel. Its outer edge is L1 + L2; the inner hole appears when one link is longer than the others combined.
Arcs show each joint angle. θ1 is measured from the dashed horizontal; θ2 from the dashed extension of link 1. In inverse mode the square is the target (dashed and labelled unreachable when outside the ring), and the arm is solved with the law of cosines. Most targets have two solutions: elbow-up and elbow-down.
Assumptions & limitations
- Ideal rigid links and revolute joints with no mass, friction, backlash, or flex.
- Joints may rotate a full ±180°; real joints have hard limits that shrink the workspace, and links cannot pass through each other or the floor.
- Kinematics only: nothing here says whether the motors are strong or fast enough to hold or reach a pose (that is dynamics).
- Three-link inverse kinematics is made solvable by fixing the tool angle φ; real controllers choose among redundant solutions with extra goals.
- Unreachable targets are projected onto the nearest edge of the reachable ring for display; a real controller would refuse or plan around them.
Can't use the interactive? Read a description instead
The robot-arm lab shows a two-link arm and its hand position in the base frame. Without it: at θ1 = 0 and θ2 = 0 a 0.5 m + 0.3 m arm has its hand at (0.8, 0) m in the base frame, at (0.3, 0) m in a frame on link 2, and, if the base sits at (2, 1) m in a room with parallel axes, at (2.8, 1) m in the room frame.
3.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Frame B's origin is at (3, −1) in frame A, with the same axis directions. A point is at (2, 4) in B. What is its x coordinate in A?
4.Predict
A robot arm's hand is at (0.6, 0.2) m in the base frame. The whole robot is bolted to a table at (2, 1) m in the room frame, not rotated. Where is the hand in the room frame?
Guess first. Being wrong here is how the surprise works.
5.Understand
A frame is an origin plus axes
A coordinate frame is a chosen origin and a pair of perpendicular unit axes (x and y in 2D). A point's coordinates are its distances along those axes from that origin. Change the origin or turn the axes and the numbers change, even though the point hasn't moved.
Every part gets a frame
Robots typically use a world frame fixed to the room, a base frame on the robot, a frame on each link (x along the link) and a tool frame at the gripper tip. Sensors have frames too: a camera measures in a camera frame. We label points with the frame they're in, for example p_base or p_camera, and never mix them.
Translating between frames
If frame B's origin sits at t in frame A and B's axes are not rotated, then p_A = p_B + t. If B is also rotated, the axes no longer line up and we must rotate first: p_A = R·p_B + t. Rotations need matrices (week 13); the full move between frames is a transform (week 14). For now: always ask 'in which frame is this number?'.
Explain it another way
Your house has an address on your street, a grid reference on a map and a latitude and longitude. Three sets of numbers, one house. A frame is just the choice of 'measured from where, and along which directions'.
A frame is an affine coordinate system: an origin O and an orthonormal basis. The coordinates of a point P in frame F are the components of the vector from O_F to P along F's basis vectors. A pure translation between frames adds a constant vector; a rotation mixes components.
A warehouse robot's lidar sees a shelf 1.2 m ahead in the lidar frame. The software converts that into the robot frame (the lidar is mounted 0.3 m forward of the centre) and then into the map frame using the robot's position, so that the shelf lands in the right place on the shared map.
Worked example 1
A camera is mounted 0.1 m forward and 0.05 m up from a gripper's origin, not rotated. It sees a cup at (0.25, −0.05) m in its own frame. Where is the cup in the gripper frame?
p_gripper = p_camera + t = (0.25 + 0.1, −0.05 + 0.05) = (0.35, 0) m: dead ahead of the gripper.
Common mix-ups
- A point has one true set of coordinates.
✓ Coordinates belong to a frame. The point is real; its numbers depend on the frame you measure from. - Changing frames is always just adding an offset.
✓ Only when the axes are parallel. Rotated frames also mix x and y, which needs a rotation.
6.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2
A robot's distance sensor reports 'obstacle at 0.8 m'. What is missing before the robot can put it on its map?
Practice 3
A tool tip is at (5.4, 2.0) m in the world. The robot base origin is at (4.0, 1.5) m in the world, not rotated. What is the tip's y coordinate in the base frame?
Practice 4 · a fresh version every time
A gripper frame has its origin at (0, 3) in the world and is rotated 180°. A sensor sits at (3, 0) in the gripper frame. What is its world y coordinate? (3 decimal places)
Practice 5
A frame is attached to link 2 of an arm, origin at the elbow, x axis along the link. The link is 0.3 m long. Where is the hand in this frame, whatever the joint angles?
7.Apply it
Sketch a two-link arm and draw four frames: world, base, link 1 (at the shoulder, x along link 1) and link 2 (at the elbow, x along link 2). Label the hand's coordinates in the link 2 frame and in the link 1 frame for θ2 = 0.
8.Reflect
9.Go further
- Frame of reference (Wikipedia) ↗The physics view of frames, from everyday motion to relativity.
Concepts: Coordinate frames and transforms · Vectors