Ask Your Question

Confused about coordinate frames. Can someone please explain?

asked 2016-06-16 21:45:54 -0500

triantatwo gravatar image

I've read:

However I'm still quite confused about the different coordinate frames map, odom, and base_link. Below I'll explain what my current understanding of these frames is, along with some questions.


  • I think this one makes the most sense conceptually.
  • I consider this the "ground truth" which is the real world.
  • REP-0105 calls this a "world fixed frame", which makes sense, because it's tied to the real world.


  • REP-0105 calls this a "world fixed frame". What? How is this fixed? Isn't this supposed to represent the movement of a mobile robot?
  • This frame is computed from an odemetry source like wheels or an IMU. Makes sense.


  • Why is base_link a separate frame? Shouldn't odom and base_link be the same thing? Doesn't odom represent the robot base and its movement?

I feel like I partially understand frames and tf. For example if you have sonar sensors mounted on a robot, you may want to know what the sensor value is from the base_link frame instead of the sonar sensor frame. I get that.

But the odom and base_link frames confuse me. Can someone please explain what the difference is?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2016-06-17 03:29:31 -0500

Mehdi. gravatar image

updated 2016-06-17 03:32:15 -0500

Adding to the previous answer, odom frame is called so because it is the frame where the odometry is used to update the pose of the robot. In this frame, there is no correction or jumps in the robot's pose, it is continually updated based on the data coming from the motor's encoders (sometimes fused with accelerometer and gyro).

Map frame is the frame representing the world, where your map (mostly occupancy grid map with black areas represent obstacles and walls) is defined.

Now in order to run robot localization and model the drifts of the robot while it is navigating, a transform between the frame map and the frame odom was introduced. At the beginning map and odom frame are overlapping. While the robot navigates and localizes (using amcl for example) it will correct its drift but it will not do this correction by changing its pose in the odom frame (this pose published under the topic /odom). It will update the transform between map and odom frames such that when you chain the transforms to get the pose of the robot in the map frame, you will get the corrected pose (thus the transform between map and odom frames represents the offset in the robot's pose that is given in the odom frame).

Do not confuse the frame odom with the robot's pose published under the topic /odom. The frame odom is just a coordinate system where the robot has to be located. This location of the robot would then be the coordinates of base_link in the odom frame. These coordinates are published in the /odom topic. If you do a rosrun tf_echo odom base_link you will get exactly the same thing as in rostopic echo /odom (here the topic odom might change depending on the robot model and on your software). So when you turn on the robot, base_link and odom are overlapping as the robot's pose is zero at the beginning. But once the robot's wheels start rotating, base_link will get away from odom. So base_link is a mobile frame and odom a fixed one.

edit flag offensive delete link more


So if I understand correctly, the dynamic/mobile base_link frame "lives" in the static/fixed odom frame? And the transform between the map frame and odom frame serves to correct for drift?

triantatwo gravatar image triantatwo  ( 2016-06-17 12:43:42 -0500 )edit

yes exactly

Mehdi. gravatar image Mehdi.  ( 2016-06-20 06:15:25 -0500 )edit

answered 2016-06-17 07:59:11 -0500

pablocesar gravatar image

updated 2016-06-17 08:02:31 -0500

Mehdi answer your question in a relatively proper way, I just want to add the 3D transformation concept that you must understand to be able to clarify your mind. You need always to have a reference to be able to measure any movement or rotation, remember that movements are relative (relativity) to another frame. Each frame knows its own world (3D components - values: x,y,z, roll, pitch, yaw) of the objects that are placed in it, for instance, your robot is placed in the map-world frame, which means that the map-world knows where your robot is located, but your robot has a 3D shape, so it can have stuff on it, like a camera or an arm, then you need a frame in the "centroid" (close to it ;-)) of the robot to be able to transform the exact position of the camera or arm in the map-world frame, so you know the camera position relatively to the centroid of the robot (base_link) and because the world knows where the robot (base_link) is in it's own coordinates, then it knows where the camera is located. But then the robot moves, how does the map-world or robot knows where the heck it is moving?, it needs another frame from which the robot moves relatively to. That's the work of the odom frame, it is placed in the map-world frame and represent the initial position of the robot (base_link) at the beginning of the scene. If the robot moves, it does it relatively to the odom frame, so the map-world use the odom frame to calculate the robot position in its own frame ( see image: ).

There is more about 3D transformations (matrix transformations) and the mathematics behind it. ( , ), but don't waist your time getting overwhelmed (no need for a headache).

You can find more in the TF overwiew ( )

edit flag offensive delete link more

answered 2016-06-17 01:03:02 -0500

billy gravatar image

updated 2016-06-17 01:03:46 -0500

Here is my understanding. Map = real world. Odom = where the robot thinks it is. The Map to Odom transform provides a correction from the where the robot actually is to where the robot thinks it is. If robot odom is 100% accurate, I think the map to odom TF = 0,0,0. If that understanding is wrong someone will by shortly to correct me.

edit flag offensive delete link more


That would be the null translation, there would also be a quaternion causing no rotation.

joq gravatar image joq  ( 2016-06-17 10:40:51 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2016-06-16 21:45:54 -0500

Seen: 7,878 times

Last updated: Jun 17 '16