From 4f53c42583b2a02d233b214f839292363724048d Mon Sep 17 00:00:00 2001 From: Martino Russi Date: Fri, 10 Jul 2026 16:03:28 +0200 Subject: [PATCH] Apply ruff-format Co-authored-by: Cursor --- src/lerobot/robots/unitree_g1/controllers/sonic_pipeline.py | 1 + src/lerobot/teleoperators/pico_headset/pico_headset.py | 4 +--- src/lerobot/teleoperators/pico_headset/pico_publisher.py | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lerobot/robots/unitree_g1/controllers/sonic_pipeline.py b/src/lerobot/robots/unitree_g1/controllers/sonic_pipeline.py index 18e1fdac1..72de873fd 100644 --- a/src/lerobot/robots/unitree_g1/controllers/sonic_pipeline.py +++ b/src/lerobot/robots/unitree_g1/controllers/sonic_pipeline.py @@ -1108,6 +1108,7 @@ class PlannerController(StandingEncoderDecoder): # ── Keyboard ────────────────────────────────────────────────────────────────── + class RawKeyboard: def __init__(self): self.fd = sys.stdin.fileno() diff --git a/src/lerobot/teleoperators/pico_headset/pico_headset.py b/src/lerobot/teleoperators/pico_headset/pico_headset.py index 4804daafc..d2f7006e5 100644 --- a/src/lerobot/teleoperators/pico_headset/pico_headset.py +++ b/src/lerobot/teleoperators/pico_headset/pico_headset.py @@ -103,9 +103,7 @@ class PicoHeadset(Teleoperator): if not self._stream.has_data or self._stream.is_stale: return {} action = {f"{SMPL_ACTION_PREFIX}{i}": float(v) for i, v in enumerate(window)} - action.update( - {f"{ROOT_ACTION_PREFIX}{i}": float(v) for i, v in enumerate(self._stream.root_quat)} - ) + action.update({f"{ROOT_ACTION_PREFIX}{i}": float(v) for i, v in enumerate(self._stream.root_quat)}) return action def send_feedback(self, feedback: dict[str, Any]) -> None: diff --git a/src/lerobot/teleoperators/pico_headset/pico_publisher.py b/src/lerobot/teleoperators/pico_headset/pico_publisher.py index 88a6aaf25..772870960 100644 --- a/src/lerobot/teleoperators/pico_headset/pico_publisher.py +++ b/src/lerobot/teleoperators/pico_headset/pico_publisher.py @@ -117,9 +117,7 @@ def main() -> None: p.add_argument("--skeleton", type=str, default=None, help="Path to smpl_skeleton.npz") src = p.add_mutually_exclusive_group() src.add_argument("--fake", action="store_true", help="Publish synthetic motion (no headset)") - src.add_argument( - "--motion-file", type=str, default=None, help="Replay an SMPL .npz clip over rt/smpl" - ) + src.add_argument("--motion-file", type=str, default=None, help="Replay an SMPL .npz clip over rt/smpl") p.add_argument("--no-loop", action="store_true", help="Play a --motion-file once, then stop") args = p.parse_args()