Choosing Between SolverFeatherstone and SolverSemiImplicit in Newton for Robot Simulation
Use SolverFeatherstone for high-DoF robots requiring joint-space dynamics with efficient mass-matrix factorization, and SolverSemiImplicit for simpler maximal-coordinate simulations with lower per-step overhead.
Newton, an open-source physics engine for articulated rigid-body simulation, provides two distinct high-level integrators for robot dynamics. Choosing between SolverFeatherstone and SolverSemiImplicit depends on your coordinate representation needs, joint complexity, and performance constraints. This guide breaks down the architectural differences, implementation details, and selection criteria based on the Newton source code.
Coordinate Systems: Reduced vs. Maximal
The fundamental distinction between these solvers lies in their coordinate representations for articulated bodies.
SolverFeatherstone: Generalized Coordinates
SolverFeatherstone operates in reduced (generalized) coordinates, tracking only joint positions and velocities rather than the full 6-DoF pose of every body. This implementation uses Featherstone's Composite Rigid-Body Algorithm (CRBA) to build the joint-space mass matrix efficiently.
According to the class docstring in [newton/_src/solvers/featherstone/solver_featherstone.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/featherstone/solver_featherstone.py#L59-L70), this solver assembles the system matrix M (mass matrix), Jacobian J, and solves H = JᵀMJ + R for articulated dynamics.
SolverSemiImplicit: Body-Centric Coordinates
SolverSemiImplicit uses maximal (body-centric) coordinates, maintaining the full pose and velocity state for each rigid body independently. Joint constraints are enforced via constraint forces rather than coordinate reduction.
As documented in [newton/_src/solvers/semi_implicit/solver_semi_implicit.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/semi_implicit/solver_semi_implicit.py#L41-L49), this solver implements a semi-implicit (symplectic Euler) integration scheme that directly updates body velocities and positions.
Mathematical Implementation
Featherstone's Composite Rigid-Body Algorithm
The SolverFeatherstone implementation constructs the joint-space dynamics equations through several key computational stages:
- Spatial Inertia Computation: The
compute_spatial_inertiakernel calculates composite rigid-body inertias for each link. - Jacobian Evaluation:
eval_rigid_jacobiancomputes the geometric Jacobian for constraint mapping. - Matrix Factorization:
eval_dense_cholesky_batchedperforms batched Cholesky decomposition for solving linear systems.
The matrix assembly occurs in the step method around lines 442-506, where the solver constructs and factorizes the mass matrix based on the update_mass_matrix_interval parameter.
Semi-Implicit Symplectic Euler
SolverSemiImplicit avoids explicit mass-matrix construction by directly integrating forces in maximal coordinates:
- Body-Joint Forces: The
eval_body_joint_forceskernel (called around line 165) computes constraint forces that enforce joint attachments. - Contact Forces:
eval_body_contact_forceshandles collision response separately from joint dynamics.
This approach eliminates the O(n³) matrix factorization cost but requires constraint stabilization through spring-damper attachments (joint_attach_ke and joint_attach_kd parameters).
Joint Type Support and Limitations
Both solvers support PRISMATIC, REVOLUTE, BALL, FIXED, FREE, DISTANCE (as FREE), and D6 joints, but with different limitations:
SolverFeatherstone Limitations (see lines 88-99):
- CABLE joints are not supported
- Limited support for armature, limit-stiffness/damping, and target stiffness/damping
SolverSemiImplicit Limitations (see lines 53-64):
- Joint limits and targets are ignored for BALL joints
- Many advanced features (armature, friction, effort limits) are not supported
Performance Characteristics
SolverFeatherstone excels in high-DoF scenarios:
- Assembles the system matrix once per
update_mass_matrix_intervalrather than every step - Uses batched GEMM and Cholesky operations via
use_tile_gemmfor GPU acceleration - Higher per-step overhead when mass matrix updates are frequent, but amortized efficiently
SolverSemiImplicit offers simpler per-step work:
- No large matrix factorization; scales linearly with body count
- Can become slower for high-DoF chains because constraints resolve in maximal space rather than reduced coordinates
- Lower memory footprint due to absence of dense mass-matrix storage
Code Examples
Using SolverFeatherstone
import newton
# Build your model (bodies, joints, etc.)
model = newton.ModelBuilder() \
.add_body(...) \
.add_joint_free(parent=-1, child=0) \
.build()
# Create an initial state
state_in = newton.State.from_model(model)
state_out = newton.State.from_model(model)
# Instantiate the Featherstone solver
solver = newton.solvers.SolverFeatherstone(
model,
angular_damping=0.05,
update_mass_matrix_interval=2, # recompute M every 2 steps
use_tile_gemm=True, # GPU-accelerated batch solve
)
# Simulation loop
dt = 1e-3
for _ in range(1000):
solver.step(state_in, state_out, control=None, contacts=None, dt=dt)
state_in, state_out = state_out, state_in
Key source references: class definition in [solver_featherstone.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/featherstone/solver_featherstone.py#L59-L70); mass-matrix update logic in step.
Using SolverSemiImplicit
import newton
# Build the same model as above
model = ...
# Create states
state_in = newton.State.from_model(model)
state_out = newton.State.from_model(model)
# Instantiate the Semi-Implicit solver
solver = newton.solvers.SolverSemiImplicit(
model,
angular_damping=0.05,
friction_smoothing=1.0,
joint_attach_ke=1e4,
joint_attach_kd=1e2,
)
# Simulation loop
dt = 1e-3
for _ in range(1000):
solver.step(state_in, state_out, control=None, contacts=None, dt=dt)
state_in, state_out = state_out, state_in
Key source references: class definition in [solver_semi_implicit.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/semi_implicit/solver_semi_implicit.py#L41-L49); joint-force evaluation in step.
Summary
- Coordinate Representation:
SolverFeatherstoneuses reduced generalized coordinates via Featherstone's CRBA, whileSolverSemiImplicituses maximal body-centric coordinates with constraint forces. - Performance Profile: Featherstone excels for high-DoF robots with batched matrix operations and configurable mass-matrix update intervals; Semi-Implicit offers lower per-step overhead for simpler mechanisms.
- Joint Limitations: Featherstone lacks CABLE joint support; Semi-Implicit ignores limits on BALL joints and lacks advanced features like armature and effort limits.
- Implementation Location: Featherstone logic resides in
newton/_src/solvers/featherstone/, while Semi-Implicit implementation is innewton/_src/solvers/semi_implicit/.
Frequently Asked Questions
Which solver should I use for a high-degree-of-freedom humanoid robot?
Use SolverFeatherstone for humanoid robots or any high-DoF articulated system. According to the source code in [solver_featherstone.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/featherstone/solver_featherstone.py), this solver implements Featherstone's Composite Rigid-Body Algorithm to build the joint-space mass matrix efficiently, with support for update_mass_matrix_interval to amortize factorization costs across multiple steps.
Does SolverSemiImplicit support joint limits and motors?
SolverSemiImplicit supports basic joint types including PRISMATIC, REVOLUTE, and FIXED joints, but ignores joint limits and targets for BALL joints according to the docstring in [solver_semi_implicit.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/semi_implicit/solver_semi_implicit.py#L53-L64). Advanced features like armature, friction, and effort limits are not supported in this solver, making it less suitable for precise torque-controlled robotics compared to the Featherstone implementation.
Can I switch between solvers without rebuilding my model?
Yes, both solvers accept the same Model object constructed via newton.ModelBuilder(). As shown in the code examples, you can instantiate either newton.solvers.SolverFeatherstone(model, ...) or newton.solvers.SolverSemiImplicit(model, ...) using the identical model definition. The solvers handle the coordinate transformation internally, though simulation results will differ due to the distinct mathematical formulations (generalized vs. maximal coordinates).
What GPU acceleration options are available for these solvers?
SolverFeatherstone provides explicit GPU acceleration through the use_tile_gemm parameter, which enables batched GEMM and Cholesky operations via the Tile API as implemented in [kernels.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/featherstone/kernels.py). The semi-implicit solver does not expose specific GPU tiling options, relying instead on general JAX acceleration for its body-force computations in [kernels_body.py](https://github.com/newton-physics/newton/blob/main/newton/_src/solvers/semi_implicit/kernels_body.py).
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →