-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multithread Multicam xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy #5939
Comments
There is another Python script in the link below for streaming multiple cameras. Structurally, your script is similar to that one, taking care to identify the separate devices using serial number. I note though that in the linked script, they take the approach of defining separate '_1 and _2' pipeline and config variables. ...from Camera 1pipeline_1 = rs.pipeline() ...from Camera 2pipeline_2 = rs.pipeline() Although both the _1 and _2 definitions are set to the same content - rs.pipeline() and rs.config() - they are treated as separate devices because unique serial numbers are defined for them: config_1.enable_device('013102060174') |
I want to sync multiple cameras. The white paper suggests creating threads for each camera. So, I have the following questions:
|
As far as I know, running in a single thread or multiple threads in a multi-cam setup is a matter of personal preference rather than a compulsory requirement, and some developers believe that a multi-thread approach with a thread for each device provides better performance. As the multi-cam white paper says, a way to test whether sync is working correctly is to observe the timestamps of the devices. If they always remain perfectly aligned then this indicates that they are not synced, whilst if the timestamps noticably drift apart over a period of minutes then this indicates that they are successfully synced. I'm not as certain about your second question. The approach that the rs-multicam example program takes is to create multiple pipelines, one for each detected device. https://github.com/IntelRealSense/librealsense/tree/master/examples/multicam |
I have been able to run the code you provided. I still have some questions regarding the problem I encounter:
|
Some further explanation is provided in the SDK's frame management documentation. https://dev.intelrealsense.com/docs/frame-management#section-frames-and-threads
|
This case will be closed after 7 days from now if there are no further questions. Thanks! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
I have 2 depth camera D435 and D435i. I create 2 thread for each camera to HW sync them. When running the thread, only thread 1 run, thread 2 will get error xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy.
Command dmesg give output
[91401.485289] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024). [91401.592335] uvcvideo: Non-zero status (-71) in video completion handler. [91403.207448] audit: type=1400 audit(1582876763.713:666): apparmor="DENIED" operation="open" profile="snap.gnome-system-monitor.gnome-system-monitor" name="/proc/12263/attr/current" pid=15216 comm="gnome-system-mo" requested_mask="r" denied_mask="r" fsuid=1001 ouid=1001 [91406.589807] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
Below is my code
The text was updated successfully, but these errors were encountered: