Rosanswers logo

I have some questions of the tutorial : Publishing Odometry Information over ROS to learn how to publish nav_msgs/Odometry message:
1. In this tutorial code, I'm confused about the transform part. architecture image http://wiki.ros.org/navigation/Tutorials/RobotSetup?action=AttachFile&do=get&target=overview_tf_small.png
From the image of navigation stack, it only require "nav_msgs::Odometry". Why should we send "geometry_msgs::TransformStamped"? Since we set the same data in these two data structure.

2. Could I think the role of"odom" frame as the estimated pose of robot, and "base_link" as the origin (0, 0, 0) in the world?

3. In my robot case, I have a robot with motor encoder. Could I treat it as the odometry source just like below image?
image http://wiki.ros.org/rtabmap_ros/Tutorials/SetupOnYourRobot?action=AttachFile&do=get&target=setupA2.jpg

4. Are the names of "frame_id" and "child_frame_id" changeable?

Originally posted by Josper on ROS Answers with karma: 73 on 2017-05-03

Post score: 3


1 Answer 1


Rosanswers logo

1. Original: It is not clear what you are referring to, there is not geometry_msgs::TransformStamped in the image. Do you mean the tf messages?

Update: The two ways of sending the transformations (nav_msgs/Odometry on /odom and tfMessage on /tf) make the pose estimate of the robot available in a slightly different way. The /odom topic in general is only for Odometry messages, nothing else. These contain the pose and the velocity of the robot including the respective uncertainties (covariance matrices). The /tf topic on the other hand is only used for poses, but not only that of the odometry estimates, but all transformations the application tracks, e.g. the odometry, the position of sensors on the robot, objects detected in said sensors, poses of robot arms and grippers etc. Its purpose is to be able combine these transformations to answer questions like "where is the gripper with respect to the object I saw ten seconds ago". It is also incredibly useful in visualization, because everything can be displayed in a common coordinate frame.

  1. Odom is the odometry estimate of the robot, coming from a sensor that accumulates drift. base_link is attached to the robot, i.e. some defined position on the robot (or below, if projected to the floor for a wheeled robot). See REP105 for details.

  2. Yes

  3. No, not in general. The transformations need to form a tree. If you interchange you may end up with a frame with two parents

Originally posted by Felix Endres with karma: 6468 on 2017-05-03

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Josper on 2017-05-03:
Yes, I mean tf. The tutorial says we should both send geometry_msgs::TransformStamped and nav_msgs/Odometry. But from the image I posted, it only needs nav_msgs/Odometry. And in the tutorial, the geometry_msgs::TransformStamped is all the same with nav_msgs/Odom. So I'm confused why need to send it?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.