ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Introduction to tf tutorial: Second turtle does not follow the first one. (No errors)

asked 2018-08-25 03:59:21 -0600

RJ722 gravatar image

updated 2018-08-25 05:56:42 -0600

gvdhoorn gravatar image

I've been following - I started with installing everything with the following command:

$ sudo apt-get install ros-kinetic-ros-tutorials ros-kinetic-geometry-tutorials ros-kinetic-rviz ros-kinetic-rosbash ros-kinetic-rqt-tf-tree

Luckily everything was already installed and I got this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-kinetic-geometry-tutorials is already the newest version (0.2.2-0xenial-20180809-184418-0800).
ros-kinetic-ros-tutorials is already the newest version (0.7.1-0xenial-20180809-153903-0800).
ros-kinetic-rosbash is already the newest version (1.14.3-0xenial-20180809-134025-0800).
ros-kinetic-rqt-tf-tree is already the newest version (0.5.8-0xenial-20180809-162041-0800).
ros-kinetic-rviz is already the newest version (1.12.16-0xenial-20180809-192423-0800).
The following package was automatically installed and is no longer required:
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Now, when I launch roslaunch turtle_tf turtle_tf_demo.launch - I get no errors or warnings:

... logging to /home/snowden/.ros/log/3f67ef12-a810-11e8-bcd4-8ca982221578/roslaunch-snowden-Inspiron-N5010-17760.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://snowden-Inspiron-N5010:41377/


 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /scale_angular: 2.0
 * /scale_linear: 2.0
 * /turtle1_tf_broadcaster/turtle: turtle1
 * /turtle2_tf_broadcaster/turtle: turtle2

    sim (turtlesim/turtlesim_node)
    teleop (turtlesim/turtle_teleop_key)
    turtle1_tf_broadcaster (turtle_tf/
    turtle2_tf_broadcaster (turtle_tf/
    turtle_pointer (turtle_tf/


process[sim-1]: started with pid [17777]
process[teleop-2]: started with pid [17778]
process[turtle1_tf_broadcaster-3]: started with pid [17779]
process[turtle2_tf_broadcaster-4]: started with pid [17786]
process[turtle_pointer-5]: started with pid [17795]
Reading from keyboard
Use arrow keys to move the turtle.

After a brief moment, the second turtle revolves a little bit:


According to the tutorial, if I start moving the first turtle, the second turtle should follow it, but as visible in the GIF, nothing happens, it just stays as is. FWIW, my turtle_tf_demo.launch file looks like this:

  <!-- Turtlesim Node-->
  <node pkg="turtlesim" type="turtlesim_node" name="sim"/>

  <node pkg="turtlesim" type="turtle_teleop_key" name="teleop" output="screen"/>
  <!-- Axes -->
  <param name="scale_linear" value="2" type="double"/>
  <param name="scale_angular" value="2" type="double"/>

  <node name="turtle1_tf2_broadcaster" pkg="turtle_tf2" type="" respawn="false" output="screen" >
    <param name="turtle" type="string" value="turtle1" />
  <node name="turtle2_tf2_broadcaster" pkg="turtle_tf2" type="" respawn="false" output="screen" >
    <param name="turtle" type="string" value="turtle2" />
  <node name="turtle_pointer" pkg="turtle_tf2" type="" respawn="false" output="screen" >

I'm running ROS Kinetic on Xubuntu 16.04 LTS (xenial). Here is the output of env | grep 'ROS':


Also, I'd be around if you need any more info.

Is there something wrong on my side?

Thanks in advance! :-)

edit retag flag offensive close merge delete



Thanks for being considerate of post length (and using a pastebin like site), but we try to keep Q&As stand-alone here on ROS Answers. I've already inserted all code/xml/console output into your question, and could I ask you to attach the screenshots and gif directly to your question? Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-25 04:06:24 -0600 )edit

Hey @gvdhoorn, Thanks for the edit! Also, I've attached the GIF directly to the question, would be careful next time onwards. :-)

RJ722 gravatar image RJ722  ( 2018-08-25 05:50:18 -0600 )edit

It seems to work perfectly after a reboot, should I answer this question saying the same?

RJ722 gravatar image RJ722  ( 2018-08-26 05:24:35 -0600 )edit

I wouldn't call it a solution, but yes, go ahead and answer your own question with that information.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-26 08:19:02 -0600 )edit

Btw: +1 on the question content. In the future: don't make it too verbose, but do please keep all the relevant information in.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-26 08:19:36 -0600 )edit

I am quite new to ROS, so decided to put in everything (because who knows that I might have been the one who was screwing this up), but yes, as I gain more experience, hopefully I'd get better. Thanks for helping me out, it is much appreciated! :-)

RJ722 gravatar image RJ722  ( 2018-08-28 07:56:54 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-28 07:54:00 -0600

RJ722 gravatar image

So, as weird as it may sound, rebooting the machine actually fixes this problem.

Also, I think that it is worth mentioning that I installed ros-kinetic-tf2-tools before the reboot, but it didn't fix the problem, the reboot did.

edit flag offensive delete link more

Question Tools


Asked: 2018-08-25 03:59:21 -0600

Seen: 878 times

Last updated: Aug 28 '18