robotparts.dev is a preview: every part is in the full catalog on GitHub and in a local build (python3 build/all.py).
robotparts

M2.coulomb_viscous

Coulomb and viscous friction

Family
fitted constant friction
Rung
M2: fitted constant friction: Coulomb and viscous
Category
Actuator
Since
robotparts/2.3 (robotparts/2.3 kind coulomb_viscous)
Fits
0
Definition
model.json · sha256 1638a61405f7e54835d809633a899c652749fdd773780301e5ae1abff634e0a8 (a fit binds it by this sha256)
Kept versions
none: no fit binds an earlier model.json

What it is

Coulomb + viscous. Constant (Coulomb) plus viscous friction at the output, fitted from measurements: MuJoCo's frictionloss and damping, so its simulator is optional.

Equation

tau_r = coulomb_friction*sign(v) + viscous_friction*v

Terms

Every term a fit of M2.coulomb_viscous may state: 2 required, 1 optional. Click a term for its definition and how it is measured.

TermRequiredUnit (SI)Units a fit may useBoundsMeasured byDefinition
coulomb_frictionyesN·mN·m, mN·m—velocity plateaus, both directions, 6-8 speeds, each at least one rotor turnCoulomb friction torque at the output: the constant torque that opposes motion (MuJoCo frictionloss; robot.json frictionloss_nm, from a scope-part value only).
viscous_frictionyesN·m·s/radN·m·s/rad, mN·m·s/rad—velocity plateaus, both directions, 6-8 speeds, each at least one rotor turnViscous friction coefficient at the output (MuJoCo damping).
output_inertianokg·m²kg·m², kg·cm², kg·mm², g·cm², g·mm²—chirps (or the datasheet)The part's own moment of inertia about its joint axis, referred to the OUTPUT: for a geared part its reflected inertia, MuJoCo's armature. A datasheet value or a scope-part measurement only. A joint's inertia together with whatever it drives belongs to the assembly, not the part, and robotparts does not publish it.

Inputs, state and output

What a backend feeds the model each step, what it carries between steps, and what it returns.

SignalUnitWhat it is
input vrad/sThe output's angular speed.
output tau_rN·mThe resisting torque at the output: what the motor must add to move the output as the inputs say. The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle).

Backends

BackendHowEngineImplementationNote
pythonreference—model.py · sha256 e20d6f415822572bb89f305344dce3efc659a9db2822a34300141afa5665b095The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI.
jsreference—model.js · sha256 5b8131ce0acd3f0d844985fb888d0ef91d553342ea2980896901b010db0c1e00The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12.
mujoconativemujoco—frictionloss sticks at rest as a constraint (set friction_solref hard, or it creeps); damping is the viscous term. Maps: armature = output_inertia, frictionloss = coulomb_friction, damping = viscous_friction. Settings a fit may give: friction_solref (number-list of 2): The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge; friction_solimp (number-list of 5, > 0): The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.

reference: a file in this folder, torque(terms, inputs, state, dt) with terms in SI (the contract's own ruler; model.py and model.js agree to 1e-12), linked by its content at /v2/models/by-sha256/, the bytes a fit pins. native: the engine alone. plugin: robotparts' MuJoCo plugin runs the python reference each step. external: code outside robotparts, which a fit pins.

Validity

DimUnitWhat a fit states its range over
output_speedrad/s|v|, the output speed the terms were fitted or checked across.

Assumptions

  • Friction does not depend on speed beyond the viscous slope, on load, on temperature or on how long the part rested.

Fits of this model

No part hosts a fit of it yet.

Source

robotparts has no GitHub repository to link: the source of M2.coulomb_viscous is these published files, the folder models/actuator/coulomb_viscous/ of robotparts release 2026.12.01.1, served byte for byte under /v2/models/actuator/coulomb_viscous/ (no listing there: each file below is its link). Each sha256 is the file's own; a fit's reference backend pins the same one.

FileBytessha256
README.md3,497529c2bf1f968b67adf5806a6a49d9a192dfdeb36b1d805f99a04e02d18af6530
model.js6515b8131ce0acd3f0d844985fb888d0ef91d553342ea2980896901b010db0c1e00
model.json3,5851638a61405f7e54835d809633a899c652749fdd773780301e5ae1abff634e0a8
model.py1,124e20d6f415822572bb89f305344dce3efc659a9db2822a34300141afa5665b095

README

M2.coulomb_viscous — Coulomb and viscous friction

Coulomb + viscous. Family: fitted constant friction. Rung: 2, fitted constant friction. Category: actuator.

Constant (Coulomb) friction that flips with direction, plus a viscous drag that grows with speed. MuJoCo expresses both natively (frictionloss and damping), so it runs anywhere with no plugin. On the rack it is the first fitted rung, and the backend matters more than the terms: MuJoCo's default friction constraint creeps below about 0.4 rad/s on a light hinge, and a hard solreffriction fixes it.

When to use it. Use it as the first fitted model; measure it with velocity plateaus in both directions.

Equation

tau_r = coulomb_friction*sign(v) + viscous_friction*v

Output tau_r (N·m): The resisting torque at the output: what the motor must add to move the output as the inputs say. The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle).

Terms

termrequiredunit (SI)units a fit may usemeasured by
coulomb_frictionyesN·mN·m, mN·mvelocity plateaus, both directions, 6-8 speeds, each at least one rotor turn
viscous_frictionyesN·m·s/radN·m·s/rad, mN·m·s/radvelocity plateaus, both directions, 6-8 speeds, each at least one rotor turn
output_inertianokg·m²kg·m², kg·cm², kg·mm², g·cm², g·mm²chirps (or the datasheet)

Declared terms (the rest are registry keys, defined in SCHEMA2.md §7.3):

  • none

Inputs and state

  • input v (rad/s): The output's angular speed.

Backends

backendhowenginewhat runs
pythonreference—model.py (sha256 e20d6f415822…). The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI.
jsreference—model.js (sha256 5b8131ce0acd…). The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12.
mujoconativemujoco, release named by the fitfrictionloss sticks at rest as a constraint (set friction_solref hard, or it creeps); damping is the viscous term. Maps: armature = output_inertia, frictionloss = coulomb_friction, damping = viscous_friction.

mujoco settings a fit may state:

  • friction_solref: 2 numbers. The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.
  • friction_solimp: 5 numbers, in (0, inf). The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.

Validity

  • A fit states the range of output_speed (rad/s) it holds across: |v|, the output speed the terms were fitted or checked across.
  • Friction does not depend on speed beyond the viscous slope, on load, on temperature or on how long the part rested.

Use it

import importlib.util
spec = importlib.util.spec_from_file_location("coulomb_viscous", "model.py")
model = importlib.util.module_from_spec(spec); spec.loader.exec_module(model)
terms = {...}  # a fit's terms in SI (robotparts.models.si_terms(fit, definition) converts them)
tau_r, state = model.torque(terms, {"v": 0.0}, None, 0.001)

Defined since robotparts/2.3. It is robotparts/2.3's coulomb_viscous kind. The contract is SCHEMA2.md §4.3.2; the fit format is schemas/model.schema.json.