Control the H1_2 parallel ankle mechanism using PR mode
mainThe Unitree H1_2 robot uses a parallel mechanism for its left and right ankles. While the hardware consists of four physical joints (A and B parallel joints, and P and R serial joints), the P (Pitch) and R (Roll) joints cannot be driven directly by motors.
To simplify control, the SDK provides a PR mode that allows you to command the serial P and R joints directly. The robot's internal controller automatically converts these commands into the necessary movements for the A and B physical joints using kinematic and dynamic relationships.
When using PR mode, each serial joint accepts the following control parameters:
| Parameter | Variable | Description |
|---|---|---|
| Feedforward Torque | tau | Direct torque command |
| Target Angle | q | Desired joint position |
| Target Angular Velocity | dq | Desired joint velocity |
| Joint Stiffness | kp | Proportional gain |
| Joint Damping | kd | Derivative gain |
The total executed torque for the serial joint is calculated as: T = kp * (q - q_m) + kd * (dq - dq_m) + tau, where q_m and dq_m are the measured position and velocity.