GRiD: GPU-Accelerated Rigid Body Dynamics with Analytical Gradients

We introduce GRiD: a GPU-accelerated library for computing rigid body dynamics with analytical gradients. GRiD was designed to accelerate the nonlinear trajectory optimization subproblem used in state-of-the-art robotic planning, control, and machine learning. Each iteration of nonlinear trajectory optimization requires tens to hundreds of naturally parallel computations of rigid body dynamics and their gradients. GRiD leverages URDF parsing and code generation to deliver optimized dynamics kernels that not only expose GPUfriendly computational patterns, but also take advantage of both fine-grained parallelism within each computation and coarsegrained parallelism between computations. Through this approach, when performing multiple computations of rigid body dynamics algorithms, GRiD provides as much as a 7.6x speedup over a state-of-the-art, multi-threaded CPU implementation, and maintains as much as a 2.6x speedup when accounting for I/O overhead. We release GRiD as an open-source library, so that it can be leveraged by the robotics community to easily and efficiently accelerate rigid body dynamics on the GPU.

[1]  Twan Koolen,et al.  Benchmarking and Workload Analysis of Robot Dynamics Algorithms , 2019, 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[2]  Karthikeyan Sankaralingam,et al.  Dark Silicon and the End of Multicore Scaling , 2012, IEEE Micro.

[3]  Zachary Manchester,et al.  Linear-Time Variational Integrators in Maximal Coordinates , 2020, WAFR.

[4]  Roy Featherstone,et al.  A Divide-and-Conquer Articulated-Body Algorithm for Parallel O(log(n)) Calculation of Rigid-Body Dynamics. Part 1: Basic Algorithm , 1999, Int. J. Robotics Res..

[5]  Mario Zanon,et al.  Reinforcement Learning for Mixed-Integer Problems Based on MPC , 2020, ArXiv.

[6]  Ye Zhao,et al.  Robust Trajectory Optimization Over Uncertain Terrain With Stochastic Complementarity , 2020, IEEE Robotics and Automation Letters.

[7]  Scott Kuindersma,et al.  A Performance Analysis of Parallel Differential Dynamic Programming on a GPU , 2018, WAFR.

[8]  Frédo Durand,et al.  DiffTaichi: Differentiable Programming for Physical Simulation , 2020, ICLR.

[9]  Aaron M. Dollar,et al.  Model Predictive Actor-Critic: Accelerating Robot Skill Acquisition with Deep Reinforcement Learning , 2021, 2021 IEEE International Conference on Robotics and Automation (ICRA).

[10]  Marco Hutter,et al.  MPC-Net: A First Principles Guided Policy Search , 2020, IEEE Robotics and Automation Letters.

[11]  Mikel L. Forcada,et al.  ATLAS , 2011, EAMT.

[12]  Scott Kuindersma,et al.  Accelerating Robot Dynamics Gradients on a CPU, GPU, and FPGA , 2021, IEEE Robotics and Automation Letters.

[13]  Yuval Tassa,et al.  MuJoCo: A physics engine for model-based control , 2012, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[14]  Srinivas Devadas,et al.  Robomorphic computing: a design methodology for domain-specific accelerators parameterized by robot morphology , 2021, ASPLOS.

[15]  Paulius Micikevicius,et al.  3D finite difference computation on GPUs using CUDA , 2009, GPGPU-2.

[16]  Jonas Degrave,et al.  A DIFFERENTIABLE PHYSICS ENGINE FOR DEEP LEARNING IN ROBOTICS , 2016, Front. Neurorobot..

[17]  Olivier Stasse,et al.  Whole-body model-predictive control applied to the HRP-2 humanoid , 2015, 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[18]  Jonas Buchli,et al.  Fast derivatives of rigid body dynamics for control, optimization and estimation , 2016, 2016 IEEE International Conference on Simulation, Modeling, and Programming for Autonomous Robots (SIMPAR).

[19]  Wojciech Zaremba,et al.  OpenAI Gym , 2016, ArXiv.

[20]  Yashraj S. Narang,et al.  DiSECt: A Differentiable Simulation Engine for Autonomous Robotic Cutting , 2021, Robotics: Science and Systems.

[21]  C. Karen Liu,et al.  Fast and Feature-Complete Differentiable Physics for Articulated Rigid Bodies with Contact , 2021, ArXiv.

[22]  Olivier Stasse,et al.  The Pinocchio C++ library : A fast and flexible implementation of rigid body dynamics algorithms and their analytical derivatives , 2019, 2019 IEEE/SICE International Symposium on System Integration (SII).

[23]  Joshua B. Tenenbaum,et al.  End-to-End Differentiable Physics for Learning and Control , 2018, NeurIPS.

[24]  Jonas Buchli,et al.  The control toolbox — An open-source C++ library for robotics, optimal and model predictive control , 2018, 2018 IEEE International Conference on Simulation, Modeling, and Programming for Autonomous Robots (SIMPAR).

[25]  Patrick M. Wensing,et al.  Accelerating Second-Order Differential Dynamic Programming for Rigid-Body Systems , 2021, IEEE Robotics and Automation Letters.

[26]  Jia Pan,et al.  Parallel Dynamics Computation Using Prefix Sum Operations , 2016, IEEE Robotics and Automation Letters.

[27]  Marco Hutter,et al.  Deep Value Model Predictive Control , 2019, CoRL.

[28]  Katsu Yamane,et al.  Comparative Study on Serial and Parallel Forward Dynamics Algorithms for Kinematic Chains* , 2009, Int. J. Robotics Res..

[29]  Darwin G. Caldwell,et al.  RobCoGen: a code generator for efficient kinematics and dynamics of articulated robots, based on Domain Specific Languages , 2016 .

[30]  Zachary Manchester,et al.  ALTRO: A Fast Solver for Constrained Trajectory Optimization , 2019, 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[31]  Hod Lipson,et al.  Titan: A Parallel Asynchronous Library for Multi-Agent and Soft-Body Robotics using NVIDIA CUDA , 2019, 2020 IEEE International Conference on Robotics and Automation (ICRA).

[32]  Dimitri Komatitsch,et al.  Accelerating a three-dimensional finite-difference wave propagation code using GPU graphics cards , 2010 .

[33]  Moritz Diehl,et al.  A Family of Iterative Gauss-Newton Shooting Methods for Nonlinear Optimal Control , 2017, 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[34]  Yuval Tassa,et al.  Simulation tools for model-based robotics: Comparison of Bullet, Havok, MuJoCo, ODE and PhysX , 2015, 2015 IEEE International Conference on Robotics and Automation (ICRA).

[35]  Evangelos A. Theodorou,et al.  Model Predictive Path Integral Control: From Theory to Parallel Computation , 2017 .

[36]  Jan Bender,et al.  A Survey on Position Based Dynamics , 2017, Eurographics.

[37]  Twan Koolen,et al.  Julia for robotics: simulation and real-time control in a high-level programming language , 2019, 2019 International Conference on Robotics and Automation (ICRA).

[38]  Miles Macklin,et al.  Isaac Gym: High Performance GPU-Based Physics Simulation For Robot Learning , 2021, NeurIPS Datasets and Benchmarks.

[39]  Model Predictive-Actor Critic Reinforcement Learning for Dexterous Manipulation , 2021, 2020 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE).

[40]  Patrick M. Wensing,et al.  Efficient Analytical Derivatives of Rigid-Body Dynamics Using Spatial Vector Algebra , 2021, IEEE Robotics and Automation Letters.

[41]  Patrick M. Wensing,et al.  Numerical Methods to Compute the Coriolis Matrix and Christoffel Symbols for Rigid-Body Systems , 2020, Journal of Computational and Nonlinear Dynamics.

[42]  Steven Swanson,et al.  Conservation cores: reducing the energy of mature computations , 2010, ASPLOS XV.

[43]  Olivier Bachem,et al.  Brax - A Differentiable Physics Engine for Large Scale Rigid Body Simulation , 2021, NeurIPS Datasets and Benchmarks.

[44]  Roland Siegwart,et al.  Fast nonlinear Model Predictive Control for unified trajectory optimization and tracking , 2016, 2016 IEEE International Conference on Robotics and Automation (ICRA).

[45]  Roy Featherstone,et al.  Rigid Body Dynamics Algorithms , 2007 .

[46]  Nicolas Mansard,et al.  Analytical Derivatives of Rigid Body Dynamics Algorithms , 2018, Robotics: Science and Systems.

[47]  Jiancheng Liu,et al.  ChainQueen: A Real-Time Differentiable Physical Simulator for Soft Robotics , 2018, 2019 International Conference on Robotics and Automation (ICRA).

[48]  Edo Jelavic,et al.  Real-time motion planning of legged robots: A model predictive control approach , 2017, 2017 IEEE-RAS 17th International Conference on Humanoid Robotics (Humanoids).

[49]  Roy Featherstone,et al.  Exploiting Sparsity in Operational-space Dynamics , 2010, Int. J. Robotics Res..

[50]  Ferdinando Cannella,et al.  Design of HyQ – a hydraulically and electrically actuated quadruped robot , 2011 .

[51]  Marco Hutter,et al.  A Unified MPC Framework for Whole-Body Dynamic Locomotion and Manipulation , 2021, IEEE Robotics and Automation Letters.

[52]  Ludovic Righetti,et al.  High-Frequency Nonlinear Model Predictive Control of a Manipulator , 2021, 2021 IEEE International Conference on Robotics and Automation (ICRA).