Lite / Intelligent Robotic Systems / Week 11
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?
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.
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?
- (0.6, 0.2)
- (2.6, 1.2)
- (1.4, 0.8)
- It depends on the joint angles
Guess first, then reveal
(2.6, 1.2). With no rotation, changing frames is just adding the offset of the base's origin: (2 + 0.6, 1 + 0.2). Once the base is also rotated, you need a rotation as well, which is where the next weeks go.
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.)
What the interactive shows (text version)
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.
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
Intuitive
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'.
Technical
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.
Applied
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.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
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.
Reflect
Think of a time you gave or received directions that went wrong. Was it really a frame problem ('your left or my left?')?
Write your answer on paper or in your own notes. Lite never stores what you write.
Go further
- Frame of reference (Wikipedia)
The physics view of frames, from everyday motion to relativity.