Contents:
Helper function to publish robot state.
pub – The publisher on which to publish the robot state information.
robot – Robot instance from which to extract state.