Ask Your Question

Revision history [back]

Use TF.

The odom topic is going to be the raw output of your wheel encoders (or whatever the odometry source is). If you fuse multiple sensor sources together using something like robot_localization or robot_pose_ekf, its going to publish on TF the fused positioning.

Also if you want to ever get not just the current odometry information but information at a specific time (even if only 100ms ago) you're going to need to use TF or you need to buffer a bunch of measurements for "just in case". TF will store the buffer for you and also do interpolation between nearby measurements for a best-possible estimation.

Also the case you mention for odometry not publishing, you're dead in the water. TF will be valid as long as the transforms are valid at least.