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

uvc_get_stream_ctrl_format_size: Invalid mode

asked 2015-06-11 10:46:06 -0600

Cesare gravatar image

updated 2015-06-11 10:49:27 -0600

Hello I'm having some issues in running libuvc_camera. I've done as described in the wiki, but i still have some issue, roslaunch it's returning terminating with uvc_get_stream_ctrl_format_size: Invalid mode

I've being double checking vendor, product, serial, res, format and fps but it looks good, any advice ?

Thank you :)

lsusb

Bus 001 Device 007: ID 0ac8:3410 Z-Star Microelectronics Corp. 
Bus 001 Device 006: ID 0ac8:3420 Z-Star Microelectronics Corp. Venus USB2.0 Camera

v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUV 4:2:2 (YUYV)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 176x144
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 160x120
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)

camera.launch

<launch>
  <group ns="rosbot">
    <node pkg="libuvc_camera" type="camera_node" name="left">
      <!-- Parameters used to find the camera -->
      <param name="vendor" value="0x0ac8"/>
      <param name="product" value="0x3410"/>
      <param name="serial" value="0"/>
      <!-- If the above parameters aren't unique, choose the first match: -->
      <param name="index" value="0"/>

      <!-- Image size and type -->
      <param name="width" value="640"/>
      <param name="height" value="480"/>
      <!-- choose whichever uncompressed format the camera supports: -->
      <param name="video_mode" value="yuyv"/> <!-- or yuyv/nv12/jpeg -->
      <param name="frame_rate" value="15"/>

      <param name="timestamp_method" value="start"/> <!-- start of frame -->
      <param name="camera_info_url" value="file:///home/cesare/.ros/camera_info/left_camera.yaml"/>

      <!-- <param name="auto_exposure" value="3"/> --> <!-- use aperture_priority auto exposure -->
      <!-- <param name="auto_white_balance" value="false"/> -->
    </node>
  </group>
</launch>

roslaunch camera.launch

... logging to /home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/roslaunch-cesare-6762.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ros_master:56671/

SUMMARY
========

PARAMETERS
 * /rosbot/left/camera_info_url: file:///home/cesa...
 * /rosbot/left/frame_rate: 15
 * /rosbot/left/height: 480
 * /rosbot/left/index: 0
 * /rosbot/left/product: 0x3410
 * /rosbot/left/serial: 0
 * /rosbot/left/timestamp_method: start
 * /rosbot/left/vendor: 0x0ac8
 * /rosbot/left/video_mode: yuyv
 * /rosbot/left/width: 640
 * /rosdistro: indigo
 * /rosversion: 1.11.10

NODES
  /rosbot/
    left (libuvc_camera/camera_node)

ROS_MASTER_URI=http://ros_master:11311
core service [/rosout] found
process[rosbot/left-1]: started with pid [6780]
uvc_get_stream_ctrl_format_size: Invalid mode (-51)
[rosbot/left-1] process has died [pid 6780, exit code 255, cmd /opt/ros/indigo/lib/libuvc_camera/camera_node __name:=left __log:=/home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/rosbot-left-1.log].
log file: /home/cesare/.ros/log/7550031c-104c-11e5-916e-0c4de9a94f19/rosbot-left-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-17 03:22:34 -0600

lychenpan2@gmail.com gravatar image

I have the same problem with you; and i have checked the source code of the libuvc_camera package, I guess it is the problem of the configure of the video_mode. In the source code it didn't set the video_mode as the launch file, but set it with a fixed value: "UVC_COLOR_FORMAT_UNCOMPRESSED". But i'm not sure.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-11 10:46:06 -0600

Seen: 1,315 times

Last updated: Aug 17 '15