example/config/ — pick the file that matches your hand model:
All tunable parameters sit under the
retarget block in the YAML. For any change, start tuning_tool.py first, then edit the YAML, save, and confirm the result visually. Tune the geometric correction segment_scaling first.
Start and use tuning_tool
tuning_tool.py is the main observation tool during tuning. It shows hand motion captured by the data glove alongside Wuji Hand motion and the mapping between them, so the output shows whether the target skeleton is reasonable and whether Wuji Hand follows the expected pose.
Launch:
When tuning Wuji Hand 2, the
--config you launch with and the yaml you edit must be the same wuji_hand_2 file, otherwise you are watching the default Wuji Hand behavior.- Start
tuning_tool.py. - Open the YAML that matches the launch command: the default Wuji Hand uses
adaptive_analytical_wuji_glove_<hand>.yaml, Wuji Hand 2 usesadaptive_analytical_wuji_glove_wuji_hand_2_<hand>.yaml. - Edit parameters under
retargetand save. - The tool hot-reloads the config. Watch the three-layer skeleton change.
- If the result improves, keep adjusting in small steps. If it gets worse, revert the last change.
Olive (dark green) appears where orange and cyan overlap. It shows up when a finger’s
segment_scaling = 1.0, meaning the glove input is mapped without scaling.Most common: segment_scaling
Geometric scaling. Adjusts target vector length per finger (wrist→PIP, wrist→DIP, wrist→TIP) to fix mismatches between a finger and the Wuji Hand skeleton. All geometric correction goes through segment_scaling.
Parameter location:
Tips:
- If a finger looks too short and can’t reach (cyan shorter than the white skeleton), raise its three values. If a finger overshoots or hyperextends (cyan longer than white), lower the three values.
- Save, watch whether cyan target snaps onto the white skeleton, then continue.
- The YAML also has a
scalingfield that is not geometric. It belongs to pinch tuning (see below) and normally stays at1.0.
Parameter groups
Parameters underretarget fall into five groups:
- Joint weights:
w_pos/w_dir/w_full_handcontrol the algorithm’s preference for fingertip position, fingertip direction, and full-finger pose respectively.w_pos/w_dirmainly affect fingertip accuracy during pinch, whilew_full_handmainly affects open-hand pose. - Huber thresholds:
huber_delta/huber_delta_dircontrol where position error and direction error transition from quadratic to linear penalty, governing the algorithm’s sensitivity to large deviations. - Soft limits / pose constraints:
thumb_skip_pip/w_hyper/soft_min/w_couple/couple_ratio.thumb_skip_piptrades some thumb-joint fidelity for more natural overall mapping.w_hyper/soft_minreduce hyperextension.w_couple/couple_ratiosoftly couple DIP flexion to PIP at a human-like ratio. - Smoothing:
lp_alpha/norm_deltasuppress output jitter. The former acts on the output layer, while the latter acts inside the optimization objective. - Mode / pinch tuning:
pinch_thresholds/scaling/mediapipe_rotationcover the pinch / open-hand mode switch threshold, the global scale of the fingertip target during pinch, and a fine rotation on the input coordinate system.
Parameter quick reference
Recommended tuning order
- Start
tuning_tool.pyand focus on how the cyan target lines up against the white Wuji Hand skeleton. - Tune
segment_scalingfirst: fix one finger at a time when it looks too long or too short. - If output jitters, tune
lp_alpha/norm_delta. Lowerlp_alphais steadier, highernorm_deltais more conservative. - If pinch triggers too easily or not at all, tune
pinch_thresholds.d1/d2. Largerd1/d2enters pinch sooner and prefers fingertip pinch. Smaller values enter pinch later and prefer the full-hand pose. w_pos/w_dir/w_full_hand/w_hyper/w_couple/couple_ratioare algorithm-preference weights. Avoid changing them first unless geometric scale and smoothing are already correct. Remember thatw_pos/w_dirmainly affect fingertip accuracy in pinch andw_full_handmainly affects open-hand pose.