ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, I think the easiest way is by defining an arg. Something like:

<arg name="var"/>

and then grouping the nodes to start. Like:

<launch>

Hi, I think the easiest way is by defining an arg. Something like:

<arg name="var"/>

and then grouping the nodes to start. Like:start if the argument of var is true. Your launch file should look like:

<launch>
    <arg name="var"/>

    <group if="$(arg var)">
       ...nodes to start...
    </group>
</launch>

<launch>You can then start the nodes from the terminal with:

roslaunch you_package your_node var:=true

Let me know if that helps

Hi, I think the easiest way is by defining an arg. Something like:

<arg name="var"/>

and then grouping the nodes to start if the argument of var is true. Your launch file should look like:

<launch>
    <arg name="var"/>

    <group if="$(arg var)">
       ...nodes to start...
    </group>
</launch>

You can then start the nodes from the terminal with:

roslaunch you_package your_node launch_file var:=true

Let me know if that helps