What does it mean to have a latched subscriber?
I'm trying to latch a message to a topic using the transport library. In ROS this is done with the publisher, but in Gazebo it appears to be a property of the subscriber? Specifically, I'd like to publish a message once on my topic and then have any subscriber to that topic see the message regardless of whether the subscriber is created before or after the message is published. However, it appears that if I create a latched subscriber, it will receive the message if the subscriber is created after publication. If I create an unlatched subscriber, it will receive the message if the subscriber is created before publication. I can just create two subscribers - one latched and one unlatched - but that doesn't seem like it should be the right solution.
I tried creating a second subscriber but now it appears that if the subscriber is created after the publisher it never receives the message.
I'm currently publishing the message continuously in a thread. I was hoping that there was a better way to do this.