ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# what is a frame?

Hi,

I am new to ROS programming. I just finished reading the tutorial of beginner level, and I can write basic pub, sub and service nodes.

I'm trying to read "Introduction to tf", http://wiki.ros.org/tf/Tutorials/Intr... I read this article over and over again, but I still can't understand what does the "frame" means.

In that article, it said there are three frames, there are two broadcasters (nodes) publishes frames to turtle_pointer (node). I know pub/sub and message. So.. the frames is those messages between publisher and subscriber??

In common sense, a (coordinate) frame is a system to use numbers to determine positions. (wiki) And we can have many separated coordinate frames. Say.. turtle1 can have frame1, turtle2 can have frame2. But what will it to be use??

If I moves turtle1, it means turtle1 changes its position in frame1, right? Turtle1 is in a position in frame1, turtle2 is in a position in frame2. How the turtle2 knows where is the turtle1??

Is the "world" frame can determine the position of two turtle[1 and 2] frames in world frame??

Any comment will be appreciated.

edit retag close merge delete

Sort by ยป oldest newest most voted

Both turtle1 and turtle2 broadcast their current pose as a tf transform (a coordinate frame). The pose of turtle1 is driven by keyboard commands, while turtle2 tries to follow turtle1. It does so by setting up a tf listener and computing the transform of turtle2 with respect to turtle1, which serves as error signal for a simple proportional control on twist coordinates.

More general information on what the tf package does, and how it works can be found in the tf ROS wiki page.

more

I'm sorry that I am still not quite understood. I think turtle1 has it's own frame1, and turtle2 has its own frame2. There is a mystery world frame, where to define it? Where to define the relationship between the "world" and "frame1" & the "world" and "frame2" ? in line: 11 - 16 ??

( 2015-06-05 02:35:47 -0600 )edit

World is the frame of reference in which the poses of turtle1 and turtle2 are specified. It is not explicitly published as a frame, but as the parent of the broadcast transform.

( 2015-06-08 02:43:28 -0600 )edit

In simplest terms, if you can think in terms of physics. It just means frame of reference on which you base your odometry or robot parts. A frame can just be though of as an origin in coordinate space and how all your joints/parts are attached to it.

more

yes, as you said, "world" frame can determine the position of two turtle[1 and 2] . There are transformation matrix, which including in "tf" tree.

more