ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
My answer to this is to use the existing linux system to do this: systemd. Basically do the following:
On the target machine, the machine you want to run remote nodes on, do the following:
On the local machine, the machine you want to launch remote nodes on, do the following:
systemctl stop remote_ros
and/or systemctl start remote_ros
. This can be done with the ExecuteProcess launch action. Stop will kill the nodes and start will bring them up. If you don't want to stop the nodes, I believe start is a NOOP if they are already running.
I think this solution is more straight forward than the others presented and ideally the service just runs all the time, but you can always kill it with the systemctl stop command.