check for active state of topic
Hi,
I have 2 nodes, 1 publishing the topic, 1 subscribing to that topic. Current situation is that when I start the subscribing node, the values that will be read from the topic are initialized to 0. After reading from the topic, they get the correct values, but when the topic stops publishing they keep that value which may no longer be correct. In that case I want the values set to 0 again. How can I (from within the subscribing node, i.e. not using the rostopic command) check if the publishing topic is still active ?
Thanks