[ros-users] Using $(arg) substitution

Kartik Mohta kartikmohta at gmail.com
Sat Jan 29 06:20:56 UTC 2011


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 <kwc at willowgarage.com> wrote:
> Hi Kartik,
>
> When using <args>, 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:
>
> <launch>
>   <arg name="name" />
>   <param name="param" value="$(arg name)"/>
> </launch>
>
> Hope this helps,
> Ken
>
> On Fri, Jan 28, 2011 at 9:43 PM, Kartik Mohta <kartikmohta at gmail.com> 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
>> <launch>
>>    <include file="test2.launch">
>>        <arg name="name" value="value"/>
>>    </include>
>> </launch>
>>
>> $ cat test2.launch
>> <launch>
>>    <param name="param" value="$(arg name)"/>
>> </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 at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Kartik



More information about the ros-users mailing list