Skip to content

feat(cameras): support rotation across previews, recording, and inference - #123

Merged
nicolas-rabault merged 1 commit into
huggingface:mainfrom
Hadrien-Cornier:feat/camera-rotation
Oct 9, 2026
Merged

nicolas-rabault merged 1 commit into
huggingface:mainfrom
Hadrien-Cornier:feat/camera-rotation

Conversation

@Hadrien-Cornier

Copy link
Copy Markdown
Contributor

I mounted my SO-101 wrist camera upside down. LeRobot supports image rotation, but LeLab does not expose or forward it. This adds a saved rotation control for each camera: 0°, 90°, 180°, or 270° clockwise.

The rotation applies to setup, teleoperation, and inference previews, saved recording frames, and inference camera input. Old profiles default to 0°. Invalid values produce a visible error and block recording or inference until corrected.

Capture dimensions remain native. A 640 × 480 capture at 90° produces a 480 × 640 observation. The adapters account for LeRobot v0.6.0 output dimensions and its signed rotation enum. Inference rotation follows the selected physical camera. Backend recording frames receive no second display rotation.

Users must select the same rotation as the training dataset. Checkpoint dimensions cannot establish image orientation. Existing recordings and checkpoints remain unchanged. Camera identity work in #119 stays separate.

Validation:

  • 293 Python tests and 34 frontend tests pass.
  • All pre-commit hooks pass. Node.js 22 build passes, with the exact rebuilt bundle committed.
  • Supplied devices pass through the actual recording route, camera driver, recording loop, dataset writer, and saved-video decode for all four rotations. Each session saves five frames from two cameras. Rollout camera arguments produce matching camera input.
  • The built UI passes browser checks for all four rotations, full-frame display, persistence, and reload.
  • Independent review found two preview/profile issues. Both are corrected; re-review found no remaining blockers.

Full TypeScript reports five errors identical to unchanged main. Changed-source ESLint has no errors and two existing hook warnings. Physical camera behavior and a loaded policy remain unverified.

Reproduction scripts, logs, and screenshots.

@nicolas-rabault
nicolas-rabault force-pushed the feat/camera-rotation branch 2 times, most recently from d23b09b to 7c47b78 Compare October 8, 2026 11:34

@nicolas-rabault nicolas-rabault left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well done @Hadrien-Cornier .

@nicolas-rabault
nicolas-rabault merged commit 5c35869 into huggingface:main Oct 9, 2026
2 checks passed
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.

2 participants