Skip to main content

Overview

Online finger joint angles and skeleton solving both depend on a hand model URDF. By default that’s the built-in generic model, or the calibration output once you’ve calibrated. To swap in your own model temporarily, use hand_model_path. Two prerequisites trip people up. You must switch to a named SDK user first, because the call fails outright under the default user. And the setting lives only inside the current connection, so it’s gone after a reconnect. This page tests both to the end and quantifies what swapping models does to solver output. Matching example: examples/c/wuji_glove/2_set_hand_model_path.c. Python has no standalone example, but the --hand-model-path argument in the subscription examples uses the same API. For where hand models come from and how they’re stored, see Calibration and Configuration. This page covers only how to run it and what the measurements show.

Prerequisites

Hardware

This example sets an SDK-side parameter only. It writes no firmware, and the glove doesn’t move.

Software

Before You Start

Switch to a named SDK user. See SDK User Management. This is a hard requirement, not a suggestion.

Data Flow

Two Hard Constraints

One: The Default User Fails Outright

Calling this under the default user returns an error that states both the cause and the fix:
Under the default user, online solving always uses the built-in generic model, with no exceptions.

Two: The Setting Doesn’t Survive a Reconnect

The full sequence, all under one named user: So hand_model_path lives in session-scoped parameters and never reaches disk. Set it again on every connection, as a fixed step right after connecting.
When unset, get() raises rather than returning an empty string or None. Test for a custom hand model with try/except, not with a truthiness check.

Three Values for the URDF Source

The offline pipeline’s urdf_source property takes these values, and the online side follows the same rules:

How Much a Model Swap Changes

Taking the same 200 frames of real EMF pose data and solving twice, once on the built-in default model and once on a calibration output from a different glove, then comparing element by element: Peak difference broken out per finger: The thumb is the most sensitive. It has the most degrees of freedom, so geometry differences in the model show up there most clearly. These numbers say the hand model isn’t an optional setting. With the wrong model, solver output looks normal and confidence stays respectable, yet the result sits half a joint away from the real gesture. Matching models matters most when you replay data someone else captured.

Runtime Handling

Mismatched handedness is the sneakiest of these. The SDK doesn’t validate it and still produces results with normal confidence.

Two-Step Buffer Query on the C Side

wuji_glove_get_hand_model_path uses the familiar C two-step pattern, and the example wraps it cleanly enough to copy:
Step one succeeds with WUJI_STATUS_ERR_BUFFER_TOO_SMALL. Testing for == WUJI_STATUS_OK there sends you down the error path every time.

Integration Steps

Running It

The second argument is optional, and without it the example connects to the first glove it finds. On a shared network, pass the serial number explicitly. Output under a named user:
Measured on a right-hand Wuji Glove resting on a desk, unworn, under a named SDK user. The frame_id on hand_joint_angles is r_hand_emf_tx while hand_skeleton uses r_wrist, because the two streams reference different frames by design. The fifth angle stays 0 on every finger but the thumb as alignment padding, unrelated to the hand model.

Adapting It

Fold the Setting Into Your Connect Path

Because it doesn’t survive a reconnect, wrap connection and setting together:
Route reconnect logic through the same function, or a reconnect quietly reverts to the default model.

Check Handedness

Glance at the URDF’s root node before setting it:
A right-hand glove needs right_hand. The SDK doesn’t validate this and won’t complain when it’s wrong.

Calibrate for a Model That Fits Your Hand

A custom path answers “which existing model” rather than “how accurate is it.” For a model that matches your own hand, run hand model calibration. Its output lands in ~/.wuji/sdk/models/<serial number>_hand.urdf and loads automatically afterward, with no setting needed.

Use urdf_path for Offline Replay

The offline pipeline offers the same capability as a constructor argument, free of session scope:
A missing path raises immediately rather than falling back to the default model.