Device Parameters & Calibration

Reading Parameters

Read device properties through the semantic API:

sn = glove.sn().get()                # Serial number
version = glove.version().get()      # Firmware version
hand_side = glove.hand_side().get()  # Hand side ("left" or "right")
ip = glove.ip().get()                # IP address
port = glove.port().get()            # Data port

Writing Parameters

Some parameters support writing:

glove.ip().set("192.168.1.100")     # Change IP address
glove.port().set(50001)             # Change data port

Changing network parameters (IP address, port) may require reconnecting to the device.

Device Operations

Parameter persistence, reboot, and other device operations vary by product. For Wuji Glove, see Wuji Glove device operations.

SDK User Management

When several operators share the same device, calibration and local parameters from one operator overwrite another's. The SDK keeps a local user profile per operator at ~/.wuji/sdk/users/<user_id>/, isolating each user's parameter and calibration files.

Without a named user, parameter files and tactile calibration land in ~/.wuji/sdk/params/ and ~/.wuji/sdk/tactile/ directly, and pose calibration isn't available at all. Create a named user when you need to isolate by operator, or when you need pose calibration:

from wuji_sdk import SdkManager

manager = SdkManager.instance()

# Create a user
alice = manager.create_user("Alice", description="right-hand operator")

# Switch to a specific user
manager.switch_user(alice["user_id"])

# Inspect the current user
print(manager.current_user())

# List all users
for user in manager.list_users():
    marker = "*" if user["is_default"] else " "
    print(f"{marker} {user['display_name']} ({user['user_id']})")

# Switch back to the default user
manager.switch_to_default_user()

Switching reloads calibration parameters for connected devices immediately, no reconnect needed. Deleting the current user automatically switches back to the default user.

The C SDK offers the same user management calls — see C SDK Reference.

User Data Export and Import

Pack everything an SDK user owns into a single zip file to back it up or move it to another host. A bundle holds the user's hand calibration models, the tactile model for each device, and the latest complete tactile calibration run.

# Export: write everything the user owns into one zip file
report = manager.export_user_data(alice["user_id"], "alice.zip")
print(report["out_path"], report["device_sns"])

# Preview: validate a bundle and list its contents without writing anything
preview = manager.preview_user_data("alice.zip")
print(preview["owner_display_name"], preview["created_at"])
for component in preview["components"]:
    print(component["name"], component["state"], component.get("reason"))

# Import: restore the bundle to the user who created it
result = manager.import_user_data("alice.zip")
print(result["owner_user_id"], result["imported_at"])

All three methods return a report dict whose components list the state of each component:

FieldDescription
nameComponent name, such as hand_model.left, tactile.model, or tactile.run
statepresent if the bundle carries it and it was written, missing if the user has no such data, skipped if the bundle carries it but it wasn't written
reasonWhy a component is missing or skipped
device_snSerial number of the device a per-device component belongs to
pathWhere the component sits in the bundle or on disk

Import behavior:

  • The owner recorded in the bundle is created if it doesn't exist, and the current user stays the same
  • Every present component that isn't skipped is written and overwrites that user's existing file
  • Skipping wins over writing: a skipped component is never written and never overwrites an existing file, and its state in the report is skipped. Hand models are skipped this way when the owner is the default user (which doesn't load local hand calibration), while the other components are still written
  • Validation (path safety, size caps, sha256, data format, and owner id) finishes before anything is written. Any failure raises an exception and leaves no file behind

The export path must end in .zip, and the SDK creates the parent directory if it's missing. The C SDK offers the same three calls, returning a status code instead of a report dict — see C SDK Reference.

Tactile Data Paths

The tactile model is trained in Wuji Studio tactile contact calibration. Models and calibration data are scoped by SDK user and device serial number:

SDK userTactile directory
Default user~/.wuji/sdk/tactile/<sn>/
Named user~/.wuji/sdk/users/<user_id>/tactile/<sn>/

model/ holds the trained tactile model (contact.safetensors and contact.npz), and calibration-data/ holds the raw calibration runs, one subdirectory per run. A complete run has one data file per guided motion, 4 in total. Export takes the latest complete run only.

sn = "WG1JA00XXXXXXXXX"

print(manager.tactile_dir(alice["user_id"], sn))
print(manager.tactile_model_paths(alice["user_id"], sn))  # dir / safetensors / npz
print(manager.tactile_run_dir(alice["user_id"], sn))

Calibration

Calibration fits the SDK's algorithms to a specific physical device. The results are written to SDK-local parameter and model files and loaded automatically when the device subscribes to them.

Calibration files are scoped by the current SDK user first, then split into three resource types:

SDK userParameter file (per serial number)Tactile directory (per serial number)Pose hand model (per hand side)
Default user~/.wuji/sdk/params/<sn>.toml~/.wuji/sdk/tactile/<sn>/Not saved, not loaded — the built-in default model is used
Named user~/.wuji/sdk/users/<user_id>/params/<sn>.toml~/.wuji/sdk/users/<user_id>/tactile/<sn>/~/.wuji/sdk/users/<user_id>/models/

Parameter files and the tactile directory are still keyed by device serial number. The tactile directory holds the trained model under model/ and the latest calibration run under calibration-data/.

The pose hand URDF is stored per SDK user and hand side only (such as left_hand.urdf / right_hand.urdf), without the serial number or hand-profile dimension, so any device of the same side under the same user shares one model. The default user has no pose hand model at all: calibration and import never write one, and real-time IK always falls back to the built-in default. For Wuji Glove specifics, see Wuji Glove Calibration.

Switching the SDK user reloads the matching files for connected devices automatically, no reconnect required.

Calibration is limited under the default user. When multiple operators share a device, switch to a named user first:

  • Running calibrate as the default user fails immediately with ExecuteError(operation="calibrate", code=0x4108). Call SdkManager.create_user(...) and switch_user(...) to move to a named user before calibrating, so the generated URDFs are scoped to that user.
  • Setting a custom hand URDF as the default user fails immediately: the semantic API glove.hand_model_path().set(path) and the generic write paths (device.set, manager.set) all reject writes to calibration.hand_model_path with UnsupportedOperation and leave the parameter store untouched. Switch to a named user first. The semantic API also validates the path and rejects an unreadable file with InvalidConfig without saving it.
  • Under the default user, IK-derived streams (hand_skeleton, hand_joint_angles, tip_poses) always use the SDK's built-in default URDF and ignore any stored calibration.hand_model_path. This prevents accidentally reusing another operator's calibration when the SDK user wasn't explicitly switched.
  • When to calibrate: first time you use a device, a different wearer puts on a wearable device, higher-level model or algorithm generation changes, or calibration accuracy has visibly degraded. The exact triggers depend on the product
  • Failure behavior: when calibration fails, the SDK preserves the last successful calibration and rolls back the new files automatically, so you can retry directly. Typical failure modes: timeout, solver fails to converge, file persistence fails, or the SDK user switches mid-calibration. Exact exception types vary by product
  • Backup and migration: use user data export and import to pack a whole user's calibration results — on import the SDK rebuilds the paths under the target host's user directory. Copying the directory works too, but the parameter file can store absolute paths pointing to other files under ~/.wuji/sdk/ (such as model files). When migrating to a host with a different home directory, update those paths or run calibration again

For Wuji Glove, see Wuji Glove Calibration for the calibration procedure and APIs.

Available Parameters

For Wuji Glove, see Wuji Glove available parameters.

Listing All Resources

List all available resources, parameters, and topics on a device:

# All resources
for res in glove.resources():
    print(res.path)

# Read/write parameters
for param in glove.params():
    print(param.path)

# Subscribable topics
for topic in glove.topics():
    print(topic.path)