Guidance Parameters#
For calibration math, see Calibration Math.
Overview#
After the diffusion model predicts a pose sequence, a Levenberg-Marquardt
optimizer refines it to be physically plausible and consistent with sensor
readings. The optimizer runs twice: once between denoising steps (inner,
5 iterations) and once after sampling is complete (post, 20 iterations).
IMU Constraints (RoSHI Modes)#
These are added in roshi and roshi_ariahand modes:
Constraint |
Weight |
What it does |
|---|---|---|
Local joint matching |
5.0 |
Each IMU-equipped joint rotation should match its IMU reading |
Pelvis rotation matching |
5.0 |
Frame-to-frame pelvis rotation change should match the pelvis IMU |
Body prior |
0.1 |
Extra prior to keep IMU-guided poses near the diffusion output |
Body smoothness |
10.0 |
Extra temporal smoothing for body joints |
Local joint matching minimizes the geodesic distance between predicted and IMU-derived parent-relative rotations:
Pelvis rotation matching:
Body smoothness penalizes large frame-to-frame rotation changes:
Lower-Body Joint Angle Limits#
The diffusion prior occasionally produces biomechanically impossible knee or ankle poses (hyperextended knees, severely twisted ankles). Two complementary mechanisms keep the lower body realistic:
A soft penalty inside the LM optimizer (used in every guidance mode), so small violations push the solution away from invalid regions while still respecting the IMU and prior terms.
A hard clamp applied once at inference time after the final pose has been recovered (see Step 4 in How to Postprocess the Data), which guarantees the saved
body_quatsnever exceed the limits.
Joints and limits#
Limits are applied per axis on the log (axis-angle) of each joint’s
parent-relative rotation. Indices follow the SMPL-H 21-joint body convention
(root excluded):
Joint |
Index |
X (flex/ext) |
Y (abd/add) |
Z (int/ext rot) |
|---|---|---|---|---|
Left / Right knee |
3, 4 |
no hyperextension (X ≥ 0) |
±5° |
±10° |
Left / Right ankle |
6, 7 |
— |
±25° (inv/eversion) |
±20° |
Soft penalty (optimizer)#
For each constrained joint \(j\) and axis \(a\) with limit \(\theta^{\max}_{j,a}\), the optimizer adds a one-sided hinge residual on the log-map components \(\boldsymbol{\omega}_{j} = \log \hat{R}_{j}\):
with \(w_{\text{limit}} = 50.0\). The knee X term penalises only negative values (hyperextension); the abduction/rotation axes are penalised symmetrically once the limit is exceeded, so motions that stay within the box incur zero cost.