Skip to content
PPHYSICAL AI GUIDESTART HERE →

Field guide

Robot Coordinate Frames: Validate tf2 Before Blaming the Policy

A practical ROS 2 guide to camera axes, transform direction, observation timestamps, map and odom semantics, and physical calibration checks before robot deployment.

By Physical AI Guide Editorial TeamPublished Updated

The short answer

Before retraining a robot policy for a missed grasp or misplaced target, verify what coordinate frame the target uses, which direction the transform maps, and which instant the transform describes. A plausible position in the wrong frame can survive software checks and still identify the wrong place in the workspace.

ROS 2’s tf2 tracks relationships between frames over time. It does not independently measure whether the camera is mounted where the configuration says it is. A connected transform tree, a successful lookup, a physically accurate calibration, and a successful manipulation are four different pieces of evidence.

This guide explains the documented conventions and proposes a bounded validation worksheet. It uses ROS 2 Jazzy documentation and ROS Enhancement Proposals 103 and 105. It is not a hardware calibration procedure, a tested ROS package, or a safety-certified acceptance test. The diagnostic sequence and review questions are our engineering analysis, not reported experimental results.

Start with the observation’s meaning

An object position needs more than three numbers. At minimum, a review should identify:

  • the source frame in which the position is expressed;
  • the units and axis conventions;
  • the observation time and what that timestamp represents;
  • the destination frame expected by the next component;
  • the transform and calibration versions used;
  • the meaning of the data, such as a point, direction, pose, or velocity.

The Jazzy tf2 concepts reference describes converting observations from a source frame into a target frame and recommends using supported typed transform methods where possible. Those methods can carry frame identity through the conversion rather than leaving every caller to reconstruct it.

Our physical AI developer stack guide places this boundary between sensing, perception, planning, and control. A stronger model cannot make an undocumented interface unambiguous.

Camera optical axes are not body axes

REP 103 standardizes common ROS units and coordinate conventions. It specifies right-handed systems and SI units, including meters for length and radians for angles. It also permits justified, documented exceptions. Do not assume that an external device follows the convention merely because its driver publishes ROS messages.

Convention Axes Review implication
Body frame x forward, y left, z up State the physical origin and orientation of the body frame
Camera optical frame z forward, x right, y down Check whether observations use the optical frame or another camera frame
Geographic ENU x east, y north, z up Record origin and geographic reference
Geographic NED secondary frame x north, y east, z down Identify the explicitly transformed secondary frame

These definitions come from REP 103, not a universal specification for every sensor vendor.

A useful non-motion check is to move a reference target along a known camera-view direction and inspect which reported coordinate changes. Compare the result with the declared frame. Do not fix a mismatch by changing a label alone. Renaming a frame does not rotate the underlying data.

Similarly, record the rotation representation at every boundary. REP 103 prefers quaternions, followed by rotation matrices, and warns that Euler-angle conventions can be ambiguous. Document the actual field order and convention consumed by each interface rather than assuming that any three orientation numbers mean the same thing.

Name transform direction explicitly

The tf2 concepts reference distinguishes transforming a frame from transforming data expressed in a frame. The two formulations are inverses. tf2 handles inversion when traversing the tree, but callers still need to request the intended source and target.

For review, write a sentence before reading the numeric transform:

Convert this observed point from the camera optical frame into the robot base frame.

Then verify that the lookup arguments, stamped observation, and downstream consumer agree with that sentence. Avoid ambiguous descriptions such as “the camera-to-base matrix” unless the mapping convention is defined.

Two checks answer different questions:

  1. Round-trip consistency: Does converting a point to the target frame and back recover the original within the chosen numerical tolerance?
  2. Independent physical agreement: Does the transformed point agree with a separately measured reference in the target frame?

A round trip can pass with a consistently wrong transform. It tests the conversion’s internal consistency, not whether the camera’s configured mounting matches reality. Select tolerances from the task requirements and measurement uncertainty, not from an attractive example number.

For a manipulation system, keep this geometry check separate from the contact-rich manipulation evaluation. A geometrically plausible target does not establish correct contact force, compliance, or recovery.

Use the transform for the intended time

A moving robot creates a second failure mode: the frame names can be correct while the time is wrong.

The Jazzy tf2 time tutorial says that tf2::TimePointZero means the latest available transform in the buffer. It does not mean the observation time, and it does not mean the instant the robot started.

If an observation was captured before the robot moved, converting it using a later base pose answers a different geometric question from converting it at capture time. Specify which question the consumer actually needs. Some applications deliberately transform information across different times, but that choice needs an explicit model, not an accidental latest-transform fallback.

The tutorial also shows why requesting a transform at the current time can produce a future-extrapolation error: broadcasts take time to reach a listener’s buffer. Its timeout parameter allows a lookup to wait for the requested transform. Waiting does not establish physical accuracy or make an observation fresh enough for a task.

Record at least:

  • requested transform time;
  • observation timestamp and its meaning;
  • clock source and cross-component clock assumptions;
  • lookup result or exception;
  • application action if the requested transform is unavailable;
  • whether any fallback changes the time or frame semantics.

Do not silently replace a failed historical lookup with the latest transform and report equivalent processing. Rejecting the observation or deferring the decision may be appropriate, but the response must follow the application’s requirements. Our ROS 2 QoS and stale-data guide covers the adjacent communication problem. A delivered message and a time-aligned geometric interpretation are separate checks.

Keep map corrections separate from continuous local motion

For mobile platforms, REP 105 assigns different meanings to base_link, odom, and map:

Frame Documented meaning Do not infer
base_link Rigidly attached to the mobile robot base That all robots use the same physical origin
odom Continuous pose evolution, but potentially unbounded drift A stable long-term global reference
map Long-term reference without significant drift, but able to jump after corrections A continuous reference suitable for every local action

These are frame semantics, not measured accuracy guarantees for a particular robot.

REP 105’s basic tree places map above odom, then base_link, with each frame having one parent. In its stated authority split, odometry broadcasts odom to base_link, while localization uses that information to broadcast map to odom. Additional intermediate frames are allowed without discarding the basic topology.

A review should therefore ask who publishes each relationship and what happens when localization corrects the global pose. In a controlled replay or simulation, inspect whether a stored target is intentionally fixed in the world, attached to the robot, or tied to an earlier map estimate. Record what the consumer does after a map correction. Do not treat a correction-induced jump as proof of a policy failure without checking the frame contract.

Write a frame contract before testing

The following worksheet is an editorial proposal. It is not a ROS standard or an assertion that these fields alone establish safe operation.

Field Required review record
Data meaning Point, pose, direction, or other typed quantity
Source and destination Exact frame identifiers and physical definitions
Units and axes Length and angle units, handedness, rotation convention
Time Timestamp meaning, requested transform time, clock assumptions
Authority Publisher responsible for each transform edge
Calibration Artifact identifier, hardware mounting, validity conditions
Failure behavior Missing path, unavailable time, conflicting configuration, invalid observation
Acceptance evidence Independent reference method, tolerances, results, exclusions
Change control What must be rechecked after sensor movement, replacement, or configuration change

The tf2 reference describes static transforms as unchanging relationships that are published once and have no stored history. That is a representation choice, not proof that a physical mount cannot move. If a camera is remounted, review the calibration and configuration rather than assuming the previous static transform remains valid.

A bounded diagnostic sequence

Begin with logs, recorded observations, or simulation. Any physical test needs an application-specific reviewed procedure and protective measures. Do not command hardware solely to see whether a suspected axis inversion is dangerous.

1. Freeze the configuration

Preserve robot and sensor identities, software versions, calibration artifacts, frame definitions, and transform publishers. Capture the source observation and the exact conversion request. A screenshot of a visually plausible tree is not a sufficient run record.

2. Check conventions without motion

Inspect units, axes, source and target ordering, and the data type. Compare the declared sensor frame with the driver output. Use independent references to check the sign and direction of changes before evaluating task success.

3. Separate lookup success from calibration accuracy

Record whether the path exists and whether the requested-time lookup succeeds. Then compare transformed observations with independent reference measurements at multiple relevant workspace locations. Report the measurement method and uncertainty. A single convenient point can leave other errors unexamined.

4. Test temporal interpretation

Use controlled replay or simulation with changing poses to compare the intended observation-time conversion against an explicitly labeled latest-transform conversion. Preserve lookup failures and rejected observations in the record. This is a proposed diagnostic comparison, not a measured result from this publication.

5. Exercise change and recovery boundaries

Review missing transforms, component restart, localization correction, and changed calibration as distinct cases. State whether the consumer refuses new actions, requests reacquisition, or requires operator approval. If support is needed, include it in the human intervention and handoff record, rather than presenting the eventual successful task as uninterrupted autonomy.

What should the final evidence package say?

Keep four outcomes separate:

  • Structural: the intended frames and transform path exist.
  • Temporal: the conversion used the declared time semantics.
  • Geometric: independent measurements support the required accuracy within stated conditions.
  • Operational: the robot completed the task with disclosed failures and support.

Report unknowns as unknowns. A successful lookup is not calibration evidence. Calibration evidence is not proof of every task outcome. A task success is not proof that every failure path is acceptable.

The practical benefit is diagnostic discipline. Investigate the perception-to-control contract before deciding that a model needs more training data. The embodiment gap guide explains why those target-robot interfaces remain part of adapting even a broadly trained policy.

For a camera mounted on a robot gripper, our hand-eye calibration validation procedure adds held-out target-pose consistency checks and an application acceptance worksheet.

Sources and evidence limits

Reviewed October 23, 2026. These are established conventions and version-specific documentation, not a new deployment announcement. The original creation dates below are source metadata, not publication dates for this article.

  1. REP 103: Standard Units of Measure and Coordinate Conventions. Created October 7, 2010. Source for SI units, right-handed coordinates, body, optical, ENU and NED axes, rotation preferences, and documented exceptions.
  2. REP 105: Coordinate Frames for Mobile Platforms. Created October 27, 2010. Source for mobile-platform frame semantics, tree topology, and transform authorities.
  3. ROS 2 Jazzy: tf2 concepts. Source for time-buffered frame relationships, data-versus-frame inversion, typed transformation guidance, and static-transform behavior. No original publication date inferred.
  4. ROS 2 Jazzy: Using time with tf2 in C++. Source for latest-available time-zero semantics, current-time extrapolation, buffering delay, and timeout behavior. No original publication date inferred.

The worksheet, diagnostic order, independent-reference checks, and evidence categories are our analysis. No physical calibration, robot fault injection, or task-performance measurement was executed for this article.

Frequently asked questions

Does a connected tf2 tree prove that a robot is calibrated?

No. It establishes a transform path, not that the numbers match the installed hardware. Check the physical mounting, calibration version, source and target frames, timestamps, and independent reference measurements.

Are ROS camera axes the same as robot body axes?

Not for the optical-frame convention. REP 103 specifies body axes as x forward, y left, and z up. A camera optical frame uses z forward, x right, and y down. Record the actual frame attached to each observation.

Does tf2 time zero mean the time a robot started?

No. In the Jazzy tf2 time tutorial, time zero requests the latest available transform in the buffer. That is not automatically the transform at the observation timestamp.

What is the difference between map and odom?

REP 105 defines odom as continuous but able to drift, while map is a long-term reference that can change in discrete jumps as localization is corrected. Neither definition guarantees that a particular implementation meets a task's accuracy requirement.