diff_sim_grads

We compare the gradients calculated by different differentiable contact model implementations.

https://github.com/desmondzhong/diff_sim_grads

Science Score: 28.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

differentiable-simulation dynamical-systems optimal-control pytorch taichi warp
Last synced: 6 months ago · JSON representation ·

Repository

We compare the gradients calculated by different differentiable contact model implementations.

Basic Info
  • Host: GitHub
  • Owner: DesmondZhong
  • License: other
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 2.02 MB
Statistics
  • Stars: 43
  • Watchers: 4
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Topics
differentiable-simulation dynamical-systems optimal-control pytorch taichi warp
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md


## Differentiable Physics Simulations with Contacts: Do They Have Correct Gradients w.r.t. Position, Velocity and Control? Yaofeng Desmond Zhong, Jiequn Han, Georgia Olympia Brikis | 2022 [![Conference](http://img.shields.io/badge/ICML-AI4Science-4b44ce.svg)](https://openreview.net/forum?id=KIl0LZ9tJex) [![Paper](http://img.shields.io/badge/arXiv-2207.05060-B31B1B.svg)](https://arxiv.org/abs/2207.05060)

This repository contains scripts to reproduce results in our paper.

Reproducibility

All experiments do not require GPUs.

To install all dependencies: ```bash pip install -r requirements.txt

or to install the exact versions of packages as done in this work.

pip install -r requirements_freeze.txt ```

Please check out the README files in the task folders for how to reproduce the results shown in the paper.

Overview

In this work, we compare the gradients calculated by different differentiable contact models as shown in the following table.

| Differentiable contact models | Implementations | | ----------------------------- | --------------- | | Linear complementarity problems (LCPs) | NimblePhysics | | Convex optimization | DiffCoSim | | Compliant models | Warp and Brax | | Position-based dynamics (PBD) | Warp and Brax | | Direct Velocity Impulse | DiffTaichi |

We apply these implementations to three tasks.

| Task 1. Gradients with a Simple Collision | Task 2. Optimize the Initial Velocity of a Bouncing Ball to Hit a Target | Task 3. Learning Optimal Control with a Two-ball Collision | | :---------:|:------:|:------------------------:| | drawing | drawing | drawing |

Our results show that gradients calculated by different implementation do not agree. Some implementations fail to achieve the optimization tasks. Please check out our paper for more details.

Task 3 Results

In this tasks, we are able to derive the analytical gradients and the analytical optimal control. Here we plot the analytical optimal loss along with the learning curves as well as the analytical optimal control and learned optimal controls. We observe that some differentiable simulators learn zero control sequences and fail to achieve the optimization task.

drawing

Citation

If you find this work helpful, please consider citing our paper using the following Bibtex. bibtex @article{zhong2022differentiable, title={Differentiable Physics Simulations with Contacts: Do They Have Correct Gradients w.r.t. Position, Velocity and Control?}, author={Zhong, Yaofeng Desmond and Han, Jiequn and Brikis, Georgia Olympia}, journal={arXiv preprint arXiv:2207.05060}, year={2022} }

Owner

  • Name: Desmond Zhong
  • Login: DesmondZhong
  • Kind: user
  • Location: San Francisco Bay Area
  • Company: Breakpoint AI

Founding Research Scientist at Breakpoint AI

Citation (CITATION.bib)

@article{zhong2022differentiable,
  title={Differentiable Physics Simulations with Contacts: Do They Have Correct Gradients w.r.t. Position, Velocity and Control?},
  author={Zhong, Yaofeng Desmond and Han, Jiequn and Brikis, Georgia Olympia},
  journal={arXiv preprint arXiv:2207.05060},
  year={2022}
}

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels