ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I suspect you're creating the publisher and then immediately publishing a single message to set the robot pose.
This is the usual race condition many new users run into, where subscribers often don't receive the first message on a topic.
The reason that this happens is that subscribers don't connect immediately when a publisher starts; they have to receive a callback that a new publisher exists and establish a TCP connection, before they can receive messages. This takes a few milliseconds, and usually mean that existing subscribers will miss the first few messages on a new topic.
The reason that a latched topic works for this, is that new subscribers to a latched topic will immediately receive the most recent message on a topic, regardless of when it was published.