Skip to content

Stanford-TML/SafePBDS

Repository files navigation

SafePBDS

Reference implementation for the paper "Safe and Steerable Geometric Motion Policies for Robotic Dexterous Manipulation" by Albert Wu, Riccardo Bonalli, Thomas Lew, and C. Karen Liu.

Project page: https://tml.stanford.edu/safe-pbds

SafePBDS (Safe Pullback Bundle Dynamical Systems) is a geometrically consistent motion-generation framework that computes safe configuration-manifold accelerations from objectives and safety conditions defined on arbitrary task manifolds. It contributes two ideas on top of PBDS:

  • a pullback control barrier function that converts task-manifold safety conditions into linear constraints on configuration accelerations, and
  • a task-manifold action interface that lets a high-level policy inject low-dimensional residual motions; zero input recovers the autonomous behavior and safety is preserved under arbitrary inputs.

The code reproduces all simulation experiments in the paper, and provides the planners and controllers used for the 23-DoF Franka Panda + Allegro Hand hardware experiments (4-finger grasping, 3-finger ablation, and palm-down in-hand reorientation).

Repository layout

safepbds/
  pbds/         # PBDS task tree, QP assembly (Algorithm 1)
  systems/      # MuJoCo manipulation environments (Franka + Allegro)
  policies/     # Finger-gaiting and grasping policies
  planning/     # Grid-search planner for in-hand reorientation
  gymnasium_env/# Thin Gymnasium wrapper around the MuJoCo envs
  utils/        # Math, CBF, perception, hardware utilities
  scripts/      # Entry points: simulation, planning, plotting, animation
  tests/        # Top-level integration tests
external/
  mujoco_menagerie/  # Vendored MuJoCo hands (panda_allegro, wonik_allegro)
  YCB_sim/                         # YCB object meshes (submodule)
models/
  robot/, tml_objects/             # LEAP hand and TML object assets
docs/                              # Companion videos

A separate REPRODUCE.md maps every paper figure and table to the script that produces it, with command lines and expected outputs.

Installation

Prerequisites

  • Linux (Ubuntu 22.04 tested) or macOS
  • Python 3.10
  • A CUDA-capable GPU is helpful for hardware perception but not required for the simulation experiments

Set up the environment

git clone --recurse-submodules <repo-url> SafePBDS
cd SafePBDS

# Create a clean conda environment
conda create -n safepbds python=3.10
conda activate safepbds

# Install Python dependencies and the package in editable mode
pip install -r requirements.txt
pip install -e .

external/YCB_sim is the only git submodule. If it was not fetched during the clone, pull it now:

git submodule update --init --recursive

(external/mujoco_menagerie is vendored directly into the repo, not a submodule, so it requires no extra fetch step.)

Quick start

Reproduce the S^2 double-integrator figure (Fig. 2):

python safepbds/scripts/generate_s2_figures.py --scenario all
# Outputs PDFs to figures/

Reproduce the 7-DoF Panda arm figure (Fig. 3):

# Run the simulation experiments
MUJOCO_GL=egl python safepbds/scripts/run_7dof_paper_experiments.py run --n-sweep 0

# Plot the saved data
python safepbds/scripts/plot_7dof_paper_figures.py --data-dir sim_results/ --fig-dir figures/

Hardware experiments require additional setup (Deoxys, the Allegro ZMQ controller, and a perception stack) and are documented in REPRODUCE.md.

Citation

If you use this code, please cite:

@misc{wu2026safepbds,
  title         = {Safe and Steerable Geometric Motion Policies for Robotic Dexterous Manipulation},
  author        = {Wu, Albert and Bonalli, Riccardo and Lew, Thomas and Liu, C. Karen},
  year          = {2026},
  eprint        = {2605.21811},
  archivePrefix = {arXiv},
  primaryClass  = {cs.RO},
  url           = {https://arxiv.org/abs/2605.21811},
}

License

The SafePBDS code in this repository is released under the MIT License; see LICENSE for the full text.

Vendored third-party assets retain their own licenses:

  • external/mujoco_menagerie/panda_allegro/ — Franka Panda + Allegro Hand model from MuJoCo Menagerie (Apache-2.0; the Franka Panda meshes additionally carry Franka Emika's attribution terms).
  • external/mujoco_menagerie/wonik_allegro/ — Allegro Hand model under the BSD-2-Clause license (Copyright 2016 SimLab); see its LICENSE.
  • external/YCB_sim/ — YCB object meshes under the Apache-2.0 license; see its LICENSE.
  • models/robot/ — LEAP Hand description (MIT, Copyright 2023 Ananye Agarwal); see models/robot/LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages