Skip to content

add StoppableWorkers to webcam.go #5059

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AGanguly13
Copy link
Member

@AGanguly13 AGanguly13 commented Jun 16, 2025

main changes are in the Monitor() function, webcam seems to work as expected after these changes.

@AGanguly13 AGanguly13 requested a review from penguinland June 16, 2025 21:24
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jun 16, 2025
Copy link
Member

@penguinland penguinland left a comment

Choose a reason for hiding this comment

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

This is looking pretty good! I'm gonna add @nicksanford as another reviewer; he should have final approval.

Nick, this is a preliminary PR on the way to improving the latency when asking for frames from the webcam component. The plan after this is to add a buffer of recent images, and a second goroutine in the StoppableWorkers to put new images into the buffer.

For this PR, take inspiration from https://github.com/viamrobotics/rdk/pull/3941/files?diff=unified&w=1 or https://github.com/viamrobotics/rdk/pull/3939/files

@penguinland penguinland requested a review from nicksanford June 16, 2025 21:48
@penguinland penguinland changed the title implement stoppable workers for webcam.go add StoppableWorkers to webcam.go Jun 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 17, 2025
@AGanguly13 AGanguly13 requested a review from penguinland June 17, 2025 14:19
Copy link
Member

@penguinland penguinland left a comment

Choose a reason for hiding this comment

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

LGTM, but I still defer to @nicksanford for final approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants