Can subscriber know if publisher is latched=true?
It may be useful
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
It may be useful
I'd think comparing the time of ones own (successfull) subscription to the timestamp in the message could serve as a workaround, if the mechanical details are checked. Like that the subscriber initialization probably returns before the subscription at the rosmaster is completed.
One workaround we found is using rospy api. http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers#Connection_Information.
This question was to support rosbridge. and we got it workaround with this pull request. Thanks all https://github.com/RobotWebTools/rosbridge_suite/pull/58
I do not think that this is introspectable, it is just a behavior.
Asked: 2012-11-21 11:42:42 -0500
Seen: 490 times
Last updated: Sep 29 '13
I'd argue that only publishers should be latched on topics which use case is indifferent of knowing they are latched. Could you think of some example?
One usecase is rosbridge node which is a subscriber of topic message but also publisher to the web clients. The problem was that one rosbridge client which came late couldn't receive the topic message if two rosbridge clients attempt to subscribe a latch topic.
um.. maybe this issue describes better https://github.com/RobotWebTools/rosbridge_suite/issues/1