  Granular materials are of critical interest to many robotic tasks in
planetary science, construction, and manufacturing. However, the dynamics of
granular materials are complex and often computationally very expensive to
simulate. We propose a set of methodologies and a system for the fast
simulation of granular materials on Graphics Processing Units (GPUs), and show
that this simulation is fast enough for basic training with Reinforcement
Learning algorithms, which currently require many dynamics samples to achieve
acceptable performance. Our method models granular material dynamics using
implicit timestepping methods for multibody rigid contacts, as well as
algorithmic techniques for efficient parallel collision detection between pairs
of particles and between particle and arbitrarily shaped rigid bodies, and
programming techniques for minimizing warp divergence on Single-Instruction,
Multiple-Thread (SIMT) chip architectures. We showcase our simulation system on
several environments targeted toward robotic tasks, and release our simulator
as an open-source tool.
