# ROS 2 TF error: extrapolation into the future or the past

> Fix TF lookup errors: use the same clock for all nodes, set use\_sim\_time consistently and wait for the transform before you use it.

Canonical: https://roboticsengineering.in/fix/ros2-tf-extrapolation-into-the-future-error/ | Published: 2026-11-03 | Updated: 2026-11-03

**Set use_sim_time the same way on every node.** Mixed clocks are the usual cause.

## What the message means

TF stores transforms with timestamps. A node on wall time asking about a simulation time stamp finds no data for that moment.

## Fix it in this order

1. Set use_sim_time to true on all nodes in a simulation, and to false on all nodes on a real robot.
2. Check that the clock topic is published in simulation.
3. Use the latest available time when you do not need a specific stamp.
4. Wait for the transform with a timeout before you use it.
5. Check that the node publishing the transform is running at a steady rate.
6. Check the robot computer time if you use more than one machine.

## Why it happens

The error means the transform tree has no data for the time you asked about. tf2 stores transforms with timestamps in a buffer that keeps about ten seconds by default, and a lookup at a time later than the newest transform needs extrapolation, which it will not do. A node on wall-clock time asking for a simulation timestamp, or the reverse, produces exactly this.

With more than one computer, a clock offset between them has the same effect, so keep them synchronised with a time service such as chrony.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Error in simulation only | use_sim_time mismatch. |
| Error on two computers | Clock sync. |

## Related

[RViz fixed frame](https://roboticsengineering.in/fix/rviz-fixed-frame-does-not-exist/), [Gazebo and ROS 2](https://roboticsengineering.in/gazebo-ros2-simulation-tutorial/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
