roslaunch with missing remote
Is there a way of specifying a "not required" argument in a machine definition within a launch file? I'm trying to run a launch file that starts a node on a remote machine, however the roslaunch process fails if the remote machine can't be found on the network. I tried using a required="true"
tag in the node definition but the whole program still fails if the machine cannot be found.
Asked by lalvarez on 2021-09-23 20:44:16 UTC
Comments
No, that's not supported AFAIK.
The
required
attribute you mention is fornode
and configuresroslaunch
such that it will shut down the whole application (well, the nodes it's managing) if/when it detects that particular node dies/shuts down (ie: the one withrequired="true"
).Could you perhaps clarify why you'd have a
.launch
file intended to start nodes on a remote machine but then not have that machine available? ROS 1 sort-of assumes a 'perfect network', so intermittent failures or machines leaving/joining at unpredictable times are not handled very well.Asked by gvdhoorn on 2021-09-25 00:43:43 UTC
Thanks for the answer! I'm working on some experimental features for a robot service running in production. Because of this, the new features I'm developing are running on a second computer onboard the robot. My current solution is simply having two
.launch
files, with the new one calling the.launch
that brings up the remote node. I would like to have only one file so that running the system in the field is easier for the operator.I considered using a shell script to ping the remote machine and set an enviroment variable that I can then check using an
if
argument, however the only way I could think of invoking said script would be using a cron job that runs constantly every 30 or so seconds. Do you think there's a more elegant solution?Asked by lalvarez on 2021-09-26 19:17:49 UTC