Expand description
Symbolic Jacobian computation via tang-expr.
Traces the Articulated Body Algorithm (ABA) and semi-implicit Euler step
symbolically using ExprId as the scalar type, then differentiates the
output expressions w.r.t. all input variables. The resulting derivatives
are simplified and compiled to fast closures.
§How it works
- Model topology (parent indices, joint types, axes, inertias) is read
from the concrete
Modelat compile time. - State variables (q, v, ctrl) become
ExprId::var(i)in the expression graph. Gravity and timestep becomeExprId::from_f64(...)literals. - We re-implement the single-DOF ABA path using tang’s generic spatial
algebra types (
SpatialVec<ExprId>,SpatialMat<ExprId>, etc.). - The output accelerations are combined with semi-implicit Euler to produce (q’, v’) expressions. We differentiate each output w.r.t. each input, simplify, and compile to closures.
§Limitations
- Only single-DOF joints (revolute, prismatic) are supported. Multi-DOF joints (spherical, free) require symbolic matrix inversion which is not yet implemented.
- The compiled closures are specialized to a specific model topology. If the model changes, recompile.
Structs§
- Compiled
Step Jacobians - Compiled symbolic step Jacobians.
Functions§
- symbolic_
step_ jacobians - Convenience: compute symbolic step Jacobians for a given model and state.