Many of the tf2 tutorials are available for both C++ and Python. The tutorials are streamlined to complete either the C++ track or the Python track. If you want to learn both C++ and Python, you should run through the tutorials once for C++ and once for Python.
Contents
All these tutorials assume that you have setup your tutorial workspace. If you have not done so click here.
Setting up the ROS tutorial workspace
This describes how to setup your environment for tutorials.
Create a file named ~/tutorials.rosinstall with the following content:
- other: { local-name: workspace }To overlay on cturtle:
rosinstall ~/tutorials /opt/ros/cturtle ~/tutorials.rosinstall
To overlay on boxturtle:
rosinstall ~/tutorials /opt/ros/boxturtle ~/tutorials.rosinstall
To use this workspace whenever you open a new terminal setup your ROS environment by typing:
source ~/tutorials/setup.bash
Sourcing this file adds ~/tutorials/workspace to your ROS_PACKAGE_PATH. Any packages you create in that directory will be found by rospack.
An alternative is to add this to your .bashrc, but remember that this will persist in your .bashrc into the future, and you can only have one environment setup. For more on what this is doing see this page
Migrating from tf1 to tf2
- Converting Datatypes
This is a quick description of the changes in syntax for converting datatypes.
- Migrating a TransformListener from tf to tf2
This is a guide for converting a tf TransformListener class to a tf2 Listener class
- Migrating a TransformBroadcaster from tf to tf2
This is a guide for converting a tf TransformBroadcaster class to a tf2 Listener class
Learning tf2
- Introduction to tf2
This tutorial will give you a good idea of what tf2 can do for you. It shows off some of the tf2 power in a multi-robot example using turtlesim. This also introduces using tf2_echo, view_frames, and rviz.
C++ |
Python |
|
|
Now that you have completed these tutorials please take the time to complete this short questionnaire.
Debugging tf2
- Debugging tf2 problems
This tutorial gives a systematic approach for debugging tf2 related problems.
Using sensor messages with tf2
- Using Stamped datatypes with tf2::MessageFilter
This tutorial describes how to use tf2::MessageFIlter to process Stamped datatypes.
Setting up your robot with tf2
- Setting up your robot using tf
This tutorial provides a guide to set up your robot to start using tf.
- Using the robot state publisher on your own robot
This tutorial explains how you can publish the state of your robot to tf, using the robot state publisher.
Create a new tutorial:
Extending tf2
- Transforming your own datatypes
This tutorial explains which methods you need to implement to make tf2 transform your own datatypes.






