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

Launch two camera nodes for stereo calibration

asked 2016-06-17 14:56:47 -0500

Matson gravatar image

Hello, I am attempting to launch two camera nodes via a launch file in order to calibrate them via stereo. Below is my launch file:

<launch> 

  <node name="leftCam" pkg="usb_cam" type="usb_cam_node" output="screen" >
    <param name="video_device" value="/dev/video1" />
    <param name="image_width" value="640" />
    <param name="image_height" value="480" />
    <param name="pixel_format" value="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>
  </node>

  <node name="left_image_view0" pkg="image_view" type="image_view" respawn="false" output="screen">
    <remap from="image" to="/leftCam/image_raw"/>
    <param name="autosize" value="true" />
  </node>

  <node name="rightCam" pkg="usb_cam" type="usb_cam_node" output="screen" >
    <param name="video_device" value="/dev/video1" />
    <param name="image_width" value="640" />
    <param name="image_height" value="480" />
    <param name="pixel_format" value="yuyv" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>
  </node>

  <node name="right_image_view0" pkg="image_view" type="image_view" respawn="false" output="screen">
    <remap from="image" to="/rightCam/image_raw"/>
    <param name="autosize" value="true" />
  </node>

</launch>

I am pretty new to ROS and need some help getting this to output two separate image to my monitor, each from separate cameras.

Right now I run roscore in one terminal followed by roslaunch (launch_file_name).launch in another terminal. I get two little grey boxes on my screen but no camera output. I have verified that the cameras are connected as they can be accessed via other software.

Any help would be appreciated.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-12 13:29:23 -0500

Ben12345 gravatar image

Hi,

You've probably solved this by now, but i ran into the same problem so thought i'd share the answer.

Basically it's because there isn't enough bandwidth on the the USB.

If you change your resolution to say 320*240 it will work. You can force the camera to calculate the max resolution but i couldn't get that to work.

Hope this helps!

Oh, you've also given bot cameras the same device ID too, set one of them to 1 and the other to 2.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-17 14:56:47 -0500

Seen: 610 times

Last updated: Feb 12 '18