← Back to the knowledge system
02 Geometric foundations 3D Vision SLAM Robotics

Coordinate Frames & Rigid Transforms

Coordinate Frames and
Rigid Transforms

Pose describes a relationship between two coordinate frames. Specify the source and destination first; composition, inversion, projection, and robot transform chains then become derivable and testable.

Mental Model

Distinguish geometric objects from the numbers describing them

A coordinate frame provides an origin and oriented axes; coordinates numerically express a geometric object in that frame. Changing frames leaves the physical world unchanged while changing its numerical description.

POINT

One point, multiple coordinate descriptions

The same tabletop point can have object-frame coordinates [0.1, 0, 0], or camera-frame coordinates [0.3, -0.2, 0.8]. Both describe the same point.

FRAME

Frames also have poses

Rotation and translation describe one frame's position and orientation relative to another. Object pose is the pose of its object frame relative to a reference frame.

TRANSFORM

Transforms translate between descriptions

Rigid transforms preserve distances and angles, translating points, directions, and axes between descriptions without bending or scaling space.

Geometric object

Point P in space

Independent of its coordinate representation

Coordinates in A

Ap = [xA, yA, zA]T

Relative to A's origin and axes

Coordinates in B

Bp = [xB, yB, zB]T

Relative to B's origin and axes

Notation Contract

This site's notation convention

Papers and repositories use potentially ambiguous names such as T_AB, T_BA, pose, and extrinsic. Superscript/subscript frame notation here makes each operation's inputs and outputs explicit.

Change of coordinates
Ap=ATB Bp,ATB=[ARBAtB0T1]{}^{A}\mathbf{p} = {}^{A}\mathbf{T}_{B}\,{}^{B}\mathbf{p}, \qquad {}^{A}\mathbf{T}_{B}=\begin{bmatrix}{}^{A}\mathbf{R}_{B}&{}^{A}\mathbf{t}_{B}\\\mathbf{0}^{\mathsf T}&1\end{bmatrix}
Column vectors are used throughout. Rotate B-frame coordinates first, then add B's origin expressed in A. Homogeneous points use [x, y, z, 1]ᵀ.
Composition
ATC=ATB BTC{}^{A}\mathbf{T}_{C} = {}^{A}\mathbf{T}_{B}\,{}^{B}\mathbf{T}_{C}
The intermediate B labels connect. Matrices act right to left: C→B first, then B→A.
Inverse
(ATB)−1=BTA=[RT−RTt0T1]({}^{A}\mathbf{T}_{B})^{-1} = {}^{B}\mathbf{T}_{A}=\begin{bmatrix}\mathbf{R}^{\mathsf T}&-\mathbf{R}^{\mathsf T}\mathbf{t}\\\mathbf{0}^{\mathsf T}&1\end{bmatrix}
Inverse translation is −Rᵀt, not simply −t; Rᵀ expresses t in the new frame.

Passive view · site default

The same point, different coordinates

The physical point stays fixed; ATB maps its B-frame coordinates into A. This interpretation is common in calibration, PnP, SLAM, and TF.

Active view

Move an object within one frame

A matrix can also rotate and translate points actively. The algebra looks similar but the meaning differs; declare any switch of interpretation within a derivation.

Interactive Lab

Build an SE(3) transform chain yourself

The lab uses full 3D translation and ZYX Euler rotations. First edit the camera pose in the world WTC, then the object pose in the camera CTO. The system computes WTO and its inverse in real time.

Interactive · SE(3)

Coordinate Transform Chain Lab

Adjust two 6DoF transforms and observe synchronized axes, composition matrices, and point coordinates.
Column vectors Right-handed frames R = RzRyRx
Wp ← WTC Cp ← CTO Op therefore WTO = WTCCTO
x y z W · world x y z C · camera x y z O · object Test point
+X +Y +Z Fixed viewpoint · nonperspective projection

Composition result

Composition and inverse

[
0.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
]
tx
ty
tz
roll
pitch
yaw

Point transform

The same point in a different frame

Enter object-frame point Op; the lab applies WTO to obtain world-frame coordinates Wp.

Wp = WTO Op
x
y
z

The point itself does not move; only its coordinate reference changes.

Frame Atlas

Common coordinate frames in 6D pose systems

Real systems contain more than object and camera frames. Acquisition, SLAM, robotics, and grasping add reference frames; define every connecting transform's direction explicitly.

O

Object / model frame

A local frame attached to a CAD or scanned model. Model points, 3D boxes, and symmetry axes are defined relative to it.

  • The dataset or modeling process defines the origin
  • Canonical orientation can differ from the observed orientation
  • Model units may be m, cm, or mm
C

Camera / optical frame

A 3D frame centered at the camera's optical center. Object 6D pose is usually first expressed relative to this frame.

  • OpenCV: x right, y down, z forward
  • Depth often means Z, rather than Euclidean distance to the optical center
  • RGB and depth cameras may have separate frames
W

World / map frame

A global reference for consistency across frames, cameras, or devices, usually called map or world in SLAM.

  • Origin and orientation are system-design choices
  • Camera trajectories often express camera poses in the world frame
  • Dynamic scenes require separating the static world from moving objects
B/E/G

Robot base, end effector, and gripper

Robot chains often include base, end-effector, tool-center-point, and grasp frames.

  • A TF tree describes time-varying parent–child frame relationships
  • An eye-in-hand camera moves with the end effector
  • Grasp targets must ultimately be expressed in a base or planning frame

Image and pixel coordinates are not ordinary 3D rigid frames

Image (u, v) usually starts at the upper left, with u right and v down. Camera-frame 3D points undergo depth division and intrinsics K to reach pixels; an SE(3) transform alone cannot perform perspective projection.

Convention Atlas

Camera-frame axes can differ across conventions

Coordinate systems have no unique natural convention. OpenCV, ROS, BOP, Blender, and graphics pipelines make different valid choices; errors often arise at their interfaces.

Ecosystem / softwareTypical frameAxis directionsCommon transform semanticsUnits
OpenCV camera Camera / optical +x image-right, +y image-down, +z forward along the optical axis rvec and tvec usually map object or world points into the camera frame Determined by input data
BOP Model / camera / world All right-handed; cameras follow OpenCV; models usually have +z up cam_R_m2c, cam_t_m2c: model → camera Models and translations in mm
ROS body base_link, etc. +x forward, +y left, +z up TF describes parent–child frames; inspect header / child m, rad (SI)
ROS optical *_optical +x right, +y down, +z forward Specifically aligned with common camera-imaging conventions m, rad (SI)
Blender World / object / camera local World +z up; cameras usually look along local -z with local +y up matrix_world usually maps local → world; import/export can remap axes Blender Unit, configurable
OpenGL-style view Eye / view +x right, +y up, usually viewing along -z The view matrix is usually the inverse camera pose Application-defined

Verify signs instead of guessing from memory

Write axis mappings as explicit matrices

For example, converting OpenCV optical coordinates to an x-right, y-up, z-backward graphics view often uses diag(1, -1, -1). Still verify each axis against source and destination definitions rather than copying context-free conversion code.

Task Chains

How transforms connect in real tasks

The same composition and inversion rules connect PnP, camera localization, SLAM, hand–eye calibration, and robotic grasping. Frame notation makes these meanings explicit.

3D Vision

PnP and 6D object pose

OpenCV-style PnP usually returns CTO: it maps model points from O to C before camera-intrinsic projection.

Cp = CTO Op → pixel = π(K, Cp)
  • t is the object's origin in camera coordinates, not the camera's position in object coordinates.
  • For camera pose relative to the object, compute OTC = (CTO)−1.
SLAM

Extrinsics and camera pose

Vision algorithms often use extrinsics CTW to map world points into the current camera; trajectory visualization usually needs camera pose in the world WTC.

WTC = (CTW)−1
  • For extrinsics [R | t], the camera center is not t.
  • The world-frame camera center is CW = −RTt.
Robotics

Observing a target eye in hand

Let B denote the robot base, E the end effector, C the hand-mounted camera, and O the object. Three known transforms determine object pose in the base.

BTO = BTE ETC CTO
  • BTE comes from forward kinematics.
  • ETC comes from hand–eye calibration; CTO comes from vision.
Grasping

From object pose to grasp target

If a grasp template gives target gripper G's pose in object coordinates OTG, compose it into the robot-base frame.

BTG = BTC CTO OTG
  • Adjacent frame labels cancel, providing a quick direction check.
  • Execution still requires collision checking, inverse kinematics, and tool-center-point correction.

Worked Example

A minimal numerical example

Camera frame C is rotated 90° about z relative to world W, with its origin at world coordinates [1, 0, 0]. A point has camera coordinates [0.5, 0, 1].

Numerical example
WTC=[0−101100000100001],Cp=[0.5011]⇒Wp=[10.511]{}^{W}\mathbf{T}_{C}=\begin{bmatrix}0&-1&0&1\\1&0&0&0\\0&0&1&0\\0&0&0&1\end{bmatrix},\quad {}^{C}\mathbf{p}=\begin{bmatrix}0.5\\0\\1\\1\end{bmatrix}\Rightarrow{}^{W}\mathbf{p}=\begin{bmatrix}1\\0.5\\1\\1\end{bmatrix}
Camera +x points along world +y, so the 0.5 m camera-x component appears in world y. The camera origin's world x=1 is added as translation.

Debug Protocol

Diagnose coordinate errors through explicit meanings

Make implicit semantics explicit, then narrow the problem with visualization and invariants.

  1. 01

    Label every quantity's frame

    Temporarily rewrite p, R, t, and T as Ap, ATB. If frame labels cannot be assigned, the variable's meaning is unclear.

  2. 02

    Check connected frame labels along the chain

    ATBCTD cannot be multiplied directly because intermediate B and C do not match.

  3. 03

    Test origins and unit axes

    Transform [0,0,0,1] and the three unit axes separately to interpret translation, axis flips, and rotation directions more easily than with random points.

  4. 04

    Check rigid-transform invariants

    Require RTR≈I, det(R)≈+1, and homogeneous bottom row [0,0,0,1].

  5. 05

    Project axes and model contours

    Project object xyz axes, 3D boxes, and CAD contours into the image to reveal direction errors.

  6. 06

    Check model predictions after conventions

    First eliminate mm/m, degrees/radians, row/column vectors, transform directions, and OpenCV/OpenGL axis mismatches; then assess network prediction quality.

Sources for conventions and formulasExpand official documentation and format specifications

Next topic · 03

Rotation & Orientation Representations

Next, compare rotation matrices, Euler angles, axis–angle, quaternions, continuous 6D representations, Egocentric / Allocentric, and in-plane / out-of-plane rotation.
Locate this topic on the knowledge map