Model naming spec
Updated 2026-10-28 · written in the robotparts repository as site/guides/model-naming.md
How a model of a part is named, what each rung of the ladder adds, and what a fit of a model holds. It is the contract since robotparts/2.5 (2026-10-27): SCHEMA2.md §4.3.2. The names and the rules were decided by Zach Yamaoka, who runs robotparts, on 2026-10-25.
The answer in one screen
- A model's name is a rung and a word:
M<rung>.<word>. The rung is one integer: how much physics the model captures, on its category's ladder. The word says which model at that rung:M2.coulomb_viscous,M3.stribeck,M3.lugre. - M0 is the ideal part and M1 the datasheet, in every category. M0 has no losses: it is the baseline every rung's gain is measured from. M1 holds the maker's stated values, nothing fitted.
- Each rung up adds a layer of physics. For actuators: M2 fitted constant friction, M3 friction that changes with speed, load or rest, M4 the drivetrain (ripple, backlash, compliance), M5 the motor's electrics and heat.
- A model is a folder:
models/<category>/<word>/holds its definition (model.json), its README and its reference code (model.py,model.js). The definition lists the terms, the bench step that measures each, and the backends that implement it. - A fit is a part's numbers for one model. It names every backend it ran on, each with its code pinned by sha256, and the driver twin the backend ran.
- A score names the model and the backend. The same model on two backends is two scores.
- robotparts never combines two models into a third. "Coulomb + viscous + Stribeck" is a description, not a sum.
The rules
- Format.
M, the rung (one digit, 0-9),., the model word, and optionally.and a variant word. Words are lowercase letters, digits and_, starting with a letter. No minor numbers, no suffixes. Zach, 2026-10-25, on minor numbers: "M1.1 M1.2 almost implies another rung within the rung… just adds complication." - The rung is the category's ladder. The registry (
registry.model_rungs) says what each rung adds, in plain words. A model's rung is the highest layer it captures, not a promise of every lower term: read its terms. - The word picks the model at that rung. Several models can share a rung. Each one also has a family, a field of its definition that groups them on a page: at M3,
M3.stribeckandM3.loadare static friction,M3.lugreis dynamic friction (it carries a state). The family is never part of the name. - A variant fixes one structural choice of its model and is registered on it, never a fitted value (a two-body scene with the gear's gap, say). None of robotparts/2.5's published models registers one yet. A fit carries the variant in its name exactly when it states the terms the variant requires.
- The word is always written, in files, the API and citations. A bare "M2" goes ambiguous the day a second M2 model is registered. A page may show the rung large and the word small.
- M0 is always the ideal part, M1 always the datasheet.
M0.ideal: no losses, the stated inertia and ratio.M1.datasheet: the stated values, nothing fitted; every registry-key term in it equals the part's own spec. Both are fitted from nothing, so their fits name no records and state no validity range. - A model is self-contained. Its folder says everything a backend or a reader needs: the equation, every term (a registry key, or declared with its units, shape and sign) and the bench step that measures it, what a backend feeds it each step and what state it carries, the backends that implement it and how, and the dims a fit states its range over. Where it has reference code, its
model.py(stdlib Python) andmodel.jsagree to 1e-12, so each is the ruler for the other. Zach, 2026-10-25: "each model is a separate self enclosed thing ... the contract should be like you implement the model, that model specifies what terms it needs ... what backends". - A name never changes meaning. A better fit of the same model is new values under the same name. A different equation is a new word, in a new folder. Models, words, variants and optional terms are added, never changed.
- Scores belong to a (model, backend). A
twin_tracking_errorrecord scored against a fit names the fit inconditions.modeland the backend it ran inconditions.backend. The naming spec also defines twin-grade (held-out error ≤ 1.5 × the floor of 5 identical repeats, and ≤ 2.0 × it in every motion class) and one recommended model per part (the lowest-rung twin-grade one). Neither is in the contract yet: no key holds per-class scores or a floor record, so 2.5 leaves any ranking to the page.
The grammar
name = "M" rung "." model [ "." variant ]
rung = "0" | "1" | … | "9"
model = word (a folder models/<category>/<word>/; it carries its family)
variant = word (registered on that model)
word = [a-z][a-z0-9_]*
- Parsing needs no lookup. Split on
.: the first part isMand a digit, the second is always the model, a third is always a variant. - One exception, for definitions only: a model whose rung is set by its terms is defined as
M*.<word>: each of its terms declares a layer, and a fit's rung is the highest layer among the terms it states. Its fits always carry that digit (M2.<word>,M4.<word>), and the build checks it. None of the published models is one today. - The family is a field, not a segment. Zach's first sketch put it in the middle of the name (
M4.<family>.ripple). Then a three-part name is ambiguous: family and model, or model and variant? Only a registry lookup could tell. And families are a classification, which gets reorganised: moving a model to another family would rename it, which breaks rule 8. Biology keeps the same split: a species keeps its name when its genus is revised.
The actuator ladder
The rungs are the registry's words. Each model links to its own page: its definition, README and code.
| Rung | What it adds | Models | Measured by |
|---|---|---|---|
| M0 | the ideal part: no losses, the stated inertia and ratio; the ablation baseline | M0.ideal | chirps (or the datasheet) |
| M1 | the datasheet: the stated values, nothing fitted | M1.datasheet | reading the datasheet |
| M2 | fitted constant friction: Coulomb and viscous | M2.coulomb_viscous | velocity plateaus |
| M3 | friction that changes with state: speed, load or rest | M3.stribeck · M3.load · M3.lugre | slow plateaus · pendulum sweeps with 2-3 masses · small reversals |
| M4 | the drivetrain: rotor ripple, backlash, compliance | M4.ripple | a rotor-angle sweep |
| M5 | the motor's electrics and heat: R, L, back-EMF, winding temperature | M5.dcmotor | board calibration, then the envelope ladder |
Driver behaviour is not an actuator rung (Zach, 2026-10-25, agreed with the rack agent). The current loop, torque scale, command latency and voltage or current mode belong to the board and its firmware, not the motor. A fit names them as its backend's driver, the driver twin it ran (a board and its firmware, a moteus-c1 say). Never a term.
Also decided that evening: M0.ideal heads every ladder as the ablation baseline, friction at capture stays at M3, and the rotor-keyed cogging map at M4.
Lab models
A lab model is one rig's own system identification: the parameter set a lab tuned on its rack, with the fits, scores and held-out runs that go with it. It is not catalog vocabulary, so robotparts keeps it in lab/, apart from the published models, and reads it only in a lab build (ROBOTPARTS_LAB=1), which is for local review and never deployed (Zach, 2026-10-28). robotparts.dev publishes no lab model, and none of its fits, scores or runs: a lab model exists only in a lab build. Its name follows the same grammar and its fits the same rules; a lab build checks them like any other.
Ladders for other parts (sketches)
These are sketches from the naming spec. They are not in the contract yet: robotparts/2.5 registers rungs for actuators only, and a category's folders come with its first fit.
Cameras
| Rung | What it adds | Models |
|---|---|---|
| M0 | the ideal camera: a perfect pinhole at the nominal intrinsics, no noise, no blur | ideal |
| M1 | the datasheet: stated resolution and field of view | datasheet |
| M2 | calibrated intrinsics: focal lengths and principal point | pinhole |
| M3 | lens distortion | brown_conrady, fisheye |
| M4 | timing and sensor: rolling shutter, exposure, noise | rolling_shutter, noise |
| M5 | depth error against range and surface (depth cameras) | depth_noise |
Power supplies
| Rung | What it adds | Models |
|---|---|---|
| M0 | the ideal source: the nominal voltage at any current | ideal |
| M1 | the datasheet: the stated voltage, up to the stated current | datasheet |
| M2 | load regulation and the limit: droop, current limit, foldback | droop |
| M3 | the transient: load-step response, output impedance | transient |
| M4 | temperature: derating with ambient and load | thermal |
Motor drivers
| Rung | What it adds | Models |
|---|---|---|
| M0 | the ideal driver: the commanded torque, at once, without limit | ideal |
| M1 | the datasheet: the stated current and voltage limits | datasheet |
| M2 | the control mode and its loop: current or voltage mode, loop bandwidth, command latency | current_loop, voltage_mode |
| M3 | sensing: encoder PLL filtering, sampling, quantization | sensing |
| M4 | switching detail: dead time, bus timing | switching |
| M5 | temperature: board heating and derating | thermal |
A driver model is per board and firmware: the same board on another firmware is a new set of values.
What a fit holds
A fit is a file the part hosts (a simulation-models view of format model). Here is an illustrative one, SCHEMA2.md §4.3.2's own: round values and placeholders in <…>, not a measurement of any part.
{"format": "robotparts-model/1", "part": "<part id>", "category": "actuator", "name": "M3.stribeck",
"definition_sha256": "<64 hex: the model.json it was written against>", "description": "Coulomb + viscous + Stribeck",
"terms": {"coulomb_friction": {"value": 0.05, "unit": "N·m", "source": "<file>.json#1"},
"viscous_friction": {"value": 0.002, "unit": "N·m·s/rad", "source": "<file>.json#1"},
"breakaway_torque": {"value": 0.07, "unit": "N·m", "source": "<file>.json#2"},
"stribeck_velocity": {"value": 0.3, "unit": "rad/s", "source": "<file>.json#2"}},
"backends": [{"id": "python-ref", "backend": "python", "code_url": "https://robotparts.dev/v2/models/by-sha256/<implementation_sha256>.py",
"code_sha256": "<implementation_sha256>", "engine": null, "settings": {}, "driver": null},
{"id": "mujoco", "backend": "mujoco", "code_url": "https://github.com/<owner>/<repo>/blob/<40 hex>/sim.py", "code_sha256": "<64 hex>",
"engine": "mujoco 3.17.0", "settings": {"friction_solref": [0.0004, 1.0]}, "driver": null}],
"validity": {"output_speed": {"min": 0.0, "max": 2.0, "unit": "rad/s", "basis": "fitted", "source": "the plateaus' speeds"}},
"mjcf_sha256": null, "fitted_from": ["<file>.json#1", "<file>.json#2"], "source_url": null, "note": null}
name: the model's word is a folder ofmodels/actuator/; the digit is the model's rung, or for a model whose rung is set by its terms the highest layer of the terms stated.terms: every required term of the model and only its terms, each with its unit and where the value came from.backends: every backend the fit ran on, at least one, each a backend the model lists.code_urlandcode_sha256pin the code that ran (null only for a native backend);engineis the engine's release;settingsare the backend's own;driveris the driver twin it ran, or null for an ideal driver.validity: the range each declared dim wasfittedorcheckedacross. Onlyidealanddatasheetleave it empty.fitted_from: the measurement records of this part the fit came from.source_url: the page of the code and README it came from.- robotparts stores the result, not the fitting: the pinned code and the cited records say how.
How to measure a model
Every term names the bench step that measures it. To measure a model, run the steps for the terms you lack, then the ruler. The times are how long each step takes on BAM's bench (2026-10-25); "estimate" means not yet timed.
| Bench step | Terms it measures | Bench time |
|---|---|---|
| velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn | coulomb_friction, viscous_friction, sigma2 | ~6 min, with the chirps |
| chirps (or the datasheet) | output_inertia | in the plateaus' ~6 min |
| reading the datasheet | every M1.datasheet term; gear_ratio | none |
| slow plateaus below 0.5 rad/s | breakaway_torque, stribeck_velocity, stribeck_exponent | ~3 min (estimate) |
| small reversals, recorded fast | sigma0, sigma1 | ~3 min (estimate) |
| pendulum sweeps with 2-3 masses | friction_load_coefficient | ~10 min |
| a rotor-angle sweep (the plateaus, if they cover more than one rotor turn) | harmonics | +0 min |
| measure-only board calibration, then the envelope ladder | motorconst, resistance and the rest of M5.dcmotor | ~17 min |
| the board's config and a command-to-motion lag fit, per firmware | not a term: the backend's driver | ~2 min |
| the ruler: the same tape 5 times from one start, then the held-out dataset | the floor, and the score | ~8 min |
Where it lives in the contract
- SCHEMA2.md 'Amendment robotparts/2.5' and §4.3.2, the normative text. The rationale, the options weighed and what was left out are in
docs/peps/0001-self-contained-models.md. - The definitions:
models/<category>/<word>/, checked byschemas/model-definition.schema.json(a lab model's, in a lab build only,lab/models/<category>/<word>/: SCHEMA2.md §4.3.2 "Lab models and lab data"). The vocabulary they share is in the registry:model_rungs,model_backends(python,js,mujoco), and themodelformat. - The fits: hosted files checked by
schemas/model.schema.json. The build refuses a fit that breaks its definition. - For programs: every definition with its files and README, and every fit with its scores, in /v2/models.json. A definition's own files are at
/v2/models/<category>/<word>/<file>. - Not in 2.5: the ladders for cameras, power supplies and drivers; a ranking or recommended model per part; composition.