ros-drivers / libuvc_ros

http://www.ros.org/wiki/libuvc_ros
81 stars 96 forks source link

uvc_get_stream_ctrl_format_size: Invalid mode #20

Open cesare-montresor opened 9 years ago

cesare-montresor commented 9 years ago

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
ktossell commented 9 years ago

I think you got everything right. Looks like a bug...

cesare-montresor commented 9 years ago

Well let me know if there is anything I can do :)

happen23 commented 4 years ago

I changed frame_rate to 30, and it worked, have a try