Rig policies

Control policies for a physically simulated SOMA humanoid (NVIDIA's anatomic_soma MuJoCo model fitted to Kimodo's skeleton), as RigPolicy runs them: in Nodal's Physics node (Mode Policy) and in RigPolicy's own bakes and environments. A folder a policy, each one .policy.safetensors file.

folder task what it does measured
soma-tracker-nvidia tracking, any motion: sets every motor's target NVIDIA ProtoMotions' SOMA FSQ tracker, converted from their checkpoint, with its critic 12 of 12 BONES-SEED clips to their end at 2.8–6.5 cm (their own simulator 2.8–6.6)
walk-one-clip tracking: a residual on RigPhysics' controller one forward walk followed for a minute 16 of 16 minutes of that walk; other walks aren't followed
balance-v0 balance: a residual, its own standing pose stands through small shoves 29/32 up after a 10 N·s chest shove (18 without it), none at 40
walk-v0 tracking: a residual walks, turns, starts, stops of BONES-SEED, weakly 3.4 s up on unseen clips (1.6 s without it), 31 of 264 to their end

The last three were trained here by RigPolicy's PPO (Swift, MLX); each folder holds its training.json (the PPO and task settings, the run's progress) and curve.tsv (the run, an update a row). The tracker's folder holds its conversion.json and parity/ (its numbers here beside its own Python run, and the fixtures the parity tests read).

The file

A safetensors file. Its tensors are the network's weights (float32, and float64 for normalizer statistics); the header's __metadata__ holds JSON text:

  • format: rigpolicy 2.
  • recipe: how it runs, from the file alone: the body (model, world frame, observed bodies, hinges in order), the motor table, decisions a second and physics steps each, what it follows, the observation as named terms in order, the network as a list of layers (linear, relu, tanh, normalize, fsq, concat) naming its tensors, and what the action means (a residual on the controller's targets, or the targets themselves).
  • manifest: the task, the body by model hash, and the observation's and action's layouts by name.
  • about: name, what it learned from, what it measured.
  • skeleton: the skeleton the body was fitted to (empty for the tracker's model as it is).
  • checkpoint and balance: the PPO run and the balance task, for the policies trained here.
  • training: for the tracker, its critic and statistics (see its card).
import json, struct
from safetensors import safe_open

path = "walk-v0/walk-v0.policy.safetensors"
with open(path, "rb") as f:  # the header alone
    meta = json.loads(f.read(struct.unpack("<Q", f.read(8))[0]))["__metadata__"]
recipe = json.loads(meta["recipe"])
with safe_open(path, "np") as f:  # the weights
    weights = {name: f.get_tensor(name) for name in f.keys()}

Running one

In Nodal: a Policy node (motion.policy) with the file as its path, its policy wired into a Physics node's policy, Physics' Mode Policy, and a motion on Kimodo's skeleton (Motion's, or a BONES-SEED BVH). Physics takes the motors, step and mass the file was trained with and says so.

In Swift (packages/RigPolicy, macOS, MuJoCo through RigPhysics):

let header = try PolicyFile.header(at: url)
let settings = PolicyRuntime.trainedSettings(recipe: header.recipe, manifest: header.manifest, balance: header.balance)!
let ragdoll = try Ragdoll(skeleton: clip.skeleton)  // clip: a MotionClip on Kimodo's skeleton
let runtime = try PolicyRuntime.load(url, clip: clip, ragdoll: ragdoll, settings: settings)
let bake = try Simulation.bake(clip, ragdoll: ragdoll, timeline: PhysicsTimeline(drives: [.init(time: 0, mode: .policy)]),
                               settings: settings, controller: runtime.controller())

PolicyRuntime refuses in words a file that doesn't fit the bake (motors, step, mass, body).

Downloads last month

-

Downloads are not tracked for this model. How to track
Video Preview
loading