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

How to specify explicit stream requests during Multicam Usage #9801

Closed
mshong0320 opened this issue Sep 28, 2021 · 3 comments
Closed

How to specify explicit stream requests during Multicam Usage #9801

mshong0320 opened this issue Sep 28, 2021 · 3 comments

Comments

@mshong0320
Copy link

Hi,

I'm trying to use multi-camera set up of tracking and d435.
Been following the example tutorial on multicam setup but there is no information on how I can specify an explicit stream request for each rs camera.

I am currently using the following code:
// Capture serial numbers before opening streaming
std::vectorstd::string serials;
for (auto&& dev : ctx.query_devices())
serials.push_back(dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER));

// Start a streaming pipe per each connected device
for (auto&& serial : serials)
{
    rs2::pipeline pipe(ctx);
    rs2::config cfg;
    cfg.enable_device(serial);
    pipe.start(cfg);
    pipelines.emplace_back(pipe);
    // Map from each device's serial number to a different colorizer
    colorizers[serial] = rs2::colorizer();
}

How should I add the following stream request just for my D435 pipeline?
cfg.enable_stream(RS2_STREAM_COLOR, 640, 480, RS2_FORMAT_RGB8, 30);
cfg.enable_stream(RS2_STREAM_DEPTH, 640, 480, RS2_FORMAT_Z16, 30);

Thank you.

BR,

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 29, 2021

Hi @mshong0320 I recall that in a past case - #1735 (comment) - a RealSense user with two cameras took the approach of manually defining two separate pipelines, each with their own config_1 and config_2 configurations and manually provided serial numbers for the two cameras. This is in contrast to the rs-multicam approach where pipelines for each attached camera are created automatically and their serial numbers auto-detected.

The code in the linked script is in Python rather than C++ but can act as a general guide for structuring a C++ equivalent.

@MartyG-RealSense
Copy link
Collaborator

Hi @mshong0320 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants