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

Realsense2 device is found, but cannot run program #26

Closed
hyeonjang opened this issue Feb 11, 2022 · 5 comments
Closed

Realsense2 device is found, but cannot run program #26

hyeonjang opened this issue Feb 11, 2022 · 5 comments
Assignees
Labels

Comments

@hyeonjang
Copy link

OS: ubuntu 20.04
Camera: Realsense2 D435i, L515

Hello,
When I tried to run this program, I encounter this message.

image

Also, on a console the message indicates
Realsense2 devices found: 1

I cannot figure out where this problem occurs.

Could you help me?
Thanks

@saudet
Copy link
Member

saudet commented Feb 11, 2022

@cansik Any ideas?

@cansik
Copy link
Member

cansik commented Feb 11, 2022

For the RealSense2FrameGrabber it is necessary to first enable the necessary streams. Here an example (samples/RealSense2DepthMeasuring.java#L44-L59):

// enable the color & depth stream of the realsense camera
rs2.enableColorStream(640, 480, 30);
rs2.enableDepthStream(640, 480, 30);

rs2.start();

I assume procamcalib needs the start method to directly enable at least the color input. In my opinion this should be included into the RealSense2FrameGrabber, if no stream has been activated, instead of the exception. It is possible to activate de default color stream by just passing 0 as parameter for width, height and framerate. Especially on the 515 camera this could be important, because there we have different resolutions and stream formats than on the 400 series.

@saudet Do you think this is a good default behaviour? If so I will create a PR.

@saudet
Copy link
Member

saudet commented Feb 11, 2022

That sounds like a good idea, yes. The default imageWidth, imageHeight, and frameRate should be taken from the properties though: https://github.com/bytedeco/javacv/blob/master/src/main/java/org/bytedeco/javacv/FrameGrabber.java#L183

@saudet
Copy link
Member

saudet commented Feb 15, 2022

Thanks @cansik for fixing this! @hyeonjang please give it a try by replacing modules/javacv.jar with this file: https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacv/1.5.8-SNAPSHOT/javacv-1.5.8-20220215.010447-6.jar

@hyeonjang
Copy link
Author

@saudet @cansik Really thank you for updating! Now it works.

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

No branches or pull requests

3 participants