TF and rqt Frame Editor
Goal: get an intuitive understanding of coordinate frames and parent-child relationships, by placing frames by hand and watching them in RViz.
Tool: the rqt Frame Editor
(package frame_editor, branch feature/urdf-preview).
Slides: Coordinate transforms (TF2).
1. Build the Frame Editor
In the src/ folder of your workspace:
git clone -b feature/urdf-preview https://github.com/ROS-Industrial-Session-Common/rqt_frame_editor_plugin.git
cd ..
source /opt/ros/jazzy/setup.bash
rosdep install --from-paths src/rqt_frame_editor_plugin --ignore-src -y
colcon build --symlink-install --packages-select frame_editor
source install/setup.bash
2. Add frames
Open rqt in a terminal where the workspace is sourced (
--force-discoverfinds the new plugin):rqt --force-discover
Open the Frame Editor: Plugins → Frame Editor Plugin.
Start a blank edition with the New button.

Add a frame with Add New: name it
object_1, withworldas parent.
Open RViz in another terminal, and set the fixed frame to
world:rviz2

Add the TF display: Add → TF → OK.


Experiment: add frames, change the marker size and the visibility, move the frames with the Frame Editor and watch them in RViz.
3. Parent and child
Add a child frame: Add New, name it
object_2, withobject_1as parent.Move the parent: move
object_1and watchobject_2follow. The child stores its pose relative to its parent.Check the transform in a third terminal:
ros2 run tf2_ros tf2_echo world object_2
Move
object_1again: the printed transform changes, although you only moved the parent.Change a parent: set the parent of
object_2toworld, once with Parent (keep relative) and once with Parent (keep absolute). What is the difference? Then set it back toobject_1.
Keep object_1 and object_2, the Frame Editor and RViz running: the next exercise,
TF and Python, uses them.
Questions
Why can
tf2_echo world object_2print a transform, although nobody publishesworld → object_2directly?Which topic do the editor’s frames use,
/tfor/tf_static? Check withros2 topic info /tf_static --verbose.