Skip to content
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

No Video Capture Device Error rs2_create_device #11263

Closed
yeric1789 opened this issue Dec 26, 2022 · 3 comments
Closed

No Video Capture Device Error rs2_create_device #11263

yeric1789 opened this issue Dec 26, 2022 · 3 comments

Comments

@yeric1789
Copy link

yeric1789 commented Dec 26, 2022

  • 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 :)


Required Info
Camera Model { D435 }
Firmware Version (Open RealSense Viewer --> 2.53.1)
Operating System & Version Linux (Ubuntu 22.04 LTS)
Kernel Version (Linux Only) (5.15.0-56-generic)
Platform PC (x86 CPU)
SDK Version { 2.53.1}
Language {C/C++ }
Segment {others }

Issue Description

I have been attempting to install on a new Ubuntu distro 22.04 LTS, however when running my program which previously worked on Ubuntu 20.04 I find the following error being thrown:

RealSense error calling rs2_create_device(info_list:0x555e5b7a8c00, index:1):
    /dev/video0 is no video capture device Last Error: Invalid argument

When I go to list my devices out for my computer I see the following and indeed the Depth camera does not correspond with /dev/video0

$: v4l2-ctl --list-devices
ipu3-imgu (PCI:0000:00:05.0):
	/dev/video0
	/dev/video3
	/dev/video4
	/dev/video5
	/dev/video6
	/dev/video7
	/dev/video8
	/dev/video10
	/dev/video12
	/dev/video13
	/dev/media1

Intel IPU3 CIO2 (PCI:0000:00:14.3):
	/dev/video1
	/dev/video2
	/dev/video9
	/dev/video11
	/dev/media0

Intel(R) RealSense(TM) Depth Ca (usb-0000:00:14.0-1):
	/dev/video14
	/dev/video15
	/dev/video16
	/dev/video17
	/dev/video18
	/dev/video19
	/dev/media2
	/dev/media3

I have tested out the realsense-viewer and recorder which seems to work fine. I only have one device connected. I have also checked my code and found that the problem starts when I query for the devices. specifically looping through any connected devices:

for (rs2::device &&dev : ctx.query_devices()){
...

I have seen a similar issue from here #10072. I have checked for memory leaks which don't seem to present. I have seen that they used docker (which currently I am not using). Is there any way to get this fixed short of a custom build? Thanks.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 27, 2022

Hi @yeric1789 If you are only using one camera and wish to access the depth stream, an alternative to looping through all connected devices may be to query for the first depth sensor that can be detected. For example in C++:

auto sensor = selection.get_device().first<rs2::depth_sensor>();

One of the best C++ references for using query_devices for querying the presence of all attached cameras rather than a specific sensor is #2219

@yeric1789
Copy link
Author

OK thanks that was able to fix it.

@MartyG-RealSense
Copy link
Collaborator

That's great to hear, @yeric1789 - thanks very much for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants