Skip to main content

Basic Usage

Input Format

Input data is MediaPipe format hand keypoints with shape (21, 3), containing 3D coordinates for 21 keypoints (unit: meters). Regardless of whether the source is Wuji Glove, Vision Pro, replay data, MP4 video, or Intel RealSense, the input pipeline ultimately normalizes the data into this format.
Unit Conversion: Input keypoints use meters (MediaPipe standard), but are automatically converted to centimeters internally (M_TO_CM = 100.0). Therefore, all distance-related parameters in configuration files (e.g., huber_delta, pinch_thresholds.d1/d2) should be specified in centimeters.
Keypoint index mapping:

Output Format

Output is a length-20 joint angle array (radians), corresponding to Wuji Hand’s 20 joints:

Configuration File

The example above reflects the default Vision Pro configuration style. For MediaPipe vision sources such as video and RealSense, use the dedicated adaptive_analytical_video.yaml configuration.

Configuration by Input Mode

Driving a Custom Dexterous Hand

Three keys under the optimizer block point the same retargeting algorithm at different hand models without code changes: link_naming supports a prefix (for example l_ for the Wuji Hand 2 left hand) and the {finger} placeholder. Wuji Hand 2 uses anatomical names (r_wrist, r_index_finger_pip, …), configured as:
When the URDF and MJCF declare joints in different orders (for example Wuji Hand 2 puts index first in the URDF), output qpos is automatically reordered by joint name to the MJCF or device order, so finger angles do not land on the wrong joint. If optimizer.mjcf_path is set but joint names cannot be aligned, the sim and real-hardware entry points fail loudly at startup instead of silently driving the wrong joints. For video and realsense modes, the example scripts automatically switch to config/adaptive_analytical_video.yaml. This configuration typically:
  • uses stronger smoothing and regularization to reduce jitter from vision input
  • adjusts segment_scaling to compensate for finger-length distortion in monocular landmarks
  • widens pinch_thresholds for better stability in noisy conditions
  • adds mediapipe_rotation to compensate for systematic orientation offsets

video_input Parameters

adaptive_analytical_video.yaml also includes a video_input section for preprocessing video and RealSense input:

Parameter Descriptions

Default configuration is tuned for Apple Vision Pro. For MP4 video and Intel RealSense, start with adaptive_analytical_video.yaml, then adjust scaling, segment_scaling, and video_input parameters based on hand size and image conditions.

Hand Size Adaptation

If retargeting results are poor, adjust the following parameters: Global Scaling: Adjust scaling parameter to match palm size
Finger Length: Adjust each finger segment’s length ratio via segment_scaling