Ask Your Question

what is a frame?

asked 2015-06-04 02:30:58 -0500 gravatar image


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", 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 flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-06-04 03:33:16 -0500

Adolfo Rodriguez T gravatar image

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.

edit flag offensive delete link 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 ?? gravatar image  ( 2015-06-05 02:35:47 -0500 )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.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2015-06-08 02:43:28 -0500 )edit

answered 2015-06-06 22:10:43 -0500

Truce gravatar image

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.

edit flag offensive delete link more

answered 2015-06-04 23:17:08 -0500

crazymumu gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-06-04 02:30:58 -0500

Seen: 5,080 times

Last updated: Jun 04 '15