New in Diamondback
geometry_experimental: tf2 | tf2_bullet | tf2_geometry_msgs | tf2_kdl | tf2_msgs | tf2_ros | tf2_tools
Package Summary
tf2 is the second generation of the transform libraray, which lets the user keep track of multiple coordinate frames over time. tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
- Author: Tully Foote, Wim Meeussen, Eitan Marder-Eppstein
- License: BSD
- Repository: wg-kforge
- Source: hg https://kforge.ros.org/geometry/experimental
Contents
What does tf2 do? Why should I use tf2?
You want to see what tf can do instead of just reading about it? Check out the tf2 introduction demo.
A robotic system typically has many 3D coordinate frames that change over time, such as a world frame, base frame, gripper frame, head frame, etc. tf2 keeps track of all these frames over time, and allows you to ask questions like:
- Where was the head frame relative to the world frame, 5 seconds ago?
- What is the pose of the object in my gripper relative to my base?
- What is the current pose of the base frame in the map frame?
tf2 can operate in a distributed system. This means all the information about the coordinate frames of a robot is available to to all ROS components on any computer in the system. Tf2 can operate with a central server that contains all transform information, or you can have every component in your distributed system build its own transform information database.
For more information on the design see design
Tutorials
We created a set of tutorials that walk you through using tf2, step by step. You can get started on the introduction to tf2 tutorial. For a complete list of all tf2 and tf2-related tutorials check out the tutorials page.
There are essentially two tasks that any user would use tf2 for, listening for transforms and broadcasting transforms.
Anyone using tf2 will need to listen for transforms:
Listening for transforms - Receive and buffer all coordinate frames that are broadcasted in the system, and query for specific transforms between frames. Check out the writing a tf2 listener tutorial (Python) (C++).
To extend the capabilities of a robot you will need to start broadcasting transforms.
Broadcasting transforms - Send out the relative pose of coordinate frames to the rest of the system. A system can have many broadcasters that each provide information about a different part of the robot. Check out the writing a tf2 broadcaster tutorial (Python) (C++).
Once you are finished with the basic tutorials, you can move on to learn about tf2 and time. The tf2 and time tutorial (Python) (C++) teaches the basic principles of tf2 and time. The advanced tutorial about tf2 and time (Python) (C++) teaches the principles of time traveling with tf2.
Overview
High level Design
The design page described the high level design of the tf2 library.
tf2 is the core of a group of packages which form the 2nd generation of tf. There are three types of packages.
Tools
tf2 The tf2 package is a ROS independent implementation of the core functionality. This can be used outside of ROS if the message datatypes are copied out.
tf2_tools provides a number of tools to use tf2 within ROS
ROS Bindings
These packages provide the primary interface for developers using tf2.
tf2_ros Provides roscpp bindings for tf2, including classes for BufferListener, BufferBroadcaster, BufferServer, and BufferClient
tf2_ros also provides rospy bindings for tf2, including classes for BufferListener BufferBroadcaster and BufferClient
Plugins
These packages provide methods to allow tf2 to work natively with data types of any external library. Most are either C++ or Python specific.
tf2_bullet tf2 methods to work with bullet datatypes natively in c++
tf2_eigen2 tf2 methods to work with eigen2 datatypes natively in c++
tf2_eigen3 tf2 methods to work with eigen3 datatypes natively in c++
tf2_kdl tf2 methods to work with kdl datatypes natively in c++ or python.
tf2_geometry_msgs tf2 methods to work with geometry_msgs datatypes natively in C++ or Python.






