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

Setting up automatically my L515 without using Intel Realsense Viewer #11691

Closed
CheCamCheCam opened this issue Apr 17, 2023 · 7 comments
Closed

Comments

@CheCamCheCam
Copy link

Required Info
Camera Model { L515 }
Firmware Version (01.05.08.01)
Operating System & Version {Win (10)}
Platform PC
SDK Version { 2 }
Language {C++ }
Segment {others }

Issue Description

Hi everyone,
I'm using my L515 camera in a C++ code, right now in order to set it up I open Intel Realsense Viewer and set it there on "short range", but I would like to automatically have it set this way through my code, I looked up at the librealsenseSDK library but I really don't understand how to use JSON file with it. I assumed that saving the config into a JSON file (only once on Intel Realsense Viewer) and then using a certain method would work, yet after reading and trying for a couple of hours I don't know how to set up a rs2::device according to my camera and how to import the informations from my JSON file to my code.
Could anyone provide any help please,
best regards

@MartyG-RealSense
Copy link
Collaborator

Hi @CheCamCheCam The Visual Preset can be defined in C++ code instead of a preset. I hope that #9071 (comment) will be a helpful reference for implementing the L515 Short Range preset.

@CheCamCheCam
Copy link
Author

Hi, thank you for the link, I think it works as I managed to implement the lines in a way that doesn't cause errors and run the code but I wonder if there is a way to see if the modifications were made ? In any case thanks a lot for the help !

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 18, 2023

If an option can be set with SET.OPTION then its current status can also be read with GET.OPTION. I believe that a line like the one below should print the current value of the preset setting.

std::cout << "Preset = " << dev.query_sensors()[0].get_option(rs2_option::RS2_OPTION_VISUAL_PRESET) << std::endl;

The L515 presets have the number range 0-4, so Short Range should return a value of '4' as it is at the bottom of the list of 0-4 options.

image

@CheCamCheCam
Copy link
Author

Thank you very much !

@MartyG-RealSense
Copy link
Collaborator

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

@CheCamCheCam
Copy link
Author

No I don't, I guess I should close this issue, thanks again for the help

@MartyG-RealSense
Copy link
Collaborator

You are very welcome. Thanks very much for the update.

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