Tutorials Using Turtlesim

ROS Tutorials

Teleop Tutorials

TF Tutorials

Many of the tf 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. Note that the general concept itself is explained directly on tf package.

tf is deprecated in favor of tf2. tf2 provides a superset of the functionality of tf and is actually now the implementation under the hood. If you're just learning now it's strongly recommended to use the tf2/Tutorials instead.

Workspace Setup

If you have not yet created a workspace in which to complete the tutorials, click here for some brief instructions .

  Show EOL distros: 

Create a file named ~/tutorials.rosinstall with the following content:

- other: { local-name: workspace }

To overlay on the ROS distro you are using:

rosinstall ~/tutorials /opt/ros/$ROS_DISTRO>> ~/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 to source your script file is to add it 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

Create a catkin workspace like so:

$ source /opt/ros/$ROS_DISTRO/setup.bash
$ mkdir -p ~/tutorial_ws/src
$ cd ~/tutorial_ws
$ catkin_init_workspace src
$ catkin_make

And now source the setup file from the result-space, so that packages you add to this workspace's src folder will be findable by rospack, and the built binaries by rosrun and roslaunch:

$ source devel/setup.bash

Learning tf

C++

Python

  1. Writing a tf broadcaster (C++)

    This tutorial teaches you how to broadcast coordinate frames of a robot to tf.

  2. Writing a tf listener (C++)

    This tutorial teaches you how to use tf to get access to frame transformations.

  3. Adding a frame (C++)

    This tutorial teaches you how to add an extra fixed frame to tf.

  4. Learning about tf and time (C++)

    This tutorial teaches you to use the waitForTransform function to wait for a transform to be available on the tf tree.

  5. Time travel with tf (C++)

    This tutorial teaches you about advanced time travel features of tf

  1. Writing a tf broadcaster (Python)

    This tutorial teaches you how to broadcast the state of a robot to tf.

  2. Writing a tf listener (Python)

    This tutorial teaches you how to use tf to get access to frame transformations.

  3. Adding a frame (Python)

    This tutorial teaches you how to add an extra fixed frame to tf.

  4. Learning about tf and time (Python)

    This tutorial teaches you to use the waitForTransform function to wait for a transform to be available on the tf tree.

  5. Time travel with tf (Python)

    This tutorial teaches you about advanced time travel features of tf

Now that you have completed these tutorials please take the time to complete this short questionnaire.

Debugging tf

  1. Debugging tf problems

Using sensor messages with tf

  1. Using Stamped datatypes with tf::MessageFilter

    This tutorial describes how to use tf::MessageFIlter to process Stamped datatypes.

Setting up your robot with tf

  1. Setting up your robot using tf

    This tutorial provides a guide to set up your robot to start using tf.

  2. 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.

  3. Using urdf with robot_state_publisher

    This tutorial gives a full example of a robot model with URDF that uses robot_state_publisher. First, we create the URDF model with all the necessary parts. Then we write a node which publishes the JointState and transforms. Finally, we run all the parts together.

Create a new tutorial:

Video Demonstration

Watch the video below to have more explanation on transforms.

PR2 Beta Workshop

Video Tutorials

rosbag Tutorials

  1. Recording and playing back data

    This tutorial will teach you how to record data from a running ROS system into a .bag file, and then to play back the data to produce similar behavior in a running system

  2. Reading messages from a bag file

    Learn two ways to read messages from desired topics in a bag file, including using the really handy ros_readbagfile script.

  3. Producing filtered bag files

    This tutorial will cover using rosbag filter to filter bag files into new bag files using topic and data information

  4. How to export image and video data from a bag file

    This tutorial explains how to export image messages from a bag file into a series of jpeg images and then goes on to show how to encode them into an OGG Theora video.

Create a new tutorial:

Practicing Python with Turtlesim

1.Moving in a Straight Line

  • This tutorial teaches you how to move your turtle in order to learn python.

2.Rotating Left/Right

  • This tutorial teaches you how to rotate your turtle.

3.Moving to goal

  • Move the turtle to a specified location.

Create a new tutorial

Wiki: turtlesim/Tutorials (last edited 2016-10-25 21:07:19 by CleberCoutoFilho)