ROS进阶学习手记 8 -- 认识tf

TF - Transform

官网wiki对 tf 包的文档资料:   http://wiki.ros.org/tf

了解了基本的tf的作用,来看个Demo:

    http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf

   这个demo运行了一个双龟跟随的游戏,使用 teleop_key node进行第一个龟的导引,第二个龟跟随。

   $ roslaunch turtle_tf turtle_tf_demo.launch

   坐标变换的公式:


   create three coordinate frames:
   a world frame,
   a turtle1 frame,
   a turtle2 frame.

tf broadcaster ____turtle coordinate frames____>>>tf listener

>> tf Tools

     $ rosrun tf view_frames

   To view the tf tree:

     $ evince frames.pdf

   Using rqt_tf_tree

     $ rosrun rqt_tf_tree rqt_tf_tree
or:  $ rqt &

   Using tf_echo
     Usage:

     rosrun tf tf_echo [reference_frame] [target_frame]
     $ rosrun tf tf_echo turtle1 turtle2 
     #turtle2 相对于 turtle1 的位置(站在turtle1上看turtle2)

   rviz and tf

     $ rosrun rviz rviz -d `rospack find turtle_tf`/rviz/turtle_rviz.rviz


======= 2016年4月14日14:45:02 =======

Following: http://wiki.ros.org/tf/Tutorials

Let's learn tf from Zero!

Introduction:

  1. Two Path: C++ and Python, each needs a try if you want both of them.

  2. The general concept itself is explained directly on tf package

    Sonictl's Note:

        The basic concept of tf:
        A robotic system typically has many 3D coordinate frames that change over time, such as a world frame, base frame, gripper frame, head frame, etc. tf keeps track of all these frames over time, and allows you to ask questions like:

  • Where was the head frame relative to the world frame, 5 seconds ago?
  • What is the pose of the object in my gripper relative to my base?
  • What is the current pose of the base frame in the map frame?
tf can operate in a distributed system. This means all the information about the coordinate frames of a robot is available to all ROS components on any computer in the system. There is no central server of transform information. For more, see /Design.

  3. tf Overview: http://wiki.ros.org/tf/Overview

    Sonictl's Note:

        1) Data Types

           

       

Workspace:

  We think you had know how to create an ROS workspace and compile a ROS package.

Learning tf

  • Introduction to tf

    Sonictl's Note:

       

       

 

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.

    Sonictl's Note:

       

       

       

Debugging tf

  1. Debugging tf problems

    This tutorial gives a systematic approach for debugging tf related 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.







你可能感兴趣的:(ROS进阶学习手记 8 -- 认识tf)