Possible for a node to "refresh" information with rosmaster?
The basic scenario I would like to avoid
- Start roscore
- Start node A subscribing to topic B
- Kill roscore and restart roscore
- Start node B publishing topic B Result: Node A has not registered its subscription to topic B with the new roscore instance, and so no connection will be made with node B and node A will not get messages on topic B
Running into this problem when I have diagnostic nodes (e.g., rqt_plot) which I have to restart everytime I kill a roslaunch file. The not-so-great solution is to just spawn roscore in the background and hope that it never dies for any reason.
Is there a way to get a node to periodically refresh it's connection with rosmaster so that it rosmaster restarted it would (eventually) get the pub/sub information from that node and could make the proper connections?
Why do you want to kill the roscore? I normally run it in a tmux-session so that is also does not need it's own terminal window.
I don't, but shit happens. To quote: The not-so-great solution is to just spawn roscore in the background and hope that it never dies for any reason
I've never seen the roscore crash. That's why I wonder why you want to protect yourself against it.
Consider yourself lucky then.