0
$\begingroup$

Rosanswers logo

Hi, how to check in the launch file (inside the node tag), whether that node is already running?


Originally posted by dharanikumar on ROS Answers with karma: 35 on 2016-09-08

Post score: 1


Original comments

Comment by SL Remy on 2016-09-08:
Can you explain a little more about the motivation for the request? For example, if a node is already running, will you want the "launch file" do something different?

Comment by dharanikumar on 2016-09-08:
@SL Remy I think of adding separate launch files for each modules. So i can run the modules separately or combined (By executing each launch files in sequence).

Comment by dharanikumar on 2016-09-08:
@SL Remy But few modules requires a common node to run. So if that node is executed by the first launch file, then subsequent launch file terminates it by restarting the same node.

Comment by dharanikumar on 2016-09-08:
@SL Remy I can create a single launch file for executing multiple modules. But i feel the approach of individual launch files is better than single big launch file.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I'd suggest using plain old roslaunch xml.. You can create launch files for the modules, and then you can create a launch file that includes in a "large" launch file. This way you can compose your application as needed. You can also run the launch files for the individual modules yourself at the command prompt, if you'd like to "hotswap" functionality.

You can also have multiple launch files for the different use cases.. take a look at the hector_quadrotor project for some really cool examples.

Hope this helps!


Originally posted by SL Remy with karma: 2022 on 2016-09-09

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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