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

Dev presets #46

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Dev presets #46

wants to merge 5 commits into from

Conversation

SimoneMic
Copy link

Added the possibility to set camera presets for 400 camera series.
In this link the general documentation from Intel.
Here the SDK docu

@traversaro
Copy link
Member

@SimoneMic we found this branch used on ergoCubSN000, is this PR ready for review and merge, so we use a released version of yarp-device-realsense2 ? Thanks!

fyi @Nicogene

@SimoneMic
Copy link
Author

I have tested this repo only with ergoCubSN000 camera model (D455)

@SimoneMic SimoneMic marked this pull request as ready for review November 16, 2023 17:16
@SimoneMic SimoneMic requested a review from Nicogene as a code owner November 16, 2023 17:16
@SimoneMic
Copy link
Author

Otherwise @traversaro you can use the previous master version, is still viable, since this is only an improvement for the navigation

@traversaro
Copy link
Member

@SimoneMic sorry for the delay, are you still using this modification? Should we try to merge it?

@SimoneMic
Copy link
Author

Yes, I'm still using it

Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the 1-year-late review!

Only some minor comments

m_usePreset = config.find("usePreset").asBool();
yCInfo(REALSENSE2) << "Enabled Using Presets";
}
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add { here?

std::string presetName = config.find("presetName").asString();
std::transform(presetName.begin(), presetName.end(), presetName.begin(), ::toupper);
if (presetsMap.find(presetName) == presetsMap.end()) {
yCError(REALSENSE2) << "Value " << presetName << " not allowed as camera preset, see documentation for supported values.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that this is not a fatal error?
The log of such devices usually is not checked and the user may expect to have the presets enabled if the device is correctly running

@@ -149,5 +159,7 @@ class realsense2Driver :
float m_scale;
bool m_rotateImage180{false};
std::vector<cameraFeature_id_t> m_supportedFeatures;
bool m_usePreset{false};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add this new flag in the documentation ? In the README is sufficient

@traversaro
Copy link
Member

I looked into this as well, and I was a bit worried about some aspects:

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

Successfully merging this pull request may close these issues.

3 participants