<launch>
<arg name="video_device_right" default="/dev/video1" />
<arg name="video_device_left" default="/dev/video2" />
<arg name="image_width" default="640" />
<arg name="image_height" default="480" />
<arg name="right_image_namespace" default="stereo" />
<arg name="left_image_namespace" default="stereo" />
<arg name="right_image_node" default="right" />
<arg name="left_image_node" default="left" />
<arg name="image_topic_name_right" default="image_raw" />
<arg name="camera_info_topic_name_right" default="camera_info" />
<arg name="image_topic_name_left" default="image_raw" />
<arg name="camera_info_topic_name_left" default="camera_info" />
<arg name="left_camera_name" default="left" />
<arg name="right_camera_name" default="right" />
<arg name="left_camera_frame_id" default="left_camera" />
<arg name="right_camera_frame_id" default="right_camera" />
<arg name="framerate" default="30" />
<arg name="camera_info" default="false" />
<arg name="camera_info_path" default="stereo_camera_info" />
<node ns="$(arg right_image_namespace)" name="$(arg right_image_node)" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="$(arg video_device_right)" />
<param name="image_width" value="$(arg image_width)" />
<param name="image_height" value="$(arg image_height)"/>
<param name="pixel_format" value="yuyv" />
<param name="io_method" value="mmap"/>
<remap from="/usb_cam/image_raw" to="$(arg image_topic_name_right)" />
<param name="framerate" value="$(arg framerate)"/>
<!-- if camera_info is available, we will use it-->
<param name="camera_frame_id" value="$(arg right_camera_frame_id)" if="$(arg camera_info)" />
<param name="camera_info_url" value="file://${ROS_HOME}/$(arg camera_info_path)/right.yaml" if="$(arg camera_info)"/>
<param name="camera_name" value="narrow_stereo/$(arg right_camera_name)" if="$(arg camera_info)"/>
<remap from="/usb_cam/camera_info" to="$(arg camera_info_topic_name_right)" if="$(arg camera_info)"/>
</node>
<node ns="$(arg left_image_namespace)" name="$(arg left_image_node)" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="$(arg video_device_left)" />
<param name="image_width" value="$(arg image_width)" />
<param name="image_height" value="$(arg image_height)"/>
<param name="pixel_format" value="yuyv" />
<param name="io_method" value="mmap"/>
<param name="framerate" value="$(arg framerate)"/>
<remap from="/usb_cam/image_raw" to="$(arg image_topic_name_left)"/>
<!-- if camera_info is available, we will use it-->
<param name="camera_frame_id" value="$(arg left_camera_frame_id)" if="$(arg camera_info)"/>
<param name="camera_name" value="narrow_stereo/$(arg left_camera_name)" if="$(arg camera_info)"/>
<param name="camera_info_url" value="file://${ROS_HOME}/$(arg camera_info_path)/left.yaml" if="$(arg camera_info)"/>
<remap from="/usb_cam/camera_info" to="$(arg camera_info_topic_name_left)" if="$(arg camera_info)"/>
</node>
</launch>