Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Haosulab ManiSkill PDJointVelController

From Leeroopedia
Knowledge Sources
Domains Robotics, Simulation
Last Updated 2026-02-15 08:00 GMT

Overview

Concrete PD joint velocity controller that sets velocity drive targets for robot joints in ManiSkill.

Description

PDJointVelController extends BaseController to implement joint-level velocity control. It configures joints with zero stiffness and specified damping (pure velocity drive), then sets velocity targets directly via set_joint_drive_velocity_targets() on each set_action() call. The action space bounds are defined by lower/upper config values. The controller sets sets_target_qpos = False and sets_target_qvel = True. Supports configurable drive mode (force or acceleration) and optional action normalization.

Usage

Use PDJointVelControllerConfig for velocity-level joint control where commanding target velocities is more appropriate than target positions, such as continuous locomotion or mobile base control. This controller is the foundation for the ego-centric PDBaseVelController.

Code Reference

Source Location

Signature

class PDJointVelController(BaseController):
    config: "PDJointVelControllerConfig"
    sets_target_qpos = False
    sets_target_qvel = True

@dataclass
class PDJointVelControllerConfig(ControllerConfig):
    lower: Union[float, Sequence[float]]
    upper: Union[float, Sequence[float]]
    damping: Union[float, Sequence[float]]
    force_limit: Union[float, Sequence[float]] = 1e10
    friction: Union[float, Sequence[float]] = 0.0
    normalize_action: bool = True
    drive_mode: Union[Sequence[DriveMode], DriveMode] = "force"
    controller_cls = PDJointVelController

Import

from mani_skill.agents.controllers.pd_joint_vel import (
    PDJointVelController,
    PDJointVelControllerConfig,
)

I/O Contract

Inputs

Name Type Required Description
lower float or Sequence[float] Yes Lower bound of the velocity action space.
upper float or Sequence[float] Yes Upper bound of the velocity action space.
damping float or Sequence[float] Yes Damping coefficient for the velocity drive. Stiffness is set to zero.
force_limit float or Sequence[float] No Maximum force the drive can exert. Defaults to 1e10.
friction float or Sequence[float] No Joint friction coefficient. Defaults to 0.0.
normalize_action bool No If True, normalizes the action space to [-1, 1]. Defaults to True.
drive_mode DriveMode No Drive mode for the joints. Defaults to "force".

Outputs

Name Type Description
set_action() None Preprocesses the action and sets joint drive velocity targets on the articulation.
single_action_space spaces.Box Box action space bounded by lower/upper with dimension equal to number of joints.

Usage Examples

Basic Usage

from mani_skill.agents.controllers.pd_joint_vel import PDJointVelControllerConfig

# Velocity control for a set of joints
config = PDJointVelControllerConfig(
    joint_names=["wheel_left", "wheel_right"],
    lower=-5.0,
    upper=5.0,
    damping=50,
    normalize_action=True,
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment