Principle:Haosulab ManiSkill PD Control Pattern
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Control_Theory, Simulation |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Proportional-derivative (PD) controllers set joint drive targets that the physics engine converts to torques via torque = Kp * (target - current) - Kd * velocity, providing the fundamental control law for all joint-level robot actuation in simulation.
Description
The PD Control Pattern principle defines how ManiSkill implements joint-level robot control through the PhysX/SAPIEN drive system. Rather than directly commanding torques, controllers set position or velocity drive targets on joints. The physics engine then applies the PD control law at each simulation substep to compute and apply torques. This approach provides stable, physically plausible robot behavior without requiring the policy to reason about torque dynamics.
ManiSkill provides three PD controller variants: (1) PDJointPosController sets position drive targets with configurable stiffness (Kp) and damping (Kd), supporting absolute and delta modes plus mimic joints for coupled fingers; (2) PDJointVelController sets velocity drive targets with zero stiffness and configurable damping, used for continuous motion tasks; (3) PDJointPosVelController simultaneously sets both position and velocity targets, giving the policy explicit control over both desired configuration and approach speed.
All three variants support action normalization, configurable drive modes (force vs acceleration), per-joint force limits, and optional linear interpolation for smooth motion across simulation substeps.
Usage
This principle applies whenever:
- A robot must be actuated through joint-level position or velocity targets.
- Configurable stiffness and damping gains are needed per joint for stable but responsive control.
- Mimic joint coupling is required (e.g., parallel-jaw grippers where one motor drives both fingers).
- Linear interpolation between actions is needed to smooth motion across physics substeps.
Theoretical Basis
PD Control Law: torque = Kp * (q_target - q_current) - Kd * q_dot_current
Position Control (PDJointPos): Sets q_target. In delta mode, q_target = q_current + action. Kp provides restoring force toward target; Kd provides velocity damping.
Velocity Control (PDJointVel): Sets velocity target with Kp = 0. Only damping acts on the joint, driving it toward the target velocity.
Combined Control (PDJointPosVel): Sets both position and velocity targets. Action space is 2 * num_joints dimensional: first half for positions, second half for velocities.
Mimic Joints: Mechanically coupled joints where q_mimic = q_control * multiplier + offset. A single action dimension controls multiple physical joints.
Linear Interpolation: When interpolate=True, the controller linearly interpolates between the current and target positions across simulation substeps, producing smoother trajectories.
Related Pages
- Implementation:Haosulab_ManiSkill_PDJointPosController -- PD joint position controller with mimic joint support.
- Implementation:Haosulab_ManiSkill_PDJointVelController -- PD joint velocity controller.
- Implementation:Haosulab_ManiSkill_PDJointPosVelController -- Combined PD joint position and velocity controller.