Ask Your Question
2

Include Common Node in Multiple .launch

asked 2011-07-08 19:26:48 -0500

miltos gravatar image

I have a set of launch files that each of them initiate a subsystem. However, some of the .launch files contain dependencies on a subset of the system. I could include all dependencies in a .launch file and include it in all other launch files. However, for running the complete system, I include all .launch files in a "global" launcher. This causes the common nodes to start multiple times. How could I solve that? Is there any way to "declare once" some nodes?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-07-09 00:40:47 -0500

One way would be to give each of your subsystem launch files an argument (which could default to true) and use the if attribute within those launch files to start your common nodes only when that argument is set to true. Then, in your global launcher, set the same argument to false when you include the subsystem launch files and launch the common nodes once.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-08 19:26:48 -0500

Seen: 178 times

Last updated: Jul 09 '11