Publish or subscribe to another roscore/master
Say we have two roscores one with URI1 and another with URI2. We have a code running in a cpp file in URI1 where given a condition we want to publish a message but to obtained from a subscriber in URI2.
Similarly, if we have a subscriber running in URI1, we want to to only obtain messages that are published to that topic but within the codes that are running in URI2.
For example in a code that is running under URI of "http://localhost:"11311":
realtime_tools::RealtimePublisher<std_msgs::string> publisher_;
publisher_.unlockAndPublish("http://localhost:"11312")