controller_spawner --stopped option
In my launch file I spawn multiple controllers, some of which share the same resources. The typical why of loading controllers is to spawn them. What I would like to do at the moment is to spawn all controllers but only have one of them running. Bellow is an example:
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="--stopped joint_state_controller controller_1 controller_2/>
In this example all controllers will be loaded but stopped (because of the --stopped argument). What I would like is that joint_state_controller is spawned and running whilst controller_1 and controller_2 are spawned but stopped.
Is there a simple way of doing this in the roslaunch file ?
-- Edit -- One way to do it is to launch two spawner nodes like this:
<node name="controller_spawner_js" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="joint_state_controller"/>
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="--stopped controller_1 controller_2/>
Now I have the joint_state_controller launched and running whilst the other controllers are running but stopped. However I have two spawner nodes which seems redundant. Is there a better solution in which I am left with only one spawner node ?