From 9f0663e9e3450174f3d8a51d3b5a14864da50836 Mon Sep 17 00:00:00 2001 From: Martino Russi Date: Wed, 29 Jul 2026 16:43:36 +0200 Subject: [PATCH] clean init and utils --- src/lerobot/robots/unitree_g1/controllers/__init__.py | 3 +-- src/lerobot/robots/unitree_g1/g1_utils.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lerobot/robots/unitree_g1/controllers/__init__.py b/src/lerobot/robots/unitree_g1/controllers/__init__.py index 22b02194d..c083929c4 100644 --- a/src/lerobot/robots/unitree_g1/controllers/__init__.py +++ b/src/lerobot/robots/unitree_g1/controllers/__init__.py @@ -18,11 +18,10 @@ from .gr00t_locomotion import GrootLocomotionController from .holosoma_locomotion import HolosomaLocomotionController -from .sonic_whole_body import SonicRuntime, SonicWholeBodyController +from .sonic_whole_body import SonicWholeBodyController __all__ = [ "GrootLocomotionController", "HolosomaLocomotionController", - "SonicRuntime", "SonicWholeBodyController", ] diff --git a/src/lerobot/robots/unitree_g1/g1_utils.py b/src/lerobot/robots/unitree_g1/g1_utils.py index ac8efb0b1..5901391ba 100644 --- a/src/lerobot/robots/unitree_g1/g1_utils.py +++ b/src/lerobot/robots/unitree_g1/g1_utils.py @@ -100,11 +100,10 @@ REMOTE_BUTTONS = tuple(f"remote.button.{i}" for i in range(16)) REMOTE_KEYS = REMOTE_AXES + REMOTE_BUTTONS # Reserved action-dict field used to forward the set of currently-pressed keyboard -# keys from a KeyboardTeleop through the standard action pipeline to the SONIC -# whole-body controller (see SonicWholeBodyController._process_keyboard). +# keys from a KeyboardTeleop through the standard action pipeline to a controller. KEYBOARD_KEYS_FIELD = "keyboard.keys" -# ── Dense whole-body joint reference (SONIC encode_mode 0, OpenHLM / pi0.5) ────── + def default_remote_input() -> dict[str, float]: """Return a zeroed-out remote input dict (axes + buttons).""" return dict.fromkeys(REMOTE_KEYS, 0.0)