Rewarped
Rewarped 🌀 is a platform for reinforcement learning in parallel differentiable multiphysics simulation, built on NVIDIA/warp. Rewarped supports:
- parallel environments: to train RL agents at scale.
- differentiable simulation: to compute batched analytic gradients for optimization.
- multiphysics: (CRBA, FEM, MPM, XPBD) physics solvers and coupling to support interaction between rigid bodies, articulations, and various deformables.
We use Rewarped to re-implement a variety of RL tasks from prior works, and demonstrate that first-order RL algorithms (which use differentiable simulation to compute first-order analytic gradients) can be scaled to a range of challenging manipulation and locomotion tasks that involve interaction between rigid bodies, articulations, and deformables.
For control and reinforcement learning algorithms, see
etaoxing/mineral.
Setup
We have tested on the following environment: RTX 4090, Ubuntu 22.04, CUDA 12.5, Python 3.10, PyTorch 2.
conda create -n rewarped python=3.10
conda activate rewarped
pip install torch torchvision
pip install gym==0.23.1
pip install rewarped
# --- Example: trajectory optimization
python -m rewarped.envs.warp_examples.bounce --num_envs 4
# will create a `.usd` file in `outputs/`
# use MacOS Preview or alternatives to view
# --- Example: (first-order) reinforcement learning
pip install git+https://github.com/etaoxing/mineral
python -m mineral.scripts.run \
task=Rewarped agent=DFlexAntSAPO task.env.env_name=Ant task.env.env_suite=dflex \
logdir="workdir/RewarpedAnt4M-SAPO/$(date +%Y%m%d-%H%M%S.%2N)" \
agent.shac.max_epochs=2000 agent.shac.max_agent_steps=4.1e6 \
agent.network.actor_kwargs.mlp_kwargs.units=\[128,64,32\] \
agent.network.critic_kwargs.mlp_kwargs.units=\[64,64\] \
run=train_eval seed=1000
See
mineral/docs/rewarped.mdfor scripts to reproduce the original paper experiments onrewarped==1.3.0.
Usage
Tasks
|
|
|
|
| dflex • AntRun | isaacgymenvs • HandReorient | plasticinelab • RollingFlat |
|
|
|
|
| gradsim • SoftJumper | dexdeform • HandFlip | softgym • FluidMove |
Creating a new task
Copy and modify rewarped/envs/template/task.py into rewarped/envs/<suite>/<task>.py. Put assets in assets/<suite>/.
Contributing
Contributions are welcome! Please refer to CONTRIBUTING.md.
Versioning
Versions take the format X.Y.Z, where:
- X.Y matches to version X.Y.* of
NVIDIA/warp. - Z is incremented for bug fixes or new features.
Compatibility with newer or older versions of NVIDIA/warp may work, but is not guaranteed or supported. There can be some breaking changes between minor versions.
Acknowledgements
Differentiable Simulation
Tasks (alphabetical)
sizhe-li/DexDeformNVlabs/DiffRLhzaskywalker/PlasticineLabgradsim/gradsimisaac-sim/IsaacGymEnvsleggedrobotics/legged_gymXingyu-Lin/softgym- ...
Citing
@inproceedings{xing2025stabilizing,
title={Stabilizing Reinforcement Learning in Differentiable Multiphysics Simulation},
author={Xing, Eliot and Luk, Vernon and Oh, Jean},
booktitle={International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=DRiLWb8bJg}
}
Metadata
Release files for rewarped 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rewarped-1.3.3.tar.gz | 1.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rewarped-1.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / rewarped-1.3.3.tar.gz
| Download URL | rewarped-1.3.3.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba82f48fdcb558e647592f8f4ac7db39db109f6289d88dd98f5a414d4fa94632
|
|
BLAKE2b-256 checksum How to use checksums |
53c1a76916cb1f6866b034f0af3901d667fb45892c2a5342c38541dffa3d918b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 13, 2025.
Transparency logRelease files / rewarped-1.3.3-py3-none-any.whl
| Download URL | rewarped-1.3.3-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39ff85480df536049d3dcd6cc614a80419c811516c348e6d37c90dd776695cb6
|
|
BLAKE2b-256 checksum How to use checksums |
e1c61cbe92a1f478ff8862dbb0ed6d7d547e8d6aa4795c8a172c1a81ad3c3498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 13, 2025.
Transparency log