Algorithms#

GRiD implements the core rigid-body dynamics algorithms, their analytical derivatives, and the kinematic, centroidal and trajectory-optimization operations built on them. Each page gives the algorithm, its Python signature, where the reference and the CUDA code generator live, and how GRiD exposes it.

Algorithm Overview#

Here’s a quick overview of the main algorithms:

  • inverse_dynamics: Recursive Newton-Euler Algorithm (RNEA).

  • crba: Composite Rigid Body Algorithm (joint-space mass matrix).

  • aba: Articulated Body Algorithm (forward dynamics).

  • minv: Direct Inverse Mass Matrix.

  • Frame Jacobian: general-frame geometric Jacobian \(J\) for an arbitrary target frame in any of the three Pinocchio reference frames (LOCAL / WORLD / LOCAL_WORLD_ALIGNED), plus the Jacobian time-variation \(\dot J\) and the operational-space (OSC) inertia \(\Lambda = (J M^{-1} J^{\top})^{-1}\).

  • IDSVA-SO: Second-order Inverse Dynamics Spatial Vector Algorithm, with body-frame and world-frame variants and a codegen-time dispatcher (body-frame for fixed-base, world-frame for floating-base).

  • FDSVA-SO: Second-order Forward Dynamics, layered on top of IDSVA-SO with a four-tier shared-memory selector for large floating-base robots.

  • Kinematics (Kinematics (end-effector pose, Jacobian, Hessian)): end-effector pose, its Jacobian and Hessian, batched forward kinematics and runtime-selected targets.

  • Integrators and the plant layer (Integrators and the plant layer): the discrete step, its gradient and Hessian, and the costs and barriers that a trajectory optimizer needs.

  • Centroidal & energy (Bias terms, centroidal quantities and energy): CoM (+ Jacobian), CCRBA (\(A\), \(h\)), the centroidal derivatives dccrba (\(\partial A/\partial q\)) and cmm_time_variation (\(\dot A\)), the Coriolis matrix \(C(q,\dot q)\), and the kinetic / potential energy and their inertial-parameter regressors. These run on mimic robots, and the centroidal derivatives also run on big floating-base robots via the sweep-pool spill path.