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

roslaunch is very strict about argument passing; you can't use an argument ($(arg foo)) without first declaring that the launch file takes an argument (<arg name="foo"/>).

in addition, passing arguments that are not expected, or failing to pass arguments that do not have a default is an error. (very similar to passing arguments when calling a function in C++ or python)

Therefore, your included launch file should be:

<?xml version="1.0"?>
<launch>
    <arg name="foo"/> <!-- declare that this launch file requires an argument -->

    <param name="testing" value="$(arg foo)"/> <!-- use the argument -->
</launch>