SAP Warp is a Warp-based implementation of the SAP contact formulation from An Unconstrained Convex Formulation of Compliant Contact with additional improvements for robust, stable, and efficient simulation of frictional contact for robotics. The project follows Drake's implementation as a reference and exposes a compact Python/Warp runtime for scene loading, collision generation, solver benchmarking, and visualization.
This repository is initiated and maintained by the AIVC Lab and Toyota Research Institute (TRI).
Quick Start
SAP Warp is designed for CUDA-accelerated simulation and also supports CPU execution for lightweight runs.
We recommend using uv to set up the environment. To get started, run:
uv run python -m viewer.viser.sap_viewer \ --scene assets/yaml/unitree_g1_usd.yaml
The program will launch a Viser viewer which defaults to http://localhost:8080.
Example Scenes
The repository includes several scene files under assets/yaml/.
![]() Basic cartpole |
![]() Basic ant |
![]() Franka Panda arm |
![]() AgileX Piper arm |
![]() Universal Robots UR10 |
![]() ANYmal C quadruped |
![]() ANYmal D quadruped |
![]() Unitree H1 humanoid |
![]() Unitree G1 humanoid |
Documentation
For detailed SAP Warp documentation, see the documentation site.
Integrating Sap Warp in Newton
SAP Warp is fully compatible with Newton. See this example and the documentation for more details.
uv run --frozen --with 'newton[examples]' python sap_with_newton.pyContributing
Contributions are welcome. Please keep changes focused, include a small reproduction or benchmark command when possible, and update documentation for user-facing behavior.
Current core contributors: Yunuo Chen, Xiang Feng, Chang Yu, Yin Yang, Joseph Masterjohn, and Chenfanfu Jiang.
License
SAP Warp is released under the Apache 2.0 license. See LICENSE.
Citation
If you use SAP Warp in your research, please consider citing:
@misc{sapwarp,
author = {SAP Warp Developers},
title = {SAP Warp: GPU-accelerated Semi-Analytic Primal Solver for Compliant Frictional Contact},
month = {June},
year = {2026},
url = {https://github.com/sap-sim/sap_warp}
}








