12 super(OverlayMenuBridge, self).
__init__()
14 if OverlayMenu._md5sum ==
'fed3c7e9788f7ee37908107a2597b619':
15 rospy.logwarn(
'This script is not necessary since md5sum of OverlayMenu is the same as old one.')
22 poll_rate = rospy.get_param(
'~poll_rate', 1.0)
31 except Exception
as exc:
32 rospy.logerr(
'Error on publishing to {}: {}'.format(topic, exc))
35 topics = [i[0]
for i
in rospy.get_published_topics()
if i[1] == OverlayMenu._type]
36 subscribed_topics = self.subscribers.keys()
37 managed_topics = subscribed_topics + self.publishers.keys()
39 if topic
not in managed_topics:
46 rospy.loginfo(
'Remapped {} -> {}'.format(topic, self.
remap(topic)))
48 for topic
in subscribed_topics:
49 if topic
not in topics:
50 sub = self.subscribers.pop(topic)
52 pub = self.publishers.pop(self.
remap(topic))
55 rospy.loginfo(
'Stopped Remap {} -> {}'.format(topic, self.
remap(topic)))
58 if __name__ ==
'__main__':
59 rospy.init_node(
'overlay_menu_bridge')