Ros
30 May 2023

ROS tf Package

ROS Learning Notes

ROS Learning Notes 09

image

Keypoints

  • tf package
  • How to use tf package

tf package

  • tf package records the relationship between different coordinate frames within 10 seconds.
  • tf records the relationship between different coordinate frames in a tree structure.

How to use tf package

sudo apt-get install ros-meloic-turtle-tf
roslaunch turtle_tf turtle_tf_demo.launch
rosrun turtlesim turtle_teleop_key
rosrun tf view_frames
rosrun tf tf_echo /world /turtle1
rosrun rviz rviz -d 'rospack find turtle_tf' /rviturtle_rviz.rviz
  • rosrun is to run a node.
  • roslaunch is to run a launch file, i.e. a script that runs multiple nodes.
  • rosrun tf view_frames is to generate a pdf file that shows the relationship between different coordinate frames.
  • rosrun tf tf_echo /world /turtle1 is to show the relationship between two coordinate frames. Result is
  • rosrun rviz rviz -d 'rospack find turtle_tf' /rviturtle_rviz.rviz is to launch rviz to see the relationship between different coordinate frames visually.
    • Change the fixed frame to world and add TF in Add button.

Tags:
0 comments