Frax

New
License: MIT License · Updated 2026-11-12
My rating

1. Overview

Frax is a robotics kinematics and dynamics library written in pure Python and built on JAX, developed by the Autonomous Systems Lab (ASL) at Stanford University and released under the MIT licence in 2026. Its goal is to combine three properties that are usually in tension: the computational speed of a native C++ library such as Pinocchio, the ergonomics of Python, and the automatic differentiation and parallel execution that JAX provides. By expressing forward and inverse kinematics and dynamics as JAX functions, Frax lets a user design high-performance inverse-kinematics and inverse-dynamics controllers without hand-deriving Jacobians, and it runs the same code on CPU, GPU or TPU with batching. The project ships purpose-built classes for Robot, Manipulator, Humanoid and Quadruped, a fast IK pipeline called frax.ik, and built-in models for common platforms such as the Franka Panda, Kuka iiwa and Unitree G1 and A2. For a physics-AI programme the appeal is that control laws become differentiable computational graphs that can be composed, differentiated and parallelised with almost no boilerplate.

2. How It Works

Frax loads a robot from URDF and represents the kinematic tree with a MuJoCo-like free-floating base convention: a position plus a WXYZ quaternion. From this representation it computes forward kinematics, the frame Jacobian, the mass matrix, Coriolis and centrifugal terms, the gravity vector, and forward and inverse dynamics, all as JAX primitives. Because every quantity is a JAX function, applying jax.jit compiles the computation and jax.vmap batches it across many environments or time steps, while jax.grad or jax.jacrev supplies analytic Jacobians without manual derivation. The recommended usage is to wrap calls in the jit decorator and, on accelerator hardware, to raise precision with jax.config.update and tune thread counts. The frax.ik pipeline, introduced in version 0.2.0, builds on the ElastiQP solver to provide flexible inverse-kinematics tools such as humanoid retargeting, manipulator and quadruped interactive IK. The design keeps the numerical core in Python while leaning on JAX for compilation, differentiation and hardware portability.

3. Scope and Assumptions

Frax targets rigid-body robot kinematics and dynamics for control and planning, demonstrated on arms, humanoids and quadrupeds, and it assumes models are described by standard URDF with the floating-base convention noted above. It is a library for computing kinematics, dynamics and their derivatives, not a full physics simulator: it does not integrate contact dynamics or run closed-loop simulation, so contact-rich behaviours must be handled by an engine such as MuJoCo or by the user's own loop. The autodiff and parallelism benefits assume the user is willing to work inside the JAX ecosystem and to structure code so that jit compilation and batching apply. Performance figures assume x64 precision and appropriate hardware configuration; on CPU the controller times land in the low-microsecond range, while on GPU or TPU throughput scales with batch size. Frax is a young project (2026) and is best suited to teams already comfortable with JAX who want differentiable dynamics without leaving Python, and the adoption barrier comes mainly from the mental model rather than from the algorithms themselves.

4. Getting Started

The fastest entry is to install the package from the Stanford ASL repository and load one of the bundled models, for example the Franka Panda or Unitree G1, then call the forward-kinematics and Jacobian functions and confirm the numbers match a reference. Because Frax is JAX-based, the next step is to wrap the computation in jax.jit and, on GPU or TPU, enable x64 and configure threads before measuring timing. The frax.ik guide and the collision-modelling document in the repository explain how to set up an IK problem, add collision spheres and run retargeting or interactive solving. The demonstration videos cover a Panda sinusoidal trajectory and mouse-driven control as well as an OSCBF safety controller. A sensible validation path is to reproduce a documented IK or OSC demo on a bundled model in simulation, verify the tracking error, and only then adapt the model to your own robot by writing or importing its URDF. Teams new to JAX should budget time for the jit and x64 mental model before expecting the advertised throughput.

5. Comparison with Alternatives

Against a native C++ dynamics library such as Pinocchio, Frax trades some raw performance headroom for Python ergonomics and first-class autodiff: it aims for Pinocchio-class speed while staying in a single Python stack. Against a full simulator such as MuJoCo, the comparison is again division of labour: MuJoCo runs contact simulation, whereas Frax computes kinematics and dynamics and their gradients for controller design, and its free-floating convention mirrors MuJoCo's. Against an upper-layer motion framework such as ProtoMotions or a differentiable world-model stack such as SuperMimic, Frax is a lower-level differentiable building block rather than a task or learning framework. Against a GPU kernel substrate such as NVIDIA Warp, Frax is a robotics-specific dynamics library rather than a general programming layer. The honest framing is that Frax's win is autodiff-native dynamics in Python, and the gain does not lie in feature breadth or maximal throughput.

6. Benchmarks and Evidence

The project reports controller computation times in the low-microsecond range on CPU, corresponding to roughly twenty-five to one hundred kilohertz, and states that on GPU or TPU it can exceed one hundred million dynamics-term computations per second depending on batch size. For inverse kinematics with frax.ik, it claims more than one hundred thousand frames per second. These numbers are presented by the authors as the project's own measurements and should be read as such; they depend on x64 precision, hardware configuration and batch size, so a team should reproduce them on its own target platform before relying on them. The built-in models (Franka Panda, Kuka iiwa, Unitree G1 and A2) ship with collision-sphere models, which lets users benchmark IK and OSC immediately. The underlying ElastiQP solver, described in a separate preprint, is the engine behind the flexible IK pipeline. As with any self-reported benchmark, the figures demonstrate capability rather than guaranteeing performance on unseen hardware or robot morphologies.

7. Role in Physics-AI Workflows

Frax sits at the same foundation as Pinocchio but in the JAX ecosystem: it is the differentiable dynamics primitive that learning and optimisation loops consume. Because its quantities are JAX functions, they compose directly with gradient-based control, trajectory optimisation and system identification, and they parallelise across batches without rewrites. It pairs naturally with physics-informed approaches when a team wants differentiable surrogates, and it is listed on the physics-AI learning path as a Python-first dynamics option. The physics simulation primer explains the rigid-body assumptions behind such formulations, and the classical solver cost-boundary guide clarifies when exact analytic derivatives still beat learned models. A GPU kernel substrate such as NVIDIA Warp can accelerate the same workloads, while SuperMimic shows what a learning loop built on differentiable dynamics can achieve. For a Python-centric team, Frax lowers the barrier to closing that loop without leaving JAX.

8. Limitations and Failure Modes

The first limitation is scope: Frax computes kinematics and dynamics but does not itself simulate contact or closed-loop physics, so contact-rich behaviours need MuJoCo or a custom loop. The second is the JAX prerequisite: to get the advertised speed and differentiability the user must stay inside the JAX programming model, enable x64 where needed and structure code for jit and vmap, and straying outside that model silently erodes performance. The third is maturity: as a 2026 project it is younger and less battle-tested than Pinocchio, and APIs may still evolve. The fourth is hardware dependence: the headline throughput assumes GPU or TPU with appropriate batching, so on a single CPU core the advantage over native libraries shrinks. The fifth is correctness of the model itself: the autodiff is only as good as the URDF and the floating-base convention supplied, and an inaccurate model propagates into every gradient. Frax is a building block, not an end-to-end safe controller, so safe deployment still requires the surrounding verification stack.

9. Version and Source Notes

Frax was released in 2026 by the Autonomous Systems Lab at Stanford University under the MIT licence (Copyright 2026 Daniel Morton) and is hosted on GitHub under the StanfordASL organisation. The accompanying paper is arXiv 2604.04310, associated with an ICRA 2026 workshop, and the core library is credited to Daniel Morton and Marco Pavone. The frax.ik pipeline relies on the ElastiQP solver, described in a separate preprint, arXiv 2609.19080, by Daniel Morton, Jon Arrizabalaga, Zachary Manchester and Marco Pavone. The repository documents the MuJoCo-like free-floating base convention, the Robot, Manipulator, Humanoid and Quadruped classes, and built-in models for the Franka Panda, Kuka iiwa, Unitree G1 and Unitree A2 with collision spheres. The MIT licence covers the source code; performance figures are the authors' own measurements. This entry draws version, licence and authorship from the repository and the two preprints, and makes no inference about personnel size or funding beyond what those sources state.

10. References

  1. Frax repository README, GitHub (StanfordASL/frax), framework overview, installation, models and examples.
  2. Frax paper, arXiv 2604.04310, ICRA 2026 workshop, Daniel Morton and Marco Pavone.
  3. ElastiQP paper, arXiv 2609.19080, Daniel Morton, Jon Arrizabalaga, Zachary Manchester and Marco Pavone.
  4. Frax IK guide, repository docs/ik.md, setup and usage of the frax.ik pipeline.
  5. Frax collision-modelling document, repository docs/modeling_collision.md, collision-sphere models.
  6. JAX documentation, jax.readthedocs.io, the JIT, autodiff and vmap primitives used by Frax.
  7. MuJoCo entry, the simulator whose free-floating base convention Frax mirrors.
  8. Pinocchio entry, the native C++ dynamics library that Frax is compared against for speed.
  9. ProtoMotions entry, an upper-layer GPU-accelerated motion framework complementary to Frax.
  10. SuperMimic entry, a differentiable world-model stack that shares Frax's autodiff-first philosophy.
Tags: