pub fn arm_modes(
(root, coupling): (f64, f64),
distal: &[Vec<f64>],
k_gear: Option<[f64; 3]>,
k_bend: Option<f64>,
k_lateral: Option<f64>,
) -> Vec<(f64, Vec<f64>)>Expand description
The arms’ modes with the motors held (by their position loops): per arm the gearbox’s spring k_g from the motor to
the arm’s root (inertia root, joined to its elbow by the tube’s coupling B; k_gear one per arm, each arm’s own
gearbox), the bending spring k_b from the root to the elbow, and the rest of the machine as
the mass matrix distal in the elbow angles and, where it is 6 x 6, the elbows’ moves out of the arms’ planes, each
on its lateral spring k_l. None for a rigid spring (infinite stiffness: the two ends one body). The coordinates
are (roots, elbow angles, elbow moves), the flexibility per arm K^-1 = [[1/k_g, 1/k_g], [1/k_g, 1/k_g + 1/k_b]]
(root, elbow) and 1/k_l; with M = L L^T (Cholesky) the eigenvalues mu = 1/w^2 of the symmetric L^T K^-1 L, by
Jacobi rotations, the shape v = K^-1 L z / mu. A rigid connection has mu = 0 and is no mode. Gravity’s stiffness
(some N m/rad against 1e4) and the stops are left out. Returns w^2 and the shape per mode, lowest first.