ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

SHV's profile - activity

2015-01-10 14:26:37 -0500 answered a question stereo_image_proc : Assertion `left_.fx() == right_.fx()'

I hope following helps in case of usb_cam driver: in the launch file for each node publishing left and right images respectively, set camera_frame_id same for each node (say "usb_cam"), e.g. create a launch file named usb_cam_stereo.launch :

<launch>
  <group ns="stereo">
    <node name="left" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="video_device" value="/dev/video1" />
        <param name="image_width" value="320" />
        <param name="image_height" value="240" />
        <param name="pixel_format" value="mjpeg" />
        <param name="camera_frame_id" value="usb_cam" />
        <param name="io_method" value="userptr"/>      
    </node>
    <node name="right" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="video_device" value="/dev/video2" />
        <param name="image_width" value="320" />
        <param name="image_height" value="240" />
        <param name="pixel_format" value="mjpeg" />
        <param name="camera_frame_id" value="usb_cam" />
        <param name="io_method" value="userptr"/>      
    </node>  
  </group>  
</launch>

and run following on terminal:

$roslaunch usb_cam_stereo.launch

ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc _approximate_sync:=True _queue_size:=4