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

M3.lugre

LuGre friction

Family
dynamic friction
Rung
M3: friction that changes with state: speed, load or rest
Category
Actuator
Since
robotparts/2.3 (robotparts/2.3 kind lugre)
Fits
0
Definition
model.json · sha256 560a2029e8846474a357466fbcb584451a81c3f99dd5507015e9a06914fd88aa (a fit binds it by this sha256)
Kept versions
none: no fit binds an earlier model.json

What it is

Coulomb + viscous + Stribeck + bristle state. The LuGre dynamic friction model (Canudas de Wit, Olsson, Astrom and Lischinsky, IEEE TAC 1995): bristles of deflection z give pre-sliding displacement, the Stribeck curve and frictional lag.

Equation

dz/dt = v - sigma0*|v|*z/g(v), g(v) = coulomb_friction + (breakaway_torque - coulomb_friction)*exp(-(|v|/stribeck_velocity)^stribeck_exponent); tau_r = sigma0*z + sigma1*dz/dt + sigma2*v; stribeck_exponent is 2 when absent

Terms

Every term a fit of M3.lugre may state: 6 required, 2 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).
breakaway_torqueyesN·mN·m, mN·m—slow plateaus below 0.5 rad/sStatic (breakaway) friction torque at the output: the smallest torque that starts the output moving from rest, the peak of the Stribeck curve. It decays toward coulomb_friction as speed rises, over stribeck_velocity.
stribeck_velocityyesrad/srad/s, rpm, deg/s—slow plateaus below 0.5 rad/sOutput speed scale over which friction falls from breakaway_torque to coulomb_friction (v_s in tau_f = Fc + (Fs - Fc) exp(-(|v|/v_s)^d)). The exponent d, when fitted, goes in conditions.stribeck_exponent; without it d = 2.
sigma0yesN·m/radN·m/rad> 0small reversals, recorded fastLuGre bristle stiffness sigma0: output torque per radian of bristle deflection z.
sigma1yesN·m·s/radN·m·s/rad, mN·m·s/rad>= 0small reversals, recorded fastLuGre bristle (micro-)damping sigma1: output torque per rad/s of bristle deflection rate.
sigma2yesN·m·s/radN·m·s/rad, mN·m·s/rad>= 0velocity plateaus, both directions, 6-8 speeds, each at least one rotor turnLuGre viscous coefficient sigma2: output torque per rad/s of output speed (the other kinds' viscous_friction).
stribeck_exponentno1 (dimensionless)> 0, default 2slow plateaus below 0.5 rad/sShape exponent d of the Stribeck curve in g(v); 2 when absent.
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.
input dtsThe step the simulator advances by (a stateful model integrates its state over it).
state zradThe bristles' mean deflection. Starts at 0.0.
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 63cb93d20325eb8bfe76e7fa2899928c725eb5de354b45619830c7ef4d59cde0The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI.
jsreference—model.js · sha256 e8e42ee33d8acfef3fa7be6542c68ee06c165ff1dc2f3dd67787424a0009cb0aThe 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.
mujocopluginmujoco—No native part: the plugin integrates z each step with the simulator's dt (semi-implicit, stable for any dt) and applies the whole torque. Maps: armature = output_inertia. 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

  • One bristle state for the whole drivetrain.
  • Pre-sliding is fitted from small reversals; larger stiction effects outside their amplitude are extrapolated.

Fits of this model

No part hosts a fit of it yet.

Source

robotparts has no GitHub repository to link: the source of M3.lugre is these published files, the folder models/actuator/lugre/ of robotparts release 2026.12.01.1, served byte for byte under /v2/models/actuator/lugre/ (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.md4,484657e977e53358fbb5324deaf059284b85693baea1c0355904e695aadb77ce552
model.js910e8e42ee33d8acfef3fa7be6542c68ee06c165ff1dc2f3dd67787424a0009cb0a
model.json5,637560a2029e8846474a357466fbcb584451a81c3f99dd5507015e9a06914fd88aa
model.py1,39863cb93d20325eb8bfe76e7fa2899928c725eb5de354b45619830c7ef4d59cde0

README

M3.lugre — LuGre friction

Coulomb + viscous + Stribeck + bristle state. Family: dynamic friction. Rung: 3, friction that changes with state. Category: actuator.

The LuGre dynamic friction model: the contact behaves like bristles that deflect before they slide, which gives pre-sliding motion, the Stribeck curve and frictional lag from one state variable. It is stateful, so every backend integrates z each step.

When to use it. Use it when small reversals and holding position matter more than the plateaus explain.

Equation

dz/dt = v - sigma0*|v|*z/g(v), g(v) = coulomb_friction + (breakaway_torque - coulomb_friction)*exp(-(|v|/stribeck_velocity)^stribeck_exponent); tau_r = sigma0*z + sigma1*dz/dt + sigma2*v; stribeck_exponent is 2 when absent

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
breakaway_torqueyesN·mN·m, mN·mslow plateaus below 0.5 rad/s
stribeck_velocityyesrad/srad/s, rpm, deg/sslow plateaus below 0.5 rad/s
sigma0yesN·m/radN·m/radsmall reversals, recorded fast
sigma1yesN·m·s/radN·m·s/rad, mN·m·s/radsmall reversals, recorded fast
sigma2yesN·m·s/radN·m·s/rad, mN·m·s/radvelocity plateaus, both directions, 6-8 speeds, each at least one rotor turn
stribeck_exponentno11slow plateaus below 0.5 rad/s
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):

  • sigma0: LuGre bristle stiffness sigma0: output torque per radian of bristle deflection z.
  • sigma1: LuGre bristle (micro-)damping sigma1: output torque per rad/s of bristle deflection rate.
  • sigma2: LuGre viscous coefficient sigma2: output torque per rad/s of output speed (the other kinds' viscous_friction).
  • stribeck_exponent: Shape exponent d of the Stribeck curve in g(v); 2 when absent.

Inputs and state

  • input v (rad/s): The output's angular speed.
  • input dt (s): The step the simulator advances by (a stateful model integrates its state over it).
  • state z (rad, starts at 0): The bristles' mean deflection.

Backends

backendhowenginewhat runs
pythonreference—model.py (sha256 63cb93d20325…). The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI.
jsreference—model.js (sha256 e8e42ee33d8a…). 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.
mujocopluginmujoco, release named by the fitrobotparts.mujoco. No native part: the plugin integrates z each step with the simulator's dt (semi-implicit, stable for any dt) and applies the whole torque. Maps: armature = output_inertia.

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.
  • One bristle state for the whole drivetrain.
  • Pre-sliding is fitted from small reversals; larger stiction effects outside their amplitude are extrapolated.

Use it

import importlib.util
spec = importlib.util.spec_from_file_location("lugre", "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 lugre kind. The contract is SCHEMA2.md §4.3.2; the fit format is schemas/model.schema.json.