-
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
RS utils attempt to open other cameras as rs devices #12344
Comments
Hi @jordisolanas-bc Non-RealSense cameras that are attached to a computer are treated as a platform camera by librealsense. With such cameras, only the RGB stream is usually accessible by the librealsense SDK. The Python script realsense_device_manager.py from the project 'box_dimensioner_multicam.py' provides an example of identifying whether a camera is a platform camera or not by querying the camera device's name. In the code highlighted in the above link, if an attached camera's name is not 'platform camera' then the script should ignore the non-RealSense camera and only access the RealSense ones. In regard to tools such as rs-enumerate-devices though, there likely is not anything that can be done to avoid an attached platform camera generating an error unless you alter the tool's C++ source code to ignore platform cameras and then re-compile the customized program. A C++ project at the link below provides an example of querying the camera name. https://www.codeproject.com/Articles/1233892/FluentRealSense-The-First-Steps-to-a-Simpler-RealS |
Hi @MartyG-RealSense Thank you for getting back to me. I tried that same logic on my robot, executing line by line:
As you can see above, the two realsense cameras can be accessed correctly when iterating on |
If all of the RealSense cameras that you are using are the D435 model, how about using an If check to print only the devices named D435.
|
The error appears by just iterating
Result:
So adding the check of name Example:
Result:
|
As you know the serial numbers of your two D435 cameras, you should be able to access only those cameras specifically instead of automatically detecting all attached cameras with a context instruction. I can appreciate though that this may not be a suitable solution if your project needs to connect D435 camera units other than those two because of the inflexibility of having to manually specify the serial numbers. #1735 (comment) has a Python script that demonstrates accessing individual cameras by their serial number and defining a separate cfg configuration for each camera if you wish to do so. |
Unfortunately, hardcoding the serial number of the cameras is not an option as this is part of a SW release deployed to a fleet of robots. We are implementing the realsense FW update logic. If there's no option to get rid of the error log, please feel free to close the issue. |
I looked over the details of this case again from the beginning. RealSense cameras and non-RealSense UVC webcams should be able to exist alongside each other attached to the same computer. Conflicts can occur between RealSense cameras and webcams but such cases are rare and usually take the form of either the RealSense camera or the webcam not being detected. That is not the case in this particular situation as all cameras are detected. I note that you patched the kernel after installing librealsense from Jetson packages. You do not actually need to apply the kernel patch to packages as the patch is already included within the packages. So it may be worth updating your 5.10 kernel to a slightly newer 5.10 version if possible so that the replacement kernel is unpatched, or doing a fresh installation on your Jetson without patching the kernel this time. An alternative would be building librealsense from source code with CMake instead of packages and including the CMake build flag -DFORCE_RSUSB_BACKEND=TRUE so that the SDK is built in RSUSB mode. RSUSB is not ideal for use with multiple camera projects but it can be used with multicam and you may not see a problem if only using two RealSense cameras with it. An RSUSB build of the SDK will bypass the kernel and so potentially help to avoid xioctl(VIDIOC_S_EXT_CTRLS) errors. |
Hi @jordisolanas-bc Do you require further assistance with this case, please? Thanks! |
Hi @MartyG-RealSense. I use kernel 5.10 as it's the one that comes with Jetpack 5.1. That prevents us from using a newer version. On top of the kernel 5.10 published by Nvidia, I have applied the following patches:
Finally, I installed librealsense2 and librealsense2-utils from this repo: "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" as specified in Regarding building with |
Sincere apologies for the delay in responding further. Packages have the kernel patch bundled within them but a source code installation does not. So the Jetson instruction page is accurate as the package section of the instructions does not mention kernel patches. Only the 'Building from source using native backend' section does. So if you installed from packages then the ./scripts/patch-realsense-ubuntu-L4T.sh patch script should not be applied to the kernel. It is also recommended that you only have one type of librealsense installation on your computer. So if you choose to install from packages then you should not also build librealsense from source code on the same computer, otherwise you may have multiple librealsense installations that conflict with one another. |
I'm installing
In any case, I tried removing the kernel patches and rebuilding the kernel as you suggested. I installed librealsense2 and librealsense2-utils, and same issue. |
There is no information available unfortunately about how the patch is bundled in the packages or what form it takes, just that it is bundled. The installation_jetson.md instructions for Jetson have different packages to the distribution_linux.md package instructions for PC computers. Instead of installing the librealsense2 package, the packages that should be installed on Jetson are librealsense2-utils and librealsense2-dev |
Hi @jordisolanas-bc Do you require further assistance with this case, please? Thanks! |
Hi @MartyG-RealSense, In any case, this is not a blocker and cameras are working (it's just annoying to get the errors). If there's no other idea, we can close this issue. Thanks! |
I do not have further ideas to suggest, so I will close this issue. Thanks again! |
Issue Description
I have a robot with two D435 cameras connected. The robot is running a patched kernel 5.10.120 following Installation_Jetson.md instructions. I have installed librealsense2 and librealsense2-utils (v2.54.2) using the official debians from your repository (not built from source).
If I only have the two D435 cameras connected and I run
rs-enumerate-devices -s
, I get the following output (no errors):But when I connect an RGB camera from a different vendor (e-CON imx412 sensor), while keeping my D435 cameras connected, I get the following error:
In other reported issues,
xioctl(VIDIOC_S_EXT_CTRLS)
is considered a kernel conflict. But my D435 are working correctly and the error doesn't show if this other RGB camera is disconnected. Also, usingpyrealsense2.context().query_devices()
with two realsenses and one e-CON RGB camera returns 3 devices instead of 2 (but if I disconnect the e-CON RGB camera, it reports 2 devices).How can I ensure rs utils don't try to open other cameras as realsenses? Trying to get rid of the error message.
The text was updated successfully, but these errors were encountered: