rxros icon indicating copy to clipboard operation
rxros copied to clipboard

rxros::observable::from_topic does not react on ROS problems.

Open henrik7264 opened this issue 6 years ago • 2 comments

rxros::observable::from_topic does not react on ROS problems such as topic termination or network problems. An on_error event should be emitted if such problems appears.

henrik7264 avatar Aug 31 '19 13:08 henrik7264

such as topic termination

just curious: @henrik7264: how would you detect 'topic termination'? Do you mean the case where a single publisher is publishing to a topic and it stops doing that?

How would you distinguish that from a publisher that is just slow?

It's possible to interrogate the master to see whether there are still publishers for a specific topic, but that will introduce a rather significant overhead (as it has to be done periodically, there are no events for this).

gavanderhoorn avatar Sep 08 '19 16:09 gavanderhoorn

@gavanderhoorn - yes it is a good question. I actually don't known how to handle it currently. I just remembered for a long time ago I read that is was possible to terminate a topic. I have never tried this and I also don't know how to handle it in a ROS node.

You a right that this could easily become an expensive operation if there are no events/triggers associated to the termination of the topic. Then we would have to fallback to timers + checks as you describe. This could easily become a nasty business.

henrik7264 avatar Sep 08 '19 20:09 henrik7264