Skip to content

Conversation

@xuaner233
Copy link
Contributor

Set camera width/height 1st before FPS setting, to avoid FPS set failure alike:

ERROR:__main__:Failed to connect or configure OpenCV camera /dev/video2: OpenCVCamera(/dev/video2) failed to set fps=30 (actual_fps=25.0).

What this does

Title Label
Fixes #2274 (🐛 Bug)

How it was tested

Simple change to fix, can validate with:

python src/lerobot/scripts/lerobot_find_cameras.py opencv

Set camera width/height 1st before FPS setting, to avoid FPS set failure alike:

ERROR:__main__:Failed to connect or configure OpenCV camera /dev/video2: OpenCVCamera(/dev/video2) failed to set fps=30 (actual_fps=25.0).
@imstevenpmwork imstevenpmwork self-assigned this Oct 21, 2025
@imstevenpmwork imstevenpmwork self-requested a review October 21, 2025 09:03
@imstevenpmwork imstevenpmwork added bug Something isn’t working correctly sensors Everything related to sensors labels Oct 21, 2025
Copy link
Collaborator

@imstevenpmwork imstevenpmwork left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@imstevenpmwork imstevenpmwork merged commit 92b479f into huggingface:main Oct 21, 2025
7 checks passed
@xuaner233 xuaner233 deleted the xuaner233/fix-camera-fps-set branch October 21, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn’t working correctly sensors Everything related to sensors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change FPS failure with OpencvCamera

2 participants