VideoLibrary

Introduction to ROS Part 10: Getting Started with TF2 and Turtlesim | DigiKey

TF2 is the coordinate-transform library in ROS 2 that keeps track of where every robot component is in space. It’s perfect for things like manipulator arms, multi-part robots, swarms, or simultaneous localization and mapping (SLAM). In this video, we dive into TF2 and demonstrate how to use it with the turtlesim simulator. The written guide for this episode can be found here: https://www.digikey.com/en/maker/tutorials/2025/intro-to-ros-part-10-getting-started-with-tf2-and-turtlesim The GitHub repository containing the Docker image and example code for this series can be found here: https://github.com/ShawnHymel/introduction-to-ros TF2 maintains a tree of reference frames (like base, link, or camera frame) and automatically computes how to transform data between them. This means your robot can take information from sensors, actuators, or algorithms and interpret it in a consistent spatial context, whether it’s mapping, navigation, object tracking, or controlling a robot arm. TF2 handles all the math behind rotations, translations, quaternions, and time-stamped transforms, making it a core tool for any ROS 2 system that needs to understand “where things are” relative to everything else. Turtlesim is a 2D simulation environment that comes bundled with ROS 2. It is designed to help developers learn core concepts like nodes, topics, services, and coordinate frames. It provides a simple virtual “turtle” you can move, rotate, and control, making it a perfect sandbox for experimenting with ROS 2 tools (especially TF2, motion commands, and visualization techniques) without needing any physical hardware. In the video, we build a turtle broadcaster that translates the world frame to a turtle frame. We will build on this in the next episode when we create a listener and develop follower turtles!

12/2/2025 3:25:53 PM