0
$\begingroup$

Rosanswers logo

I have a system that consists of quite a few nodes that are simultaneously started. I use a launch file to start them all. Sometimes I have a couple of extra nodes that I want to run as well. The extra nodes have required nodes that overlap with the first launch file nodes. The ideal behavior would be to only launch the "overlapping" nodes if the nodes are not already running. That way the same two launch files could both be used standalone or simultaneously regardless of launch order. For example, I want the following functionality

<group if="$(find IS_NODE_RUNNING)">
    <node pkg="wiimote" type="wiimote_node.py">
</group>

Is something like this possible? I know I could accomplish this with environment variables. Is that the best way?


Originally posted by jarvisschultz on ROS Answers with karma: 9031 on 2012-04-18

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I do not know of any way to do this outside of environment variables. The arg tag requires that you specify the argument in the launch file, which you cannot do if you have to check for a node's existence.


Originally posted by DimitriProsser with karma: 11163 on 2012-04-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jarvisschultz on 2012-04-19:
That's what I was afraid of. It seems like a useful feature. Now I'm thinking the easiest way will be to write multiple launch files, and then automatically choose the correct launch file using a shell script... not really ideal

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.