When to use it
Real-time inverse kinematics solving is CPU-intensive. If you only want to record data during capture and analyze it later, running the solver the whole time is wasteful. The offline pipeline fits when you want to:- Subscribe only to lightweight
emf_posesand raw IMU during capture, lowering CPU usage - Decide later which post-processed products you need
- Save raw data in any format of your choice, without binding to a specific file format
Workflow
- Capture online: subscribe only to
emf_posesand raw IMU data - Save: store the raw data frames in any format
- Recompute offline: use
WujiGlove.offline_pipeline()to recompute post-processed products from the saved frames
Offline recomputation produces the same result as real-time computation: the same input plus the same calibration yields the same output.
Create an offline pipeline
WujiGlove.offline_pipeline() creates a pipeline that does not require a connection to a physical device.
After creation, query the calibration source actually in use:
URDF Lookup Order
Hand products depend on a calibrated hand model. The pipeline picks the URDF like this:- Explicit
urdf_path: when passed, that file is used directly and takes priority over every other source. An unreadable file raises an error instead of falling back - Managed model: without
urdf_path, the pipeline checks whethercalibration.hand_model_pathpoints to a file outside the SDK-managed directory. If it does, that custom file is used. If it doesn’t, the stable per-side fileleft_hand.urdf/right_hand.urdffor the current SDK user is used. The two are alternatives, not fallbacks for each other - Built-in default model: when the file picked above is missing or unusable, the pipeline falls back to the built-in default URDF and prints a warning
Recompute hand products
The hand chain takesemf_poses frames as input and recomputes three products. The three share a single solve, so the results match the online ones.
For the full field definitions of these products, see SDK Resources.
Recompute IMU fusion
The IMU chain takes raw IMU frames as input and recomputes fused orientation. Useimu_data_palm() for the glove’s dorsum IMU.
ImuData.raw(). It automatically marks orientation_covariance[0] as -1 (not fused). IMU fusion products do not depend on a calibration URDF.
Construct input frames
Use the schema constructors to build input frames in memory:examples/3.offline_pipeline.py in the SDK package.
For the full workflow and a measured comparison between offline replay and online solving, see SDK Usage Practices: Replaying Data Offline.