pub fn distribute(
a: &[f64],
w: &[f64],
t_min: f64,
t_max: f64,
t_ref: f64,
) -> Option<Vec<f64>>Expand description
The tension distribution: the tensions t (m) nearest t_ref that hold the wrench, A t = w for the structure matrix
a (n x m, row by row), each within [t_min, t_max]; None where there are none (outside the wrench-feasible
workspace). A small QP, min |t - t_ref|^2 subject to A t = w and the band: the penalised problem (penalised) finds
which cables sit at a bound, and the free ones are then solved exactly, t_F = t_ref + A_F^T (A_F A_F^T)^-1 (w - A_B
t_B - A_F t_ref). Where no cable is at a bound that is the closed form t_ref + A^+ (w - A t_ref); unlike the improved
closed-form method, which fixes one cable at a time and never frees it, the QP’s tensions change continuously with
the pose wherever they exist.