mirror of
https://github.com/huggingface/lerobot.git
synced 2026-06-28 13:47:02 +00:00
f7afeb9cb2
Generalized full-body controller that deploys any mjlab BeyondMimic motion-tracking policy (ONNX, trained without state estimation) together with its reference clip. Gains/action-scale/default pose are read from the ONNX metadata and the trajectory from motion.npz, so a new motion only needs its (onnx, npz) pair -- selectable via constructor args or the MJLAB_ONNX_PATH / MJLAB_MOTION_PATH env vars. Key fix: the policy's anchor body is torso_link while base_ang_vel comes from the pelvis IMU. The sim publishes the pelvis as imu_state, so the torso orientation for motion_anchor_ori_b is reconstructed from the pelvis quaternion + the three waist joints. Without this the anchor used the pelvis orientation and any dynamic motion (e.g. spin kick) toppled. Registered as MjlabMotionImitationController in make_locomotion_controller and bundles the double-spin-kick policy + clip as the default. Co-authored-by: Cursor <cursoragent@cursor.com>