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?

  1. Keeps track of moving parts – If a robot moves, TF helps update positions in real-time.
  2. Helps in navigation – A robot needs to know its position to avoid obstacles and reach targets.
  3. Used in perception – Cameras and sensors need TF to correctly detect and interact with objects.

What is Translation and Rotation?

image.png

Red, Green, and Blue are X, Y, and Z axes respectively.

To Explain TFs to lets have an Example robot:

image.png

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.

image.png