← Back to all demos

SONIC Motion Tracking

Humanoid MoCap API GPU Required

Overview

NVIDIA GEAR-SONIC locomotion controller with two operational modes:

Architecture: Encoder + Decoder Pipeline

MoCap Clip
CSV joint angles
Encoder
model_encoder.onnx
Latent Space
z ∈ Rd
Decoder
model_decoder.onnx
Joint Targets
29-DOF output

ONNX Models

ModelFilePurpose
Plannerplanner_sonic.onnxVelocity → full-body trajectory
Encodermodel_encoder.onnxMoCap clip → latent code
Decodermodel_decoder.onnxLatent code → joint targets

Models are downloaded from nvidia/GEAR-SONIC on HuggingFace on first use.

Usage: Planner Mode

from roboharness.robots.unitree_g1 import (
    SonicLocomotionController, SonicMode
)

ctrl = SonicLocomotionController()
action = ctrl.compute(
    command={"velocity": [0.3, 0.0, 0.0], "mode": SonicMode.WALK},
    state={"qpos": qpos, "qvel": qvel},
)

Usage: Tracking Mode

from roboharness.robots.unitree_g1 import (
    SonicLocomotionController, MotionClip
)

ctrl = SonicLocomotionController()
clip = MotionClip.from_csv_dir("path/to/dance_clip/")
ctrl.set_tracking_clip(clip)

action = ctrl.compute(
    command={"tracking": True},
    state={"qpos": qpos, "qvel": qvel},
)
Note: This demo requires an NVIDIA GPU with CUDA/TensorRT and cannot run in CI. The page documents the API and architecture. See #86 (Phase 1) and #92 (Phase 2).
Generated by Roboharness