Multi-camera with RSUSB - Follow-up - #6467
Conversation
|
@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! |
|
Thanks @MartyG-RealSense |
|
@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? |
| { | ||
| bool filtered = false; | ||
| auto data = dev->get_device_data(); | ||
| for (const auto& usb : data.usb_devices) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
@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);There was a problem hiding this comment.
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.
Somewhat overdue - This PR should complete the work by @radfordi in #5615.
Should address - #5614, #6084, #5935
This also addresses additional issue -
rs-multicamwith 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.