Skip to main content

fit_rigid

Function fit_rigid 

Source
pub fn fit_rigid(
    entry: &MachineEntry,
    cfg: &Config,
    trace: &Trace,
) -> Result<Vec<Option<AxisFit>>, TraceError>
Expand description

Stage 1: the rigid values of every axis from a trace, next to the config’s. None for an axis the trace does not move in both directions. The machine has to pass trace::per_axis_fit (a linear transformation and an inertia that does not change with the pose); others are refused with error-trace-not-linear and go to fit_joints.

A payload picked or dropped during the trace is looked for as fit_joints does (payload_steps, in the motors’ coordinates, against the config’s replay); at each step found an axis gets a column of its own, the payload’s force on it (the rigid model’s with less without the payload, through the transformation) from the step on, whose value is the change of the payload’s factor there (AxisFit::payload_steps). The axis’s values are then those before the first step, the config’s those of its replay, which holds the payload all along. Links (Machine::links): no machine the fit per axis takes reports any, the per-axis values hold them.