tf2 (coordinate frames)
- In French:
- tf2 (repères de coordonnées)
Definition
A ROS 2 library that tracks over time the relationships between a robot’s many coordinate frames: base, wheels, sensors, tool, map. It organises them in a tree and makes it possible to convert a point or a vector from one frame to another at any instant.
Checked on against the references below. · Written with AI · checked against the sources Source: Official ROS 2 documentation (Jazzy), “Tf2”.
Concrete examples
The ROS 2 repository for Stretch 4 shows how to inspect these frames: ros2 run tf2_tools view_frames displays the kinematic links, and ros2 run tf2_ros tf2_echo base_link head_link gives the transform between two of them. The same document asks you to check that the TF tree has all the links.
What it changes for you
Navigating with Nav2 requires a complete chain: map → odom → base_link → sensor frames. Global positioning (GPS, SLAM, motion capture) supplies map → odom, odometry supplies odom → base_link, and the transforms to the sensors must be static and defined in the URDF. Under REP 105, a frame has only one parent, so map and odom cannot both be attached to base_link.
Additional material checked on .