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 PDBaseVelController

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

Overview

Concrete ego-centric base velocity controllers for mobile robot navigation in ManiSkill.

Description

This file implements two ego-centric base velocity controllers for mobile robots. PDBaseVelController extends PDJointVelController and converts ego-centric xy velocity commands into world-frame velocities using a 2D rotation matrix derived from the robot's current orientation (assumed to be the 3rd DoF). It supports omnidirectional movement on the xy-plane plus z-axis rotation. PDBaseForwardVelController restricts lateral movement by zeroing the y-component before rotation, accepting only forward velocity and rotation velocity as a 2-dimensional action. Both controllers require at least 3 joints (x translation, y translation, z-axis rotation).

Usage

Use PDBaseVelControllerConfig for mobile bases that need omnidirectional ego-centric velocity control (e.g., holonomic bases). Use PDBaseForwardVelControllerConfig for differential-drive robots that only move forward and rotate (e.g., Fetch robot). These are typically configured as part of a composite controller alongside arm controllers.

Code Reference

Source Location

Signature

class PDBaseVelController(PDJointVelController):
    """PDJointVelController for ego-centric base movement."""

class PDBaseVelControllerConfig(PDJointVelControllerConfig):
    controller_cls = PDBaseVelController

class PDBaseForwardVelController(PDJointVelController):
    """PDJointVelController for forward-only ego-centric base movement."""

class PDBaseForwardVelControllerConfig(PDJointVelControllerConfig):
    controller_cls = PDBaseForwardVelController

Import

from mani_skill.agents.controllers.pd_base_vel import (
    PDBaseVelController,
    PDBaseVelControllerConfig,
    PDBaseForwardVelController,
    PDBaseForwardVelControllerConfig,
)

I/O Contract

Inputs

Name Type Required Description
action Array Yes For PDBaseVelController: ego-centric velocity vector of dimension >= 3 (xy velocity + rotation + optional extra DoFs). For PDBaseForwardVelController: 2D vector (forward velocity + rotation velocity).
lower float or Sequence[float] Yes Lower bound of velocity action space (inherited from PDJointVelControllerConfig).
upper float or Sequence[float] Yes Upper bound of velocity action space (inherited from PDJointVelControllerConfig).
damping float or Sequence[float] Yes Damping coefficient for velocity drive (inherited from PDJointVelControllerConfig).

Outputs

Name Type Description
set_action() None Converts ego-centric velocity to world-frame and sets joint drive velocity targets.
single_action_space spaces.Box Action space matching the number of base joints (>= 3) or 2D for forward-only.

Usage Examples

Basic Usage

from mani_skill.agents.controllers.pd_base_vel import PDBaseVelControllerConfig

# Configure omnidirectional ego-centric base velocity control
base_config = PDBaseVelControllerConfig(
    joint_names=["root_x_axis_joint", "root_y_axis_joint", "root_z_rotation_joint"],
    lower=-1.0,
    upper=1.0,
    damping=100,
    normalize_action=True,
)

Related Pages

Page Connections

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