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

Multi-camera with RSUSB - Follow-up #6467

Merged

Conversation

dorodnic
Copy link
Contributor

Somewhat overdue - This PR should complete the work by @radfordi in #5615.

Should address - #5614, #6084, #5935

This also addresses additional issue -
rs-multicam with multiple depth-cameras when using LIBUVC backend (Jetson family, Mac, Raspberry Pi, RK family, and more)
@MartyG-RealSense - I couldn't find the relevant ticket, but I know this was a problem for multiple users, please feel free to reference this PR within any relevant tickets.

@MartyG-RealSense
Copy link
Collaborator

@dorodnic Thanks very much. I recall that the multiple-camera cases I handled that were affected by this were primarily Jetson users such as Nano and Xavier who were experiencing issues such as camera detection failing when more than one camera was inserted into a powered USB hub (which some users found was fixable by an awkward workaround of inserting the cameras in a very specific order).

I will locate those cases and link them to this pull. Thanks again!

@dorodnic
Copy link
Contributor Author

Thanks @MartyG-RealSense
I think we need to be careful when discussing multi-camera issues in general - there are many different things that can go wrong.
I have encountered issues with Jetson USB port and specific types of USB hubs, but unfortunately, this PR will not solve them. We will continue working on it
This will, however, fix the more basic problem of multiple cameras using rs2::pipeline on these platforms.

@dorodnic dorodnic requested a review from ev-mp May 27, 2020 13:10
@dorodnic dorodnic added multicamera T260 series Intel® T265 library labels May 27, 2020
@MartyG-RealSense
Copy link
Collaborator

@dorodnic there was a new Jetson Xavier case just posted on the ROS GitHub involving problems with 2 cameras (only 1 at a time works most of the time) but with direct connection to the board instead of using a hub. That sounds as though it may fit your description of a pipeline related issue?

@@ -18,6 +18,15 @@ namespace librealsense
{
bool filtered = false;
auto data = dev->get_device_data();
for (const auto& usb : data.usb_devices)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So TM2 was just skipped... It is weird that the usb screening was not in place and yet it worked

{
rs2::pipeline pipe(ctx);
rs2::config cfg;
cfg.enable_device(dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER));
cfg.enable_device(serial);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorodnic, it would make this a much simpler change everywhere this change is needed to allow enable_device() to accept a rs2::device as well as a serial number string. After all, we have dev here and the rs2::config just wants a device. Doing the lookup again seems wasteful. It would be a bigger change to add support for this, but it would make it usage for users much cleaner going forward.

    for (auto&& dev : ctx.query_devices())
       cfg.enable_device(dev);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @radfordi
You are 100% right. I didn't want to expand the scope of this PR beyond simply getting your original work merged, but I also thought about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multicamera T260 series Intel® T265 library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants