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

Revision history [back]

Yes, both of you are right. The carrot is two meters to the left of turtle1. This might not be what you expect, but the tutorial just states that

"The carrot1 frame is 2 meters offset from the turtle1 frame."

I have edited the Wiki page to make that more clear. If you look at the code, this is exactly what we stated:

transform.setOrigin( tf::Vector3(0.0, 2.0, 0.0) );

The three values are (x, y, z), and by convention, x is forward, y is left and z is up (not used for a 2D turtle). If you want the carrot to be two meters in front of the first turtle, change that line to:

transform.setOrigin( tf::Vector3(2.0, 0.0, 0.0) );

To answer your original question: @davo is right, for visualization, the best option is to do the following while the turtlesim is running:

  1. start RViz: rosrun rviz rviz
  2. click "Add -> TF"
  3. make sure that the checkboxes "show Names" and "Frames -> all Enabled" are ticked
  4. in "Global Options -> fixed frame" select world