Skip to content

novaphy.mass_matrix_crba

Compute the joint-space mass matrix using the Composite Rigid Body Algorithm.

def mass_matrix_crba(
    joints: list[Joint],
    bodies: list[RigidBody],
    q: np.ndarray,
) -> np.ndarray

Parameters

Parameter Description
joints Per-link joint descriptors.
bodies Per-link rigid-body inertias.
q Generalized position vector.

Returns

Symmetric positive-definite (n_qd, n_qd) mass matrix H.

Example

import novaphy
H = novaphy.mass_matrix_crba(joints, bodies, q)

Compatibility Notes

Newton's eval_mass_matrix(model, state, ...) operates at the Model / State level. NovaPhy's CRBA helper takes flat per-link lists; if you need the model-level form, retrieve joints / bodies from model.bodies and the joint table.

See Also