Giter VIP home page Giter VIP logo

subspace-graph-physics's Introduction

Subspace Graph Physics:
Real-Time Rigid Body-Driven Granular Flow Simulation

This is a computationally efficient version of "Learning To Simulate" developed by DeepMind and Stanford researchers, for real-time 3D physics simulations (e.g. for granular flows and their interactions with rigid bodies).

drawing

Highlights

  • We train the graph network (GN) model in subspace by performing Principal Component Analysis (PCA).

  • PCA enables GN to be trained using a single desktop GPU with moderate VRAM for large 3D configurations.

  • The training datasets can be generated by our efficient and accurate Material Point Method (MPM).

  • The rollout runtime is under 1 sec/sec, and the training runtime is 60 global-step/sec (on NVIDIA RTX 3080).

  • The particle positions and velocities, and rigid body interaction forces are compared above.

Install and Run Demo

  • Install

  • Train

    python3 -m learning_to_simulate.train \
    --mode=train \
    --eval_split=train \
    --batch_size=2 \
    --data_path=./learning_to_simulate/datasets/Excavation_PCA \
    --model_path=./learning_to_simulate/models/Excavation_PCA
  • Test

    python3 -m learning_to_simulate.train \
    --mode=eval_rollout \
    --eval_split=test \
    --data_path=./learning_to_simulate/datasets/Excavation_PCA \
    --model_path=./learning_to_simulate/models/Excavation_PCA \
    --output_path=./learning_to_simulate/rollouts/Excavation_PCA
  • Visualize

    • 2D plot

      python -m learning_to_simulate.render_rollout_2d_force \
      --plane=xy \
      --data_path=./learning_to_simulate/datasets/Excavation_PCA \
      --rollout_path=./learning_to_simulate/rollouts/Excavation_PCA
    • 3D plot

      python -m learning_to_simulate.render_rollout_3d_force \
      --fullspace=True \
      --data_path=./learning_to_simulate/datasets/Excavation_PCA \
      --rollout_path=./learning_to_simulate/rollouts/Excavation_PCA/rollout_test_0.pkl

Bibtex

Please cite our papers [1, 2] if you use this code for your research:

@misc{haeri2021subspace,
    title={Subspace Graph Physics: Real-Time Rigid Body-Driven Granular Flow Simulation}, 
    author={Amin Haeri and Krzysztof Skonieczny},
    year={2021},
    eprint={2111.10206},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

and/or

@INPROCEEDINGS{9438132,
    author={Haeri, A. and Skonieczny, K.},
    booktitle={2021 IEEE Aerospace Conference (50100)},
    title={Accurate and Real-time Simulation of Rover Wheel Traction},
    year={2021},
    volume={},
    number={},
    pages={1-9},
    doi={10.1109/AERO50100.2021.9438132}
}

subspace-graph-physics's People

Contributors

haeriamin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.