Run local master node only if necessary?
I have a device that I would like to be functional with or without the robot it is intended for. All of the software is packaged in ROS components. At minimum I would like the following behavior:
On startup: 1. If no ros master is reachable on the remote machine, launch a local ros master and the local nodes. 2. If a ros master is reachable on the remote machine, connect to it and launch the local nodes.
I am aware of the multimaster infrastructure, but I would like a solution that works out of the box even if multimaster stuff isn't installed on the remote machine, and this is a relatively restricted use case.
Is this usecase already supported in the basic ros tools, or should I go ahead and write something custom?
Update: I gave up on this design since I posted. Would love ROS to be distributed by default in the future though.