latch=True in rospy.Publisher() appears to have no effect
I have a joint which I want to move to a position when the robot is initialized. The joint is never moved again. Therefore, I do this:
self._pub = rospy.Publisher("joint/command", Float64, latch=True)
self._pub.publish(45.0)
However, the subscriber (a gazebo_ros_control joint position controller) does not move the joint unless I add a rospy.sleep(1) call between the two statements above. It is my understanding that latch=True should result in the 45.0 message being stored, ready for any future subscribers to joint/command. Is this a bug, or is there something about latching that I don't understand? I'm using ROS Hydro on Ubuntu 12.04 LTS.