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

263 check if specified pixel format is supported #300

Merged
merged 3 commits into from Dec 5, 2023

Conversation

flynneva
Copy link
Collaborator

@flynneva flynneva commented Nov 29, 2023

Throws a verbose error for now instead of silently falling back to some random format. In the future we might be able to add some logic to auto-determine the "best" available pixel format and fall back to that

This also lets us clean up the set_pixel_format logic to be much more maintainable and easier to understand.

@flynneva
Copy link
Collaborator Author

Now if someone tries to specify a pixel format that this driver doesnt support, it'll error out and tell you:

image

Then if the specified pixel format is supported by the driver, but not supported by the selected device it'll error:

image

@flynneva flynneva force-pushed the 263-check-if-specified-pixel-format-is-supported branch 2 times, most recently from 12332df to d537c1d Compare November 30, 2023 04:05
- Use common arguments struct in all format classes

Signed-off-by: Evan Flynn <evanflynn.msu@gmail.com>
Signed-off-by: Evan Flynn <evanflynn.msu@gmail.com>
@flynneva flynneva force-pushed the 263-check-if-specified-pixel-format-is-supported branch from d537c1d to 8aadf43 Compare December 1, 2023 02:52
- Also fix typo in params_2 yaml file
- fix linter errors too

Signed-off-by: Evan Flynn <evanflynn.msu@gmail.com>
@flynneva flynneva force-pushed the 263-check-if-specified-pixel-format-is-supported branch from 8aadf43 to d9d12d4 Compare December 1, 2023 02:55
@flynneva flynneva merged commit cd69723 into ros2 Dec 5, 2023
5 checks passed
@flynneva flynneva deleted the 263-check-if-specified-pixel-format-is-supported branch December 5, 2023 03:07
@zymouse
Copy link

zymouse commented Jan 8, 2024

@flynneva
v4l2-ctl --device=/dev/video0 --all
image
Because of a camera firmware error, the pixel format is actually uyvy.

When I use the correct pixel format uyvy, the usb_cam node exits incorrectly
image

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