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

Build librealsense only for D415 #7587

Closed
pmirabel opened this issue Oct 15, 2020 · 7 comments
Closed

Build librealsense only for D415 #7587

pmirabel opened this issue Oct 15, 2020 · 7 comments

Comments

@pmirabel
Copy link

pmirabel commented Oct 15, 2020

Hi,

I was wondering if there is any option to build librealsense with support for only d415 support ?
Something like :
cmake .. -DCMAKE_BUILD_TYPE=Release -TARGET_DEVICE=d415

thank you!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 16, 2020

Hi @pmirabel I am not aware of a CMake build flag option that limits building to a specific camera model. I have seen a case though where a CMakeLists.txt file defined a specific RealSense model using a setting called project.

#6591

image

You could also make a RealSense application D415-only by performing a check for the 'friendly camera name' of the camera or for its PID identity number.

Friendly name
RS2_CAMERA_INFO_NAME

PID
RS2_CAMERA_INFO_PRODUCT_ID

The link below contains some example code that stores the friendly camera name of the attached camera in a string called devName and then checks with an If statement whether devName = "Intel RealSense D415"

#2219 (comment)

@pmirabel
Copy link
Author

I will try as soon as possible (maybe not within this month... ⏳ ) and let you know.

@MartyG-RealSense
Copy link
Collaborator

Adding a note to keep this case open for a further time period whilst awaiting test feedback from @pmirabel at a later date.

@pmirabel
Copy link
Author

Hello,
I am sorry but I think that I missed a point.

My question was Can I compile librealsense itself only for a specific cam model? Because I was wondering if there were significant improvement (decrease size or buildtime).

I think that your answer is about building an application that use librealsense, Am i right?

NB: I am trying some options listed here to see if there is any significant improvments : https://github.com/IntelRealSense/librealsense/wiki/Build-Configuration

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 27, 2020

No, my answer was directed at your question of compiling for a specific cam model.

#7587 (comment)

I could find little information about how to do so via CMake, which is why the majority of the answer focused on how one might do model-recognition within the application code (e.g performing a launch check of "if camera is not a D415 then go no further").

I did suggest though that if you needed the limitation to be applied during the build process then you might be able to do so via some definitions in the CMakeLists.txt CMake build file.

image

@MartyG-RealSense
Copy link
Collaborator

Hi @pmirabel Do you still require 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