Skip to main content

CalibrationService (gRPC)

Generated content. This page is produced by cargo run --bin gen_docs (src-tauri/src/bin/gen_docs/) reading proto/maslow/v1/*.proto's compiled FileDescriptorSet, via prost-reflect, re-run on every docs-site build. Do not hand-edit it: fix the generator or the source it reads instead.

Calibration is modeled as a custom method on a virtual collection: there is no persisted "calibration" resource, this is a stateless computation.

Full name: maslow.v1.CalibrationService

Methods

SolveCalibration

Types

Every message and enum reachable from this service's requests and responses, including shared types defined in common.proto.

AnchorParams

The reduced 5-parameter anchor estimate the solver optimises over. BL is fixed at the origin and BR's Y is fixed at 0, so they are not parameters.

FieldTypeDescription
tl_xdouble
tl_ydouble
tr_xdouble
tr_ydouble
br_xdouble

Anchors

Frame anchor coordinates (mm), as stored in the firmware config.

FieldTypeDescription
tl_xfloat
tl_yfloat
tr_xfloat
tr_yfloat
bl_xfloat
bl_yfloat
br_xfloat
br_yfloat
validboolTrue when the geometry is non-degenerate and passes the firmware's own basic sanity checks, i.e. the anchors are usable as a frame definition.
calibratedboolTrue when the anchors are valid AND differ from the firmware's compiled defaults, i.e. a calibration actually ran and overwrote them.

Fitness

Quality metrics for a solved fit.

FieldTypeDescription
rmsdoublesqrt(SSR / 4N), overall belt-length error, mm.
max_residualdoublemax|residual|, worst single belt-length error, mm.
per_anchorrepeated doublePer-anchor RMS [tl, tr, bl, br], mm.
convergedboolTrue if the solver converged within the iteration cap on at least one attempt.

Measurement

One belt-length measurement at a calibration waypoint (mm, XY plane).

FieldTypeDescription
tldouble
trdouble
bldouble
brdouble

ResidualRow

One residual row: [tl, tr, bl, br] belt-length error, mm.

FieldTypeDescription
valuesrepeated double

Sled

Estimated sled position for a single measurement (mm, XY plane).

FieldTypeDescription
xdouble
ydouble

SolveCalibrationRequest

FieldTypeDescription
measurementsrepeated Measurement
initialAnchorsStarting guess, as frame anchors (matching what a config dump provides), not the solver's internal 5-parameter form. If unset, the solver falls back to the firmware default frame. (part of oneof _initial)
excluderepeated uint32Zero-based measurement indices to exclude from the solve (what-if waypoint exclusion), without touching the machine.
solverstringSolver identifier; currently only "levenberg-marquardt" is implemented.

SolveResult

Full result of a solve: candidate anchors + fitness + per-measurement detail. ok reflects the firmware's own fitness gates; gate_error explains a failure when ok is false.

FieldTypeDescription
solverstring
okbool
gate_errorstring
anchorsoptional Anchors
paramsoptional AnchorParams
fitnessoptional Fitness
sledrepeated Sled
residualsrepeated ResidualRowPer-measurement residuals [tl, tr, bl, br] of the best params, mm. Each entry corresponds by index to kept_indices.
kept_indicesrepeated uint32Original measurement indices the solve actually used, in order. Equal to 0..n unless the caller excluded waypoints, letting a caller map sled/ residuals back to the original waypoint numbers.