-
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
Running three D430 on Coral Dev Board #9443
Comments
Quick thought: Could it be related to the build process? I'm building the library from source with the following flags: |
Hi @brunovollmer I would recommend beginning investigation of the issue at the exotic Linux and kernel versions that the board is using. As the board does not have Ubuntu or a commonly used kernel, there may be a conflict between those elements and librealsense. Ordinarily you could test for this by using the -DFORCE_RSUSB_BACKEND:bool=true method that you applied, as this method is not dependent on Linux versions or kernel versions and does not require kernel patching. An RSUSB build is suited to single-camera applications rather than multiple camera though. Does the RSUSB librealsense build work if only one D430 camera is attached to the Coral board? |
Hey @MartyG-RealSense, if one or two are connected it works fine when the -DFORCE_RSUSB_BACKEND:bool=true is activated. I tried it without and I get the following error now:
And strangely it only detects two cameras. |
Are all three cameras active simultaneously? When using multiple cameras at the same time on the same computer, the specification of the computing board that the cameras are being used with can have a bearing on how many cameras it will support. For example, a Raspberry Pi or an original Up Board would be suited to one camera, whilst a more powerful Up Squared board could handle two cameras. Whilst a 2018 Intel seminar suggested an Intel Core i7 processor for 4 cameras attached to the same computer. |
Looking at the Failed to resolve the request error though, you might get that error if the camera connection was being identified as USB 2.1 and the FPS had been set at 15 or 30, as 848x480 would support 6 or 10 FPS in USB 2 mode. |
They are connected the same way as before ,which is USB-3.0. Regarding the one question before: Yes they are supposed to run at the same time. |
And the cameras are all attached to a USB hub on the USB 3 port of the Coral? |
Yes |
And when three cameras are attached, do you know if it is always the same camera that is not detected or a different one of the 3-set each time? (you could distinguish between them by their serial numbers) |
It's always the same that is not detected. |
Do all three cameras have the same firmware version? |
Yes. All have version: "05.12.14.50" |
Are the serial numbers of the cameras being detected automatically or are you manually providing the serial numbers in the script? If you are putting the serial numbers in the script as pre-programmed values, is the serial number of the camera that is never detected confirmed as correct? |
I'm using this code snippet to detect the cameras:
|
So the same script works on your laptop with the same hub, but the hub is connected to the laptop instead (suggesting that the code is fine and the hub is fine). Is this correct please? |
Yes that is correct! |
You stated in your opening message that "it can't even find all cameras (disconnect solves that)". Is the third camera able to be detected on Coral if you reset it by unplugging that camera from the hub and then plugging it back in? |
Not if I compile librealsense without rusb support |
There was a past case in which another Coral board user had the same experience with 'frame didn't arrive' errors even when using a powered USB hub and manually patching the kernel instead of using RSUSB. There was not a clear solution at the end of that particlar case. Another Coral user in a later case who was using RSUSB posted a guide containing advice for what had worked for them to resolve problems. |
I used #7646 to initially setup our system and it runs great with one or two cameras. My main problem is related to the fact that it won't work once a third camera is connected. |
You could try swapping the USB cable of the third camera with another of the cameras to eliminate the possibility that the Coral board has a conflict with a particular USB cable (even though it works fine on the laptop). |
So the version that was built without RUSB support does not seem to work at all on the dev board. Problems are:
The version with RUSB support still suffers from the mentioned problems above. |
So the Coral cannot detect the third camera even if you use the lsusb Linux command when your application is not running to simply check whether the camera is detectable on its USB port? |
That is the weird thing. It does find the cameras. Output of lsusb:
|
It might be a useful test to print the serial numbers of the detected cameras to ensure that one of the three serial numbers is not being duplicated instead of its own unique serial being read. |
Also, I checked the ID numbers from the lsusb list against the list of RealSense model ID numbers (PIDs). https://github.com/IntelRealSense/librealsense/blob/master/src/ds5/ds5-private.h They should all be D430 models, yes? 0ad4 (of which there are two) is D430, but 0b4b corresponds to D430i (an IMU-equipped model), which may be a mis-identification if it is definitely an IMU-less D430 board. |
No so one of them is an D430i that's true but I guess that should not lead to a problem or? |
Another thing I realized is that only connecting three but not using all of them leads to problem. So if I connect all three but only initialize two it won't work. I get more and more the feeling the problem is not related to the actual bandwidth but some USB connectivity issue of the coral dev board. |
D430i is very rarely seen on these forums. The few cases involving them typically involve a D435i camera whose internal RGB sensor is not being detected, causing the firmware to identify the camera as a D430i. My understanding is that a difference between RealSense models that have an IMU and those that do not is that the IMU-equipped models are treated as HID devices. If you only have 2 cameras connected and one of them is the one that usually does not work, that suggests that the problem is with simply having three cameras, not that there is a fault with a particular camera. |
@MartyG-RealSense Do you think this problem could be solved by building the library without RUSB support and patching the kernel somehow? |
Or is there any expert on that matter in the librealsense team that I could talk to? |
You could try building the SDK from source with the V4L2 backend (no RSUSB) by using the CMake build flag -DFORCE_LIBUVC=OFF Alternatively, as Mendel is apparently a lightweight derivative of Debian, i wonder whether the Debian package method of installing librealsense could work with Mendel instead of building from source code. https://coral.googlesource.com/docs/+/refs/heads/master/ReadMe.md https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md |
Tried the built with -DFORCE_LIBUVC=off and had the same problems:
|
Okay, thanks for the update. Do you plan to try the Debian package method, please? |
Unfortunately did not work as there is no valid installation candidate for mendel and it mentions at the top that it is only for X86/AMD64-based Debian distributions |
Oh yes, the packages at the distribution_linux.md page are for x86 / x64 processors. I do apologize. There are Debian packages at the Nvidia Jetson installation page that are designed for Arm, though you may encounter similar problems with using those with Mendel. https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md |
Hi @brunovollmer Do you require further assistance with this case, please? Thanks! |
Hi @MartyG-RealSense. The current working solution is to run the three cameras over two cables which seems to work fine. From my further research it seems that the native mendel usb driver only supports yuv format which is not supported by the d430 cameras and if I built intelrealsense wiht RUSB support three cameras don't work. That's why I think we will stick with the two cable solution. But nevertheless if anybody has any idea how to make the RUSB version work we are more than open to ideas |
Thanks very much @brunovollmer for the update about your success with a two-cable setup! RSUSB has the limitation of being suited to single-camera applications rather than multi-camera (like patched kernel builds are), so it is difficult to see how that limitation could be circumvented. You can find more information about this by visiting the comment linked to below and scrolling down to the section headed What are the advantages and disadvantages of using libuvc vs patched kernel modules? |
I've read this specific post earlier and do see your point. What just irritates me a bit is that everything works flawless with two cameras and I don't really see the reason at the moment why it would fail with three cameras. |
I performed further research into multicam with RSUSB. Apparently in subsequent months after the libuvc vs patched kernel information, a fix was added to the SDK in 2.35.2 to provide multicam support under RSUSB. I knew improvements to multicam were added in 2.35.2 but had not realized that they also addressed RSUSB. A RealSense user in #5828 (comment) found that it was possible for them to use six cameras under RSUSB but they had to reduce resolution to do so. |
hi @brunovollmer Do you require further assistance with this case, please? Thanks! |
Hey @MartyG-RealSense. Sorry for the late reply. I was in holidays. Unfortunately did I already try to lower the resolution or frame rate. But the problem already appears when initializing. |
It may be worth testing your cameras with the multiple_realsense_cameras.py Python multicam viewer project in the link below that a RealSense user created. This would help to demonstrate whether there is something in your own project script that is affecting detection of all cameras. https://github.com/ivomarvan/samples_and_experiments/tree/master/Multiple_realsense_cameras |
Hi @brunovollmer Do you require further assistance with this case, please? Thanks! |
I think so far I have not been able to make it work with only one hub. I might come back to this issue later but for now I will work on other things. Thanks for the help! |
Thanks very much for the update, @brunovollmer - please do feel free to ask questions on this forum whenever you need to. Good luck! |
Issue Description
Hey everybody,
I'm not sure if this is the right place but I thought maybe somebody had the same problem or some idea. I'm currently trying to connect three D430 + D4 vision boards to a coral dev board through one USB-C hub. Unfortunately I can't make it work as I either receive a segmentation fault (most of the times), a "Frame did not arrive within 5000" (sometimes) or it can't even find all cameras (disconnect solves that).
I've created a little test script to check if the cameras work:
The things that I've check so far:
I'm a bit lost now as I don't really know what to do to make it work. Unfortunately we have to run all cameras through one USB-C 3.0 port. Any ideas on what to try?
The text was updated successfully, but these errors were encountered: