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, usehand_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 API and field definitions, see Custom URDF Override.
Prerequisites
Hardware
This example sets an SDK-side parameter only. It writes no firmware, and the glove doesn’t move.
Software
- Python
- C
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: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.
Three Values for the URDF Source
The offline pipeline’surdf_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.
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:
WUJI_STATUS_ERR_BUFFER_TOO_SMALL. Testing for == WUJI_STATUS_OK there sends you down the error path every time.
Integration Steps
Complete examples: Python callback example and C hand-model example. The following excerpts show the integration order. Reuse imports, manager setup, C initialization, connection error handling, and callbacks from Python example and C example. Check the status of each C call. On failure, release existing resources and exit as shown in the examples.1. Confirm the User and Check the URDF
A custom hand model requires a named SDK user. Before connecting, expand the path to an absolute path and confirm that the file is readable.- Python
- C
2. Connect and Set the Hand Model
Set the path after each connection. After setting it, read it back to confirm the active path.- Python
- C
3. Subscribe to Results From the New Model
Subscribe to joint angles after setting the model. Close the subscription and release the device in order on exit.- Python
- C
Running It
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.
Notes
Mismatched handedness is the sneakiest of these. The SDK doesn’t validate it and still produces results with normal confidence.
Adapting It
Fold the Setting Into Your Connect Path
Because it doesn’t survive a reconnect, wrap connection and setting together:Check Handedness
Glance at the URDF’s root node before setting it: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:Related
- SDK User Management: switch to a named user, the hard requirement for this page
- Hand Model Calibration: generate a URDF that matches your hand
- Replaying Data Offline: name a model when replaying, and the source of the comparison data above
- Subscribing With Callbacks: frame structures for
hand_joint_anglesandhand_skeleton