Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to get usb camera frame?

I use ubuntu 14.04 and indigo. I install usb_cam. My launch file is under home/rosbuild_ws/package_dir. The content of it is below :

<launch>
     <node name="usb_cam" 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="mjpeg" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>
  </node>
  <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen">
    <remap from="image" to="/usb_cam/image_raw"/>
    <param name="autosize" value="true" />
  </node>
</launch>

I run below command on terminal and get errors :

~/rosbuild_ws/package_dir$ roslaunch camera.launch

Unable to open camera calibration file [/home/user/.ros/camera_info/head_camera.yaml]
[ WARN] [1435933649.952842400]: Camera calibration file /home/user/.ros/camera_info/head_camera.yaml not found.
 [ INFO] [1435933649.952876387]: Starting 'head_camera' (/dev/video1) at 640x480 via mmap (mjpeg) at 30 FPS
 [ WARN] [1435933649.984525524]: unknown control 'white_balance_temperature_auto'

 [ WARN] [1435933649.987070582]: unknown control 'focus_auto'

 [ERROR] [1435933650.169146261]: Webcam: expected picture but didn't get it...
 [ERROR] [1435933650.200955971]: Webcam: expected picture but didn't get it...
 [ERROR] [1435933650.232933986]: Webcam: expected picture but didn't get it...

How can I get rgb camera frame and show in ros-indigo?