How to combine string args in launch file?
This is my starting .launch file
<launch>
<!-- usb webcam video0 -->
<node name="usb_cam0" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video0" />
</node>
</launch>
Now I would like to pass that zero as an argument by a command like
roslaunch mypackage mylauncher.launch N:=0
so I thought
<launch>
<arg name="N"/>
<!-- usb webcam video number N as indicated in the argument -->
<node name="usb_cam0" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video$(arg N)" />
</node>
</launch>
Of course it does not work. I'm not an axpert at all of xml-like files... maybe the error is the combination of the string? Or there is a way to do this better?
My final purpose is to allow the access to any video source with inputs in the launchfile
dev/video0
dev/video1
dev/video2
etc.
Thank you in advance