sieuwe1 / PS4-eye-camera-for-linux-with-python-and-OpenCV

Use the PS4 camera as an cheap yet powerfull 3D depth and RGB camera for use with OpenCV and python in Linux
49 stars 15 forks source link

Can't acces camera video streams on Ubuntu (V4L2_CORE - Resource temporarily unavailable) although it works on Win #6

Open Dan010123 opened 10 months ago

Dan010123 commented 10 months ago

Hi! I have Ububtu server 20.04 on raspberry pi 4 8Gb I use guvcview to view the video, logitech usb webcamera works fine

PS4EYE is set-up properly, camera firmware patched, lsusb shows Bus 002 Device 003: ID 05a9:058b OmniVision Technologies, Inc. USB Camera-OV580

guvcview connects to the camera, but I have black or green images and a plenty of messages

V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable

I know that the camera is Ok as I successfully run it on Windows 10.

What could be wrong? Thank you!

Dan010123 commented 10 months ago

Well. Whatever I did, I haven't managed to launch it on 2 platforms - Rasberry pi4 (4GB) with RaspiOS and on Raspberry pi4 (8GB) Ubuntu 22.04.3 LTS. Both resulted in guvcview with _V4L2CORE: Could not grab image (select timeout): Resource temporarily unavailable BTW I don't know if this could be the reason, but I tried several firmwares from this repository https://github.com/psxdev/luke_firmwares/tree/master - and all of them with v4l2-compliance command gave the same errors

v4l2-compliance

.....
Control ioctls (Input 0):
        test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
        test VIDIOC_QUERYCTRL: OK
                fail: v4l2-test-controls.cpp(489): s_ctrl returned an error (13)
        test VIDIOC_G/S_CTRL: FAIL
                fail: v4l2-test-controls.cpp(736): s_ext_ctrls returned an error (13)
        test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
        test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
        test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
        Standard Controls: 13 Private Controls: 0 ....

Total for uvcvideo device /dev/video0: 46, Succeeded: 44, Failed: 2, Warnings: 1

dmesg | grep -i -e cam -e video:

....
[108.285398] usbcore: registered new interface driver uvcvideo
[  841.006057] uvcvideo 2-1:1.1: Failed to resubmit video URB (-1).
[  854.045537] uvcvideo 2-1:1.1: Failed to resubmit video URB (-1).
[  854.052225] uvcvideo 2-1:1.1: Failed to resubmit video URB (-1).

So, access denied, and the same with sudo guvcview. I didn't find the solution for that.Wwith With

sudo rmmod uvcvideo
sudo modprobe uvcvideo nodrop=1 timeout=5000

the output looks like this: image

If anybody knows, how to solve this - I would appreciate the help :) For the timebeing I give up...

Useful link also for those, who are interested (for Win) - https://www.psxhax.com/threads/ps4-ps5-cameras-windows-drivers-tutorial-for-2022-by-hackinside.11453/ Also a good one - (with google translator) - including ROS usage, helpful (I was going to try the camera for ROS2 SLAM). https://haochihros.wordpress.com/2016/08/03/ps4eye-x-ros-ii-ubuntu-connection/

Regards!