Calibration Math#
This page summarizes the rotation conventions used by the RoSHI calibration pipeline and the equations used to solve both sensor-to-bone calibration offsets and per-IMU world alignment.
Coordinate Frames#
Frame |
Description |
|---|---|
\(C\) |
Camera frame using the OpenCV convention, with \(x\) right, \(y\) down, and \(z\) forward |
\(B\) |
Bone frame from the SMPL-X joint |
\(T\) |
AprilTag frame rigidly attached to the IMU |
\(S\) |
IMU sensor frame from the fused quaternion output |
\(W_i\) |
Per-IMU world frame, gravity aligned with arbitrary heading |
\(W_p\) |
Shared world frame using the pelvis IMU as reference |
Offset Calibration#
The AprilTag is rigidly attached to the body segment. At time \(t\):
Rearranging gives a frame-wise estimate of the constant offset:
RoSHI then computes the final calibration by minimizing the geodesic distance over all valid frames:
where the geodesic distance is:
Supported Optimization Methods#
Method |
Loss |
Typical use |
|---|---|---|
|
Geodesic L2 |
Clean data with approximately Gaussian noise |
|
L2 near zero, L1 for outliers |
Moderate outliers |
|
Cauchy / Lorentzian |
Heavy outliers |
|
Geodesic L1 |
Median-like robustness |
|
RANSAC plus Karcher refinement |
Severely corrupted samples |
Note
In our tests, there is no significant difference between the performance of these solvers. karcher tended to work slightly better overall.
ransac can potentially be stronger but typically benefited from more tuning.
IMU-Only Pose Reconstruction#
Given the calibrated offset \({}^{B}R_{S}\) and a live IMU reading \({}^{W_i}R_{S}(t)\), the corresponding bone orientation is:
World-frame alignment uses AprilTag observations to estimate \({}^{W_p}R_{W_i}\) so the individual IMU headings can be expressed in a shared pelvis-centric frame.
For each joint IMU, RoSHI first estimates the camera-to-IMU-world rotation:
These per-frame estimates are averaged over time, and the pelvis world is used as the shared reference:
The aligned bone orientation in the pelvis world then becomes:
Tag-to-IMU Axis Mapping#
The rigid transform from the AprilTag frame to the IMU frame is:
Note
We get this mapping from the BNO085 IMU frame and AprilTag frame conventions.
The BNO085 IMU frame is given in the BNO08X datasheet on page 41.
The AprilTag frame is centered on the tag with \(x\) right, \(y\) down, and \(z\) into the tag. See the AprilTag 3 documentation.