clean init and utils

This commit is contained in:
Martino Russi
2026-07-29 16:43:36 +02:00
parent 503f3e57ae
commit 9f0663e9e3
2 changed files with 3 additions and 5 deletions
@@ -18,11 +18,10 @@
from .gr00t_locomotion import GrootLocomotionController from .gr00t_locomotion import GrootLocomotionController
from .holosoma_locomotion import HolosomaLocomotionController from .holosoma_locomotion import HolosomaLocomotionController
from .sonic_whole_body import SonicRuntime, SonicWholeBodyController from .sonic_whole_body import SonicWholeBodyController
__all__ = [ __all__ = [
"GrootLocomotionController", "GrootLocomotionController",
"HolosomaLocomotionController", "HolosomaLocomotionController",
"SonicRuntime",
"SonicWholeBodyController", "SonicWholeBodyController",
] ]
+2 -3
View File
@@ -100,11 +100,10 @@ REMOTE_BUTTONS = tuple(f"remote.button.{i}" for i in range(16))
REMOTE_KEYS = REMOTE_AXES + REMOTE_BUTTONS REMOTE_KEYS = REMOTE_AXES + REMOTE_BUTTONS
# Reserved action-dict field used to forward the set of currently-pressed keyboard # 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 # keys from a KeyboardTeleop through the standard action pipeline to a controller.
# whole-body controller (see SonicWholeBodyController._process_keyboard).
KEYBOARD_KEYS_FIELD = "keyboard.keys" KEYBOARD_KEYS_FIELD = "keyboard.keys"
# ── Dense whole-body joint reference (SONIC encode_mode 0, OpenHLM / pi0.5) ──────
def default_remote_input() -> dict[str, float]: def default_remote_input() -> dict[str, float]:
"""Return a zeroed-out remote input dict (axes + buttons).""" """Return a zeroed-out remote input dict (axes + buttons)."""
return dict.fromkeys(REMOTE_KEYS, 0.0) return dict.fromkeys(REMOTE_KEYS, 0.0)