Kartik, You can think of launch files like subroutines, and of course, a subroutine needs to declare what arguments it takes and, optionally, default values of those arguments: --- Pseudocode: main: call foo(arg1=false) subroutine foo(arg1, arg2=true): if arg1: something if arg2: something_else --- Launch file equivalent: main.launch: foo.launch: --- This is essentially what the documentation tells you but I found it helped to think about the analogy between launch file arguments and subroutine/function arguments. Cheers, Pat On Fri, Jan 28, 2011 at 10:20 PM, Kartik Mohta wrote: > Thanks, it works :) > > I think the documentation is still not very clear, maybe you can put > the example there too. > > On Sat, Jan 29, 2011 at 1:08 AM, Ken Conley wrote: >> Hi Kartik, >> >> When using , every launch file must be self-contained -- i.e. it >> has to declare any args that it uses.   I updated the roslaunch/XML >> documentation to make this more explicit. >> >> Thus, test2.launch: >> >> >>   >>   >> >> >> Hope this helps, >> Ken >> >> On Fri, Jan 28, 2011 at 9:43 PM, Kartik Mohta wrote: >>> Hi, >>> >>> Is there any help on how to properly use the $(arg) substitution in >>> launch files? I followed the example given at >>> http://www.ros.org/wiki/roslaunch/XML/arg but it gives me a "unused >>> args" error. >>> >>> This is with ROS CTurtle on Ubuntu 10.10. >>> >>> $ cat test.launch >>> >>>     >>>         >>>     >>> >>> >>> $ cat test2.launch >>> >>>     >>> >>> >>> $ roslaunch test.launch >>> ... >>> Checking log directory for disk usage. This may take awhile. >>> Press Ctrl-C to interrupt >>> Done checking log file disk usage. Usage is <1GB. >>> >>> unused args [name] for include of [test2.launch] >>> >>> >>> -- >>> Kartik >>> _______________________________________________ >>> ros-users mailing list >>> ros-users@code.ros.org >>> https://code.ros.org/mailman/listinfo/ros-users >>> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> > > > > -- > Kartik > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users >