We had the same problem with static transforms. As far as I remember /tf_static is a latched topic, but latched topics does provide the last arrived message only. So rviz gets the last tf which was published by rosbag play in /tf_static. This is a problem only if you have more than one static tf.
I'm not sure but i think rosbag play just publishes the tf-messages stored in/tf_static instead of using a tf2 static transform broadcaster, which would lead to a different behaviour when playing a bagfile instead of using ROS "online", since normally you use a static transform broadcaster in your node to publish a static tf instead of writing a tf message to the /tf_static topic. Can somebody confirm this?
A desired behaviour would be to have the static tf's available as soon as the bag file is opened - regardless at which time the playing is started
https://github.com/ros/ros_comm/issue... is a related issue- the tf_static is only recorded in the first bag when splitting bags.