Skip to content

Multi-camera with RSUSB - Follow-up - #6467

Merged
dorodnic merged 4 commits into
realsenseai:developmentfrom
dorodnic:radfordi-t265-config-serial
Jun 1, 2020
Merged

Multi-camera with RSUSB - Follow-up#6467
dorodnic merged 4 commits into
realsenseai:developmentfrom
dorodnic:radfordi-t265-config-serial

Conversation

@dorodnic

Copy link
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

@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?

Comment thread src/device_hub.cpp
{
bool filtered = false;
auto data = dev->get_device_data();
for (const auto& usb : data.usb_devices)

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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