What is TF (Transform) in ROS 2?
TF (Transform) in ROS 2 is a tool that helps keep track of positions and orientations of different parts of a robot or objects in a scene. It allows different parts of the system to understand where things are in relation to each other.
For example, if a robot has a camera, wheels, and an arm, TF helps to know where the camera is compared to the arm or where the arm is compared to the wheels.
Why is TF important?
- Keeps track of moving parts – If a robot moves, TF helps update positions in real-time.
- Helps in navigation – A robot needs to know its position to avoid obstacles and reach targets.
- Used in perception – Cameras and sensors need TF to correctly detect and interact with objects.
What is Translation and Rotation?
- Translation means moving from one place to another without rotating. It can happen in three directions (axes):
- X-axis → Forward and backward
- Y-axis → Left and right
- Z-axis → Up and down
- Rotation means turning around an axis. It also happens in three ways:
- Roll (X-axis) → Tilting side to side (like rolling a pen)
- Pitch (Y-axis) → Tilting forward or backward (like nodding your head)
- Yaw (Z-axis) → Turning left or right (like rotating your head side to side)

Red, Green, and Blue are X, Y, and Z axes respectively.
To Explain TFs to lets have an Example robot:

Let’s take this robot as an example. Notice that on the left hand side under Robot model→ Visual Enabled is applied and under TF→ Frames→ All Enabled is applied.
To make the explanation simpler we will only show some TF of some parts.
