Tried to run uvc_camera_node with working USB webcam, which supports UVC and it failed spewing runtime error. Using latest version (0.2.1) with ros-groovy
on 3.8.0-35-generic #50~precise1-Ubuntu
(official Ubuntu back-ported hardware compatible raring kernel). Same problem applies installing ros-groovy-camera-umd
from official repositories.
$ rosrun uvc_camera uvc_camera_node
Output:
[$ rosrun uvc_camera uvc_camera_node [ INFO] [1390413931.255962838]: camera calibration URL: file:///home/kamiccolo/Code/catkin/test_ws/src/camera_umd/uvc_camera/example.yaml [ERROR] [1390413931.256135945]: Unable to open camera calibration file [/home/kamiccolo/Code/catkin/test_ws/src/camera_umd/uvc_camera/example.yaml] [ WARN] [1390413931.256204904]: Camera calibration file /home/kamiccolo/Code/catkin/test_ws/src/camera_umd/uvc_camera/example.yaml not found. opening /dev/video0 pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)' discrete: 640x480: 1/30 1/15 discrete: 352x288: 1/30 1/15 discrete: 320x240: 1/30 1/15 discrete: 176x144: 1/30 1/15 discrete: 160x120: 1/30 1/15 int (Brightness, 0, id = 980900): -10 to 10 (1) int (Contrast, 0, id = 980901): 0 to 20 (1) int (Saturation, 0, id = 980902): 0 to 10 (1) int (Gamma, 0, id = 980910): 100 to 200 (1) menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1) 0: Disabled 1: 50 Hz 2: 60 Hz int (Sharpness, 0, id = 98091b): 0 to 10 (1) terminate called after throwing an instance of 'std::runtime_error' what(): couldn't query control Aborted (core dumped)
Error code:
$ echo $?
134
dmesg:
$ dmesg | tail -n 30
[674317.733342] usb 1-3: Product: Venus USB2.0 Camera [674317.733345] usb 1-3: Manufacturer: Vimicro Corp. [674317.734463] uvcvideo: Found UVC 1.00 device Venus USB2.0 Camera (0ac8:3450) [674317.736407] input: Venus USB2.0 Camera as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3:1.0/input/input14 [674317.822580] ------------[ cut here ]------------ [674317.822588] WARNING: at /build/buildd/linux-lts-raring-3.8.0/drivers/usb/core/urb.c:327 usb_submit_urb+0x64/0x80() [674317.822590] Hardware name: MS-7593 [674317.822591] URB ffff88022edb3e40 submitted while active [674317.822592] Modules linked in: snd_hrtimer(F) pci_stub(F) vboxpci(OF) vboxnetadp(OF) vboxnetflt(OF) vboxdrv(OF) dm_crypt(F) nvidia(POF) bnep(F) rfcomm(F) bluetooth(F) uvcvideo(F) videobuf2_core(F) videodev(F) parport_pc(F) videobuf2_vmalloc(F) videobuf2_memops(F) ppdev(F) snd_hda_codec_realtek(F) snd_hda_intel(F) snd_hda_codec(F) snd_hwdep(F) coretemp(F) snd_pcm(F) joydev(F) snd_seq_midi(F) kvm_intel(F) snd_rawmidi(F) snd_seq_midi_event(F) snd_seq(F) kvm(F) snd_timer(F) snd_seq_device(F) drm(F) snd(F) soundcore(F) psmouse(F) snd_page_alloc(F) gpio_ich(F) i7core_edac(F) serio_raw(F) microcode(F) edac_core(F) lpc_ich(F) mac_hid(F) lp(F) parport(F) binfmt_misc(F) btrfs(F) zlib_deflate(F) libcrc32c(F) vesafb(F) pata_acpi(F) hid_generic(F) usbhid(F) hid(F) mxm_wmi(F) firewire_ohci(F) wmi(F) firewire_core(F) crc_itu_t(F) r8169(F) pata_jmicron(F) ahci(F) libahci(F) [674317.822627] Pid: 17381, comm: MediaStreamDevi Tainted: PF O 3.8.0-35-generic #50~precise1-Ubuntu [674317.822628] Call Trace: [674317.822634] [<ffffffff81059b6f>] warn_slowpath_common+0x7f/0xc0 [674317.822636] [<ffffffff81059c66>] warn_slowpath_fmt+0x46/0x50 [674317.822641] [<ffffffffa0359b28>] ? uvc_v4l2_open+0x78/0x140 [uvcvideo] [674317.822643] [<ffffffff81512454>] usb_submit_urb+0x64/0x80 [674317.822647] [<ffffffffa0360f01>] uvc_status_start+0x21/0x30 [uvcvideo] [674317.822650] [<ffffffffa0359b4f>] uvc_v4l2_open+0x9f/0x140 [uvcvideo] [674317.822656] [<ffffffffa031f575>] v4l2_open+0xc5/0x110 [videodev] [674317.822659] [<ffffffff811a0462>] chrdev_open+0xb2/0x1a0 [674317.822661] [<ffffffff811a03b0>] ? cdev_put+0x30/0x30 [674317.822663] [<ffffffff81199a5e>] do_dentry_open+0x21e/0x2a0 [674317.822666] [<ffffffff81199e89>] vfs_open+0x49/0x50 [674317.822669] [<ffffffff811a8356>] do_last+0x246/0x830 [674317.822673] [<ffffffff81313a8c>] ? apparmor_file_alloc_security+0x2c/0x60 [674317.822675] [<ffffffff811aa943>] path_openat+0xb3/0x4d0 [674317.822677] [<ffffffff811aad86>] ? final_putname+0x26/0x50 [674317.822680] [<ffffffff81184c12>] ? kmem_cache_free+0x42/0x160 [674317.822682] [<ffffffff811ab762>] do_filp_open+0x42/0xa0 [674317.822685] [<ffffffff811b9425>] ? __alloc_fd+0xe5/0x170 [674317.822687] [<ffffffff8119b2ba>] do_sys_open+0xfa/0x250 [674317.822689] [<ffffffff8119b431>] sys_open+0x21/0x30 [674317.822693] [<ffffffff816fdf1d>] system_call_fastpath+0x1a/0x1f [674317.822694] ---[ end trace 0ed153b7d0ee16fb ]--- [674334.020058] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [674336.526263] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [674401.754479] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [674873.539595] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [674932.216407] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [675900.343126] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [675926.496861] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [676000.190371] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [676006.614027] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [677954.630030] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [678640.500591] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [678647.663597] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [678651.471439] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1). [678686.295091] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -32 (exp. 1).
Hardware (according to this, it's UVC compatible):
$ lsusb
(truncated)
Bus 001 Device 004: ID 0ac8:3450 Z-Star Microelectronics Corp.
EDIT
Compiling with debug info:
$ catkin_make uvc_camera_node --cmake-args "-DCMAKE_BUILD_TYPE=Debug"
Valgrind gives some insights:
$ valgrind --track-origins=yes ./uvc_camera_node
==4930== Memcheck, a memory error detector ==4930== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==4930== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info ==4930== Command: ./uvc_camera_node ==4930== [ INFO] [1390485142.550052057]: camera calibration URL: file:///opt/ros/groovy/stacks/camera_umd/uvc_camera/example.yaml [ERROR] [1390485142.626983580]: Unable to open camera calibration file [/opt/ros/groovy/stacks/camera_umd/uvc_camera/example.yaml] [ WARN] [1390485142.639382695]: Camera calibration file /opt/ros/groovy/stacks/camera_umd/uvc_camera/example.yaml not found. opening /dev/video0 pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)' ==4930== Syscall param ioctl(generic) points to uninitialised byte(s) ==4930== at 0x66C0C67: ioctl (syscall-template.S:82) ==4930== by 0x421EAC: uvc_cam::Cam::Cam(char const*, uvc_cam::Cam::mode_t, int, int, int) (uvc_cam.cpp:48) ==4930== by 0x418908: uvc_camera::Camera::Camera(ros::NodeHandle, ros::NodeHandle) (camera.cpp:57) ==4930== by 0x416B9C: main (camera_node.cpp:9) ==4930== Address 0xffefff0a8 is on thread 1's stack ==4930== Uninitialised value was created by a stack allocation ==4930== at 0x421913: uvc_cam::Cam::Cam(char const*, uvc_cam::Cam::mode_t, int, int, int) (uvc_cam.cpp:18) ==4930== ==4930== Syscall param ioctl(generic) points to uninitialised byte(s) ==4930== at 0x66C0C67: ioctl (syscall-template.S:82) ==4930== by 0x421DCB: uvc_cam::Cam::Cam(char const*, uvc_cam::Cam::mode_t, int, int, int) (uvc_cam.cpp:61) ==4930== by 0x418908: uvc_camera::Camera::Camera(ros::NodeHandle, ros::NodeHandle) (camera.cpp:57) ==4930== by 0x416B9C: main (camera_node.cpp:9) ==4930== Address 0xffefff070 is on thread 1's stack ==4930== Uninitialised value was created by a stack allocation ==4930== at 0x421913: uvc_cam::Cam::Cam(char const*, uvc_cam::Cam::mode_t, int, int, int) (uvc_cam.cpp:18) ==4930== discrete: 640x480: 1/30 1/15 discrete: 352x288: 1/30 1/15 discrete: 320x240: 1/30 1/15 discrete: 176x144: 1/30 1/15 discrete: 160x120: 1/30 1/15 ==4930== Syscall param ioctl(generic) points to uninitialised byte(s) ==4930== at 0x66C0C67: ioctl (syscall-template.S:82) ==4930== by 0x4221C6: uvc_cam::Cam::Cam(char const*, uvc_cam::Cam::mode_t, int, int, int) (uvc_cam.cpp:110) ==4930== by 0x418908: uvc_camera::Camera::Camera(ros::NodeHandle, ros::NodeHandle) (camera.cpp:57) ==4930== by 0x416B9C: main (camera_node.cpp:9) ==4930== Address 0x10ecbd44 is 356 bytes inside a block of size 720 alloc'd ==4930== at 0x4C2C31E: operator new(unsigned long) (vg_replace_malloc.c:319) ==4930== by 0x4188C6: uvc_camera::Camera::Camera(ros::NodeHandle, ros::NodeHandle) (camera.cpp:57) ==4930== by 0x416B9C: main (camera_node.cpp:9) ==4930== Uninitialised value was created by a heap allocation ==4930== at 0x4C2C31E: operator new(unsigned long) (vg_replace_malloc.c:319) ==4930== by 0x4188C6: uvc_camera::Camera::Camera(ros::NodeHandle, ros::NodeHandle) (camera.cpp:57) ==4930== by 0x416B9C: main (camera_node.cpp:9) ==4930== int (Brightness, 0, id = 980900): -10 to 10 (1) int (Contrast, 0, id = 980901): 0 to 20 (1) int (Saturation, 0, id = 980902): 0 to 10 (1) int (Gamma, 0, id = 980910): 100 to 200 (1) menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1) 0: Disabled 1: 50 Hz 2: 60 Hz int (Sharpness, 0, id = 98091b): 0 to 10 (1) terminate called after throwing an instance of 'std::runtime_error' what(): couldn't query control ==4930== ==4930== HEAP SUMMARY: ==4930== in use at exit: 469,814 bytes in 4,578 blocks ==4930== total heap usage: 323,904 allocs, 319,326 frees, 38,549,112 bytes allocated ==4930== ==4930== LEAK SUMMARY: ==4930== definitely lost: 4,108 bytes in 23 blocks ==4930== indirectly lost: 169,459 bytes in 2,240 blocks ==4930== possibly lost: 71,001 bytes in 1,135 blocks ==4930== still reachable: 225,246 bytes in 1,180 blocks ==4930== suppressed: 0 bytes in 0 blocks ==4930== Rerun with --leak-check=full to see details of leaked memory ==4930== ==4930== For counts of detected and suppressed errors, rerun with: -v ==4930== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) Killed
This repeating line does not sound very nice:
Syscall param ioctl(generic) points to uninitialised byte(s)